[LUA] Better AutoStrafer
showcase: https://streamable.com/nmng24
autostrafer that automatically gain speed
have fun, it probably won't work correctly with antiaim or silent aimbot
autostrafer that automatically gain speed
have fun, it probably won't work correctly with antiaim or silent aimbot
code
Code:
local origAngle = Angle(0,0,0)
hook.Add("CreateMove","betterAutoStrafe",function(ucmd)
if(!IsValid(LocalPlayer())) then return end
if (!origAngle) then origAngle = ucmd:GetViewAngles() end
origAngle = (origAngle + Angle(ucmd:GetMouseY() * 0.023, ucmd:GetMouseX() * -0.023, 0))
origAngle.p, origAngle.y, origAngle.x = math.Clamp(origAngle.p, -89, 89), math.NormalizeAngle(origAngle.y), math.NormalizeAngle(origAngle.x)
if(ucmd:CommandNumber() == 0) then
ucmd:SetViewAngles(origAngle)
return
end
if(!input.IsKeyDown(KEY_SPACE) or LocalPlayer():IsOnGround()) then return end
ucmd:RemoveKey(IN_JUMP)
if(engine.TickCount() % 2 == 0) then
ucmd:SetSideMove(10000)
ucmd:SetViewAngles(LerpAngle(0.6,ucmd:GetViewAngle s(),Angle(0,origAngle.y + 3,0)))
else
ucmd:SetSideMove(-10000)
ucmd:SetViewAngles(LerpAngle(0.6,ucmd:GetViewAngle s(),Angle(0,origAngle.y - 3,0)))
end
end)
