Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.36 KB | None | 0 0
  1. local metatable = debug.getmetatable(game)
  2. local readonly = setreadonly or make_writable
  3. local namecall = metatable.__namecall
  4. local newindex = metatable.__newindex
  5. local tableremove = table.remove
  6. readonly(metatable,false)
  7.  
  8. local function getcharacter()
  9.     game:GetService("StarterGui"):SetCore("ResetButtonCallback",true)
  10.     local char = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
  11.     return char
  12. end
  13.  
  14. metatable.__namecall = newcclosure(function(self,...)
  15.     if checkcaller() then
  16.         return namecall(self,...)
  17.     end
  18.     local args = {...}
  19.     if args[#args]:lower() == "breakjoints" or args[#args]:lower() == "setstateenabled" then
  20.         return wait(9e9)
  21.     end
  22.     if getfenv(2).script.Name:lower() == "localscript" and args[#args] == "FireServer" then
  23.         if tableremove(args) == "spd" then
  24.             return wait(9e9)
  25.         end
  26.         if tableremove(args) == "jumpheiught" then
  27.             return wait(9e9)
  28.         end
  29.         if tableremove(args) == "hipheight" then
  30.             return wait(9e9)
  31.         end
  32.         if tableremove(args) == "bork" then
  33.             return wait(9e9)
  34.         end
  35.         if tableremove(args) == "wh" then
  36.             return wait(9e9)
  37.         end
  38.     end
  39.     if getfenv(2).script.ClassName == "LocalScript" and args[#args] == "FireServer" then
  40.         if tableremove(args) == "hey" then
  41.             return
  42.         end
  43.     end
  44.     return namecall(self,...)
  45. end)
  46.  
  47. metatable.__newindex = newcclosure(function(key,val,n)
  48.     if checkcaller() then
  49.         return newindex(key,val,n)
  50.     end
  51.     if key == getcharacter():WaitForChild("Humanoid") then
  52.         if val == "WalkSpeed" then
  53.             return
  54.         end
  55.         if val == "JumpPower" then
  56.             return
  57.         end
  58.         if val == "HipHeight" then
  59.             return
  60.         end
  61.         if val == "Health" then
  62.             return wait(9e9)
  63.         end
  64.     end
  65.     if key == workspace and val == "Gravity" then
  66.         return
  67.     end
  68.     if getfenv(2).script.Name == "LocalScript" then
  69.         if key == getcharacter():WaitForChild("HumanoidRootPart") and val == "CFrame" or val == "Position" then
  70.             return
  71.         end
  72.         if key == getcharacter():WaitForChild("Torso") and val == "CFrame" or val == "Position" then
  73.             return
  74.         end
  75.     end
  76.     return newindex(key,val,n)
  77. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement