The script object is an object you can use to store JavaScript functions and values separately from any particular form object. Typically, you use the script object to create custom functions and methods that you want to use as part of JavaScript scripts in many locations on your form. This technique reduces the overall amount of scripting required to perform repetitive actions.
The script object only supports script written in JavaScript; however, there are no restrictions on the location where the scripts are executed, provided that the scripting language for the event that invokes the script object is set to JavaScript. Both Acrobat and LiveCycle Forms ES process scripting from a script object in the same manner, but both are also distinct. Only scripts set to run on the client can make use of script objects set to run on the client, and vice versa.
See also 

About the script object