How do you add a visual check?
hello, i totally didn't rip this smooth aimbot off someone, but it doesn't have a visual check so it just traces everyone behind walls, looking to get it added, or just send me some speggheti. Not sure if im allowed to post a video so i no posty video.
Code:
local function aimbot(ucmd)
local myang = LocalPlayer():GetAngles()
if input.IsMouseDown(MOUSE_LEFT) then
local ply = LocalPlayer()
for k, ent in next, player.GetAll() do
if (!IsValid(ent) || ent:GetFriendStatus() == "friend" || ent:InVehicle() || ent == LocalPlayer() || !ent:Alive() || ent:IsNPC() || ent:Team() == TEAM_SPECTATOR) then
continue
end
local ang = (ent:GetPos() - LocalPlayer():GetPos()):Angle()
local angdiffy = math.abs(math.NormalizeAngle(myang.y - ang.y ))
local angdiffp = math.abs(math.NormalizeAngle(myang.p - ang.p ))
if (angdiffy < 5 and angdiffp < 5) then
local angle = (gethead(ent) - LocalPlayer():GetShootPos()):Angle()
angle.p = math.NormalizeAngle(angle.p)
angle.y = math.NormalizeAngle(angle.y)
ucmd:SetViewAngles(Lerp(0.05, ucmd:GetViewAngles(), angle))
end
end
end
end
hook.Add("CreateMove", "bot", aimbot)