The jump script detects whether it is in the air or on the ground, useful for many things.
I got the original script and modified it from (I forgot their name sorry) and modified it to have gravity.