CapsAdmin

Untitled

Jul 11th, 2012
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.80 KB | None | 0 0
  1. hook.Add("Move", "gottagofast", function(ply, mov)
  2.     if ply:GetMaxSpeedEx() and ply:IsOnGround() and ply:KeyDown(IN_SPEED) and not ply:KeyDown(IN_JUMP) and not ply:KeyDown(IN_DUCK) then
  3.         local ang = mov:GetMoveAngles()
  4.         local dir = Vector(0, 0, 0)
  5.                
  6.         if ply:KeyDown(IN_FORWARD) then
  7.             dir = dir + ang:Forward() * 1
  8.         elseif ply:KeyDown(IN_BACK) then
  9.             dir = dir + ang:Forward() * -1
  10.         end
  11.        
  12.         if ply:KeyDown(IN_MOVERIGHT) then
  13.             dir = dir + ang:Right() * 1
  14.         elseif ply:KeyDown(IN_MOVELEFT) then
  15.             dir = dir + ang:Right() * -1
  16.         end
  17.        
  18.         dir:Normalize()
  19.        
  20.         mov:SetVelocity(dir * ply:GetMaxSpeedEx())
  21.     end
  22. end)
  23.  
  24. local META = FindMetaTable("Player")
  25.  
  26. AccessorFuncNW(META, "max_speed_ex", "MaxSpeedEx")
  27.  
  28. for key, ply in pairs(player.GetAll()) do
  29.     ply:SetMaxSpeedEx(5000)
  30. end
Advertisement
Add Comment
Please, Sign In to add comment