To create event scripts:
From the Setup tab, and then under Scripts, select Script Editor.
Single or double click an event.
Write the script in the Script Editor.