hook
The hook library allows you to add hooks called by the game engine, allowing multiple scripts to modify game function.
Methods
Add a hook to be called upon the given event occurring.
Calls all hooks associated with the given event until one returns something other than nil, and then returns that data.
In almost all cases, you should use hook. Run instead - it calls hook. Call internally but supplies the gamemode table by itself, making your code neater.
Removes the hook with the supplied identifier from the given event.
Calls all hooks associated with the given event until one returns something other than nil and then returns that data. If no hook returns any data, it will try to call the GAMEMODE:<eventName>; alternative, if one exists.
This function internally calls hook. Call.
See also: gamemode. Call - same as this, but does not call hooks if the gamemode hasn't defined the function.