Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local game_meta = getrawmetatable(game) -- metatable
- local __index = game_meta.__index -- index
- local __namecall = game_meta.__namecall -- namecall
- local hook = newcclosure(function(self,...) -- get whatever object the function was called on
- local Self = tostring(self)
- local Type = __index(self,"ClassName") -- get the object classname the function was called on
- local T = {self, ...}
- if T[1] == game.ReplicatedStorage.modules.network["playerRequest_damageEntity"] and typeof(T[2]) == "Instance" and T[4] == "monster" then -- checks if remote being called is this ^
- else
- return (Type == "RemoteEvent" and new)(self,...) -- make sure it doesnt overwrite
- end
- end)
- new = hookfunction(Instance.new("RemoteEvent").FireServer, hook, true) -- hook it true is optional, but does nothing
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement