Advertisement
SigmaBoy456

getrawmetatable Example #852

Sep 5th, 2024
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. -- Metatable
  2. local mt = getrawmetatable(game)
  3. setreadonly(mt, false)
  4.  
  5. local Old = mt.__namecall
  6. mt.__namecall = newcclosure(function(self, ...)
  7. local method = getnamecallmethod()
  8. if method:lower() == "kick" then
  9. print("Game attempt to kick bypassed by Metatable")
  10. return nil
  11. end
  12. return Old(self, ...)
  13. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement