Click the Events category. Drag out a when clicked block and snap it on top.
Click the green flag to start your script:
Click the stop sign if you want it to stop.