checkcaller
Returns true when the current thread was created by the executor rather than by the game. Use it inside a hook to tell your own calls apart from the game's.
Signature
checkcaller(): booleanReturns
boolean
Example
local old
old = hookmetamethod(game, "__index", function(self, key)
if not checkcaller() and key == "Health" then
return 100
end
return old(self, key)
end)