Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- A simple legit looking smooth aimbot using LerpAngle written by BigDazGuy666
- Thanks to:
- Flapadar
- ]]
- local function gethead(ent)
- if ent:LookupBone("ValveBiped.Bip01_Head1") then
- local pos = ent:GetBonePosition(ent:GetHitBoxBone(0, 0))
- return pos
- end
- return ent:LocalToWorld(ent:OBBCenter())
- end
- local function aimbot(ucmd)
- local myang = LocalPlayer():GetAngles() //FOV checks are borrowed from FapHack
- 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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement