--[[
db 88 88 db dP""b8 88 dP
dPYb 88 88 dPYb dP `" 88odP
dP__Yb 888888 dP__Yb Yb 88"Yb
dP""""Yb 88 88 dP""""Yb YboodP 88 Yb
]]
local attacking = 0
local function aimbotcode(cmd)
for k,v in pairs(player.GetAll()) do
if v != LocalPlayer() and (v:LookupAttachment("eyes") != 0) and v:Alive() and v:Health() > 0 then
local nothing = {}
local tracestuf = {
[ "start" ] = LocalPlayer():GetShootPos(),
[ "endpos" ] = v:GetAttachment(v:LookupAttachment("eyes")).Pos,
[ "filter" ] = LocalPlayer(),
[ "mask" ] = MASK_SHOT
}
local trace = util.TraceLine(tracestuf, nothing)
if trace.Fraction == 1 or trace.Entity == v then
aim_target = v // set this guy to aim_target
else
aim_target = nil
end
end
end
if aim_target != nil then
local TargEyePos = aim_target:GetAttachment(aim_target:LookupAttachme nt("eyes")).Pos
local AimPos = Angle(TargEyePos - EyePos(LocalPlayer()))
AimPos.p = math.NormalizeAngle(AimPos.p)
AimPos.y = math.NormalizeAngle(AimPos.y)
cmd:SetViewAngles(AimPos)
if attacking != 3 then
RunConsoleCommand("+attack")
attacking = attacking + 1
elseif attacking == 3 then
RunConsoleCommand("-attack")
attacking = 0
end
end
end
hook.Add("CreateMove", "smallaimbot", aimbotcode)
paste into Notepad.exe
inject script via cheat engine