Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hook.Add("Move", "gottagofast", function(ply, mov)
- if ply:GetMaxSpeedEx() and ply:IsOnGround() and ply:KeyDown(IN_SPEED) and not ply:KeyDown(IN_JUMP) and not ply:KeyDown(IN_DUCK) then
- local ang = mov:GetMoveAngles()
- local dir = Vector(0, 0, 0)
- if ply:KeyDown(IN_FORWARD) then
- dir = dir + ang:Forward() * 1
- elseif ply:KeyDown(IN_BACK) then
- dir = dir + ang:Forward() * -1
- end
- if ply:KeyDown(IN_MOVERIGHT) then
- dir = dir + ang:Right() * 1
- elseif ply:KeyDown(IN_MOVELEFT) then
- dir = dir + ang:Right() * -1
- end
- dir:Normalize()
- mov:SetVelocity(dir * ply:GetMaxSpeedEx())
- end
- end)
- local META = FindMetaTable("Player")
- AccessorFuncNW(META, "max_speed_ex", "MaxSpeedEx")
- for key, ply in pairs(player.GetAll()) do
- ply:SetMaxSpeedEx(5000)
- end
Advertisement
Add Comment
Please, Sign In to add comment