Advertisement
vtrvsted

Anti-cheat (DH)

Jul 3rd, 2021
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. local sowd = getrawmetatable(game)
  2. local sucks = sowd.__namecall
  3. local player = game.Players.LocalPlayer
  4. setreadonly(sowd, false)
  5. sowd.__namecall = newcclosure(function(name, ...)
  6. local tabs = {...}
  7. if getnamecallmethod() == "FireServer" and tostring(name) == "MainEvent" then
  8. if tabs[1] == "CHECKER_1" or tabs[1] == "TeleportDetect" or tabs[1] == "OneMoreTime" then
  9. --this is the anticheat, what a shame
  10. return wait(9e9)
  11. end
  12. end
  13. return sucks(name, unpack(tabs))
  14. end)
  15. setreadonly(sowd, true)
  16.  
  17. repeat wait()
  18. local gm = getrawmetatable(game)
  19. setreadonly(gm, false)
  20. local namecall = gm.__namecall
  21. gm.__namecall =
  22. newcclosure(
  23. function(self, ...)
  24. local args = {...}
  25. if not checkcaller() and getnamecallmethod() == "FireServer" and tostring(self) == "MainEvent" then
  26. if tostring(getcallingscript()) ~= "Framework" then
  27. return
  28. end
  29. end
  30. if not checkcaller() and getnamecallmethod() == "Kick" then
  31. return
  32. end
  33. return namecall(self, unpack(args))
  34. end
  35. )
  36. until game:IsLoaded()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement