Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.15 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.     return namecall(self,...)
  40. end)
  41.  
  42. metatable.__newindex = newcclosure(function(key,val,n)
  43.     if checkcaller() then
  44.         return newindex(key,val,n)
  45.     end
  46.     if key == getcharacter():WaitForChild("Humanoid") then
  47.        if val == "WalkSpeed" then
  48.             return
  49.         end
  50.         if val == "JumpPower" then
  51.             return
  52.         end
  53.         if val == "HipHeight" then
  54.             return
  55.         end
  56.         if val == "Health" then
  57.             return wait(9e9)
  58.         end
  59.    end
  60.     if getfenv(2).script.Name == "LocalScript" then
  61.         if key == getcharacter():WaitForChild("HumanoidRootPart") and val == "CFrame" or val == "Position" then
  62.             return
  63.         end
  64.         if key == getcharacter():WaitForChild("Torso") and val == "CFrame" or val == "Position" then
  65.             return
  66.         end
  67.     end
  68.     return newindex(key,val,n)
  69. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement