Advertisement
skinkillaz

anarchy script

Jul 8th, 2018
4,241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. local sprinting_speed = 90
  2. local walking_speed = 16
  3. local crouching_speed = 40
  4. make_writeable(getrawmetatable(game))
  5. local backup = getrawmetatable(game).__index
  6. local nbackup = getrawmetatable(game).__newindex
  7. local cbackup = getrawmetatable(game).__namecall
  8. getrawmetatable(game).__index = function(t,k)
  9. if k == "HeIIo" then
  10. return
  11. end
  12. if k == "WalkSpeed" then
  13. if not is_protosmasher_caller() then
  14. return 16
  15. end
  16. end
  17. if k == "HipHeight" then
  18. if not is_protosmasher_caller() then
  19. return 0
  20. end
  21. end
  22. if k == "JumpPower" then
  23. if not is_protosmasher_caller() then
  24. return 38
  25. end
  26. end
  27. if k == "Gravity" then
  28. if not is_protosmasher_caller() then
  29. return 196.2
  30. end
  31. end
  32. return backup(t,k)
  33. end
  34. getrawmetatable(game).__newindex = function(t,k,v)
  35. if k == "CFrame" then
  36. if t == game.Players.LocalPlayer.Character.HumanoidRootPart then
  37. if not is_protosmasher_caller() then
  38. return
  39. end
  40. end
  41. end
  42. if k == "Gravity" or k == "Health" then
  43. if not is_protosmasher_caller() then
  44. return
  45. end
  46. end
  47. if k == "WalkSpeed" then
  48. if not is_protosmasher_caller() then
  49. if game:service("UserInputService"):IsKeyDown(Enum.KeyCode.LeftShift) and not game:service("UserInputService"):IsKeyDown(Enum.KeyCode.S) then
  50. return nbackup(t,k,sprinting_speed)
  51. end
  52. if game:service("UserInputService"):IsKeyDown(Enum.KeyCode.LeftControl) then
  53. return nbackup(t,k,crouching_speed)
  54. end
  55. return nbackup(t,k,walking_speed)
  56. end
  57. end
  58. return nbackup(t,k,v)
  59. end
  60. getrawmetatable(game).__namecall = function(t, ...)
  61. local oof = {...}
  62. if oof[#oof] == "SetStateEnabled" or oof[#oof] == "BreakJoints" then
  63. if not is_protosmasher_caller() then
  64. return
  65. end
  66. end
  67. if oof[#oof] == "Destroy" then
  68. if t:IsA("HopperBin") then
  69. if not is_protosmasher_caller() then
  70. return
  71. end
  72. end
  73. end
  74. return cbackup(t, ...)
  75. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement