local Aimbot = function(cmd)
if (AimKey and !input.IsButtonDown(AimKey)) then return end
if (me:IsTyping() or gui.IsGameUIVisible() or !me:Alive()) then return end
local aimAng = GetTarget(cmd)
if (aimAng) then
aimAng.p = math.NormalizeAngle(aimAng.p)
aimAng.y = math.NormalizeAngle(aimAng.y)
aimAng.r = 0
aimAng = LerpAngle(AimSpeed, cmd:GetViewAngles(), aimAng)
aimAng = AddSalt(aimAng)
cmd:SetViewAngles(aimAng)
end
end
hook.Add("CreateMove", "LegitBot", Aimbot)