A scrip (not a typo, actual name) is a piece of code which is executed under certain conditions that can customize actions which are taken when certain criteria is met. For global scrips, go to Admin | Scrips | Select (to edit) or Create (to make a new one). You will see the Scrip form at this point.
Most of the time, I'm filling only the following fields:
Description: A human readable description of the scrip
Condition: The action you are trapping, so if you want this scrip to run on a new ticket, you'd choose On Create
Action: I almost always use User Defined
Template: Blank
Applies to: Global
Enabled: checked
Custom Condition: Leave blank if you chose Condition above
Custom action preparation code:
return 1;
is the minimum required code for this
Custom action commit code: The Perl code you want to be executed