hook.Add
Example
This will hook onto the "Think" event with the function onThink, printing to the console whenever the event occurs.
Output: "onThink has been called" repeating continuously.
Example
This works the same as above, but defines the function inside hook.Add rather than above it.
Output: "Think has been called" repeating continuously.
Example
This code demonstrates how you can add a table function with a 'self' argument, without the use of a wrapper function
Output: "CustomHook table: 0x00000000 Player [1][PotatoMan]"