Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local sprinting_speed = 90
- local walking_speed = 16
- local crouching_speed = 40
- make_writeable(getrawmetatable(game))
- local backup = getrawmetatable(game).__index
- local nbackup = getrawmetatable(game).__newindex
- local cbackup = getrawmetatable(game).__namecall
- getrawmetatable(game).__index = function(t,k)
- if k == "HeIIo" then
- return
- end
- if k == "WalkSpeed" then
- if not is_protosmasher_caller() then
- return 16
- end
- end
- if k == "HipHeight" then
- if not is_protosmasher_caller() then
- return 0
- end
- end
- if k == "JumpPower" then
- if not is_protosmasher_caller() then
- return 38
- end
- end
- if k == "Gravity" then
- if not is_protosmasher_caller() then
- return 196.2
- end
- end
- return backup(t,k)
- end
- getrawmetatable(game).__newindex = function(t,k,v)
- if k == "CFrame" then
- if t == game.Players.LocalPlayer.Character.HumanoidRootPart then
- if not is_protosmasher_caller() then
- return
- end
- end
- end
- if k == "Gravity" or k == "Health" then
- if not is_protosmasher_caller() then
- return
- end
- end
- if k == "WalkSpeed" then
- if not is_protosmasher_caller() then
- if game:service("UserInputService"):IsKeyDown(Enum.KeyCode.LeftShift) and not game:service("UserInputService"):IsKeyDown(Enum.KeyCode.S) then
- return nbackup(t,k,sprinting_speed)
- end
- if game:service("UserInputService"):IsKeyDown(Enum.KeyCode.LeftControl) then
- return nbackup(t,k,crouching_speed)
- end
- return nbackup(t,k,walking_speed)
- end
- end
- return nbackup(t,k,v)
- end
- getrawmetatable(game).__namecall = function(t, ...)
- local oof = {...}
- if oof[#oof] == "SetStateEnabled" or oof[#oof] == "BreakJoints" then
- if not is_protosmasher_caller() then
- return
- end
- end
- if oof[#oof] == "Destroy" then
- if t:IsA("HopperBin") then
- if not is_protosmasher_caller() then
- return
- end
- end
- end
- return cbackup(t, ...)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement