The whole point of the game is to keep the beach ball from touching the red line. To do that you use your mouse pointer to control the green paddle. Click space to reset.
I got this idea from a scratch video and changed a little bit to make it better.