It's in the ganis

In a SCRIPT SCRIPTEND block
In GS1 it is limited in functionality (since it can be edited), in GS2 it is compiled on the server and can do everything that other client scripts can do as well.
You can either use it in a gani with setani/this.ani, or you "attach" it to a player or npc by doing object.attr[index] = "mygani.gani";
One thing that is special is that you can access the object to which the gani belongs / is attached to by "player". Also onPlayerEnters() receives the gani parameters (setani("aniname",param1,param2,...)) as function parameters.