Make sprites react when they collide

Make two sprites, such as a ball and a paddle:

This script tells the ball what to do when it hits the paddle: