Parameters
Returns
function - A backup function executing the original behavior.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
oth.hook(target: function, hook: function): function
| Parameter | Type | Description |
|---|---|---|
target | function | The target function to hook. |
hook | function | The hook callback to redirect execution to. |
function - A backup function executing the original behavior.
local oldPrint = oth.hook(print, function(...) end)
-- Print is now hooked and suppressed
local oldDestroy = oth.hook(workspace.Destroy, function(self)
print("Prevented destruction of: ", self)
end)
hookfunction detours.