This is some complex platforming physics I am using for my next game! It takes into account gravity, friction, momentum and speed. Use A and D to move left and right and use space to jump.
Anybody is free to use this, just remix it and then export the code. You will have to modify it to suit your game though, so I have left notes in the project explaining some of the code. (credit required)