Auto aim script made by bee_tee_gee
No virus scans needed because it's source code.
function GetTarget()
local position = LocalPlayer():EyePos()
local angle = LocalPlayer():GetAimVector()
local tar = {0,0}
for _, ent in pairs( ents.GetAll() ) do
if LocalPlayer():Alive() and WeaponCheck() and TargetCheck( ent ) and TargetVisible( ent ) and AmmoCheck() then
local targetpos = ent:EyePos()
local editor = ( targetpos - position ):Normalize()
editor = editor - angle
editor = editor:Length()
editor = math.abs( editor )
if editor < tar[2] or tar[1] == 0 then
tar = {ent, editor}
end
end
end
return tar[1]
end
local Aimed = _R["CUserCmd"].SetViewAngles
function AutoAim( UCMD )
if Aiming and WeaponCheck() then
local targ = GetTarget()
if targ == 0 then return end
local velocity = targ:GetVelocity() or Vector(0,0,0)
Aimed(UCMD, ( ( HeadPosition( targ ) + velocity * 2 * FrameTime() ) - LocalPlayer():GetShootPos() ):Angle() )
local trace = LocalPlayer():GetEyeTrace()
end
end
hook.Add("CreateMove", "Autoaim", AutoAim)
concommand.Add("at_autoaim_on", function()
Aiming = true
chat.AddText("made by bee_tee_gee")
function GetTarget()
local position = LocalPlayer():EyePos()
local angle = LocalPlayer():GetAimVector()
local tar = {0,0}
for _, ent in pairs( ents.GetAll() ) do
if LocalPlayer():Alive() and WeaponCheck() and TargetCheck( ent ) and TargetVisible( ent ) and AmmoCheck() then
local targetpos = ent:EyePos()
local editor = ( targetpos - position ):Normalize()
editor = editor - angle
editor = editor:Length()
editor = math.abs( editor )
if editor < tar[2] or tar[1] == 0 then
tar = {ent, editor}
end
end
end
return tar[1]
end
local Aimed = _R["CUserCmd"].SetViewAngles
function AutoAim( UCMD )
if Aiming and WeaponCheck() then
local targ = GetTarget()
if targ == 0 then return end
local velocity = targ:GetVelocity() or Vector(0,0,0)
Aimed(UCMD, ( ( HeadPosition( targ ) + velocity * 2 * FrameTime() ) - LocalPlayer():GetShootPos() ):Angle() )
local trace = LocalPlayer():GetEyeTrace()
end
end
hook.Add("CreateMove", "Autoaim", AutoAim)
concommand.Add("at_autoaim_on", function()
Aiming = true
chat.AddText("made by bee_tee_gee")
