Anti aim
I need help...
I'm making antiaim, but it's don't work well........
Can you help me? :/
I'm making antiaim, but it's don't work well........
Can you help me? :/
Code:
local hook = hook;
local Angle = Angle;
local Vector = Vector;
local fa;
local fb;
local math = math;
local CreateClientConVar = CreateClientConVar;
local cm = FindMetaTable"CUserCmd";
local var = CreateClientConVar("kel_spinbot", 0);
local speed = CreateClientConVar("kel_spinbot_speed", 4);
local amod = CreateClientConVar("kel_spinbot_amod", 1);
local function FixMovement(ucmd)
local move = Vector(ucmd:GetForwardMove(), ucmd:GetSideMove(), 0);
local move = (move:Angle() + ( ucmd:GetViewAngles() - fa ) ):Forward() * move:Length();
ucmd:SetForwardMove(move.x);
ucmd:SetSideMove(move.y);
end
cvars.AddChangeCallback("kel_spinbot", function()
if var:GetBool() then
hook.Add("CreateMove", "spinbot", function(ucmd) --Why is this not work?
local pa = math.random( -89, 89 )
if (!fa) then fa = ucmd:GetViewAngles() end
fa = (fa + Angle(ucmd:GetMouseY() * .023, ucmd:GetMouseX() * -.023, 0))
fa.p, fa.y, fa.x = math.Clamp(fa.p, -89, 89), math.NormalizeAngle(fa.y), math.NormalizeAngle(fa.x)
if(var:GetInt() != 1) then
LocalPlayer():SetEyeAngles(fa)
return
end
local pa = math.random( -89, 89 )
ucmd:SetViewAngles(ucmd:GetViewAngles() + Angle(pa, speed:GetInt(), 0))
FixMovement(ucmd)
end)
hook.Add("CalcView", "spinbot", function(p, o, a, f)
local view = {}
view.fov = f
view.origin = o
view.angles = fa
return view
end)
else
hook.Remove("CalcView", "spinbot")
hook.Remove("CreateMove", "spinbot")
end
end)
