Space to drop ball, you can't drop it if it's touching terrain.
If you're here for educational purposes, then I HIGHLY suggest watching @FUNUT's video: https://www.youtube.com/watch?v=erICx5dDD0Q instead of dealing with the scripts yourself. I turned my "If on Sprite, Bounce" project into a relatively working ball physics engine. Note: The terrain is bitmap, so the calculations can't always be 100% accurate, sometimes the ball glitches.