Advertisement
SigmaBoy456

hookmetamethod example #175

Sep 5th, 2024
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. -- hookmetamethod
  2. local remote = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
  3.  
  4. local namecall
  5. namecall = hookmetamethod(game, "__namecall", function(self, ...)
  6. local args = {...}
  7. local method = getnamecallmethod()
  8. if not checkcaller() and self == remote and method:lower() == "fireserver" then
  9. args[1] = "Sigma2"
  10. args[2] = "All"
  11. return namecall(self, unpack(args))
  12. end
  13. return namecall(self, ...)
  14. end)
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement