Welp here is a small sonic engine.Wall detection I will add that soon as this type of wall detection runs in scratch 2 and I have an easier way of doing that buuut i'm lazy :/.All I did was add a jump sound and music and a crouch for sonic.I added a little bit not a lot so sonic cannot go 360 but he can turn according to what slope he is on.
credit to @Bunnynightfan for fixing the broken project :D Sonic Engine