oth.hook
oth.hook(original: function, hook: function): function
Replaces a C closure's behaviour with a Lua function and returns a callable that still runs the original. Raises if the target is not a C closure.
Example
local old
old = oth.hook(game.HttpGet, function(self, url, ...)
print("HttpGet", url)
return old(self, url, ...)
end)