Jack12332

anomicbypass

Apr 5th, 2023 (edited)
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. local plr = game:GetService("Players").LocalPlayer;
  2.  
  3. local old;
  4. old = hookmetamethod(game, "__index", function(self, key)
  5. if not checkcaller() and key == "PlatformStand" and self.ClassName == "Humanoid" and self.Parent and plr.Character and self.Parent == plr.Character then -- Prevents PlatformStanding detections
  6. return false
  7. end
  8. return old(self, key)
  9. end)
  10.  
  11. game.DescendantAdded:Connect(function(d)
  12. if d.ClassName:find("Body") and plr.Character and d:IsDescendantOf(plr.Character) then
  13.  
  14. local old_idx;
  15. local old_nc;
  16.  
  17. old_idx = hookmetamethod(d, "__index", newcclosure(function(self, ...) -- Prevent indexing (checking properties, name, etc)
  18. if not checkcaller() and self == d then
  19. local s,e = pcall(old_idx, self, ...)
  20.  
  21. if not s then
  22. return error(e)
  23. end
  24. return
  25. end
  26. return old_idx(self, ...)
  27. end))
  28.  
  29. old_nc = hookmetamethod(d, "__namecall", newcclosure(function(self, ...) -- Prevent namecalling (functions)
  30. if not checkcaller() and self == d then
  31. local s,e = pcall(old_nc, self, ...)
  32.  
  33. if not s then
  34. return error(e)
  35. end
  36. return
  37. end
  38. return old_nc(self, ...)
  39. end))
  40. end
  41. end)
Add Comment
Please, Sign In to add comment