Gravity works by accelerating an object. In our case gravity is down so our gravity constant is negative. Starting with an initial jump speed, gravity changes the sprites yVelocity by our gravity constant every tick of the repeat loop.
All credit goes to notchRules. If you like this program even though I only added a bar and ability to move with arrow keys, then check out @Gamerkeeg who is a fellow scratcher. Also, this may sound stupid, but try jumping over the bar.