I made the code cleaner and fixed stuff up!
Use for platformer if you want just like the owner intended!