fov aimbot GetAttachment

Hey guys i was wondering if someone could make me a fov aimbot which instead of aiming at bip bones
it aim’s at GetAttachment “eyes” id love to see this in action and release to the public for everyone to use.
much appreciated :slight_smile:

no one is gonna make something for you especially an aimbot for skids to just prance around with, there are millions others out there.

Hacking is highly illegal, you should delete this before the police see it!

Here’s a really simple aimbot:

hook.Add( "Think", "TrashAimbot", function()
	local ply = LocalPlayer()
	local trace = ply:GetEyeTrace()
	if trace.HitNonWorld then
		local target = trace.Entity
		local eyes = target:GetAttachment(target:LookupAttachment("eyes"))
		if eyes ~= nil then
			ply:SetEyeAngles((eyes.Pos - ply:GetShootPos()):Angle())
end )

And here’s a really long bad one that doesn’t use GetAttachment that I made ages ago if you want to try it just for fun:

local hide = {}
local size = 100
local lethal = false
local InHitThing = false
local PrevInHitThing = false

hook.Add( "HUDPaint", "NotAimBot", function()

InHitThing = false

hide = {}

	local ply = LocalPlayer()
	local traceRes = util.TraceLine( util.GetPlayerTrace( ply ) )
	if traceRes.HitNonWorld then
		local target = traceRes.Entity
		local targetheadpos = nil
		if target:IsPlayer() or target:IsNPC() then
			if target:LookupBone("ValveBiped.Bip01_Head1") ~= nil then
				targetheadpos = target:GetBonePosition(target:LookupBone("ValveBiped.Bip01_Head1"))
				targetheadpos = target:GetPos()
			InHitThing = true
			hide = {
				CHudHealth = true,
				CHudBattery = true,
				CHudDeathNotice = true,
				CHudSecondaryAmmo = true,
				CHudAmmo = true,
				CHudMessage = true,
				CHudHintDisplay = true,
				CHudWeapon = true,
			surface.SetDrawColor( 0, 0, 0, 255 )
			surface.DrawRect( 0, 0, ScrW(), 70 )
			surface.DrawRect( 0, ScrH()-70, ScrW(), 70 )
			surface.SetDrawColor( 255, 255, 255, 255 )
			if size < 50 then
				size = 100
				if lethal then
					surface.PlaySound( 'buttons/button17.wav' )
					surface.PlaySound( 'buttons/blip1.wav' )
				size = size - 70/(ply:GetPos():Distance(target:GetPos()))
			if ply:GetPos():Distance(target:GetPos()) > 100 then
			lethal = false
			surface.DrawCircle( ScrW()/2, ScrH()/2, ply:GetPos():Distance(target:GetPos())-size, Color( 255, 0, 0, 255 ) )
			lethal = true
			surface.DrawLine( ScrW()/2 - size/2, ScrH()/2 - size/2, ScrW()/2 + size/2, ScrH()/2 + size/2 )
			surface.DrawLine( ScrW()/2 + size/2, ScrH()/2 - size/2, ScrW()/2 - size/2, ScrH()/2 + size/2 )
			surface.DrawCircle( ScrW()/2, ScrH()/2, size/2, Color( 255, 255, 255, 255 ) )
			surface.DrawOutlinedRect( ScrW()/2-size/2, ScrH()/2-size/2, size, size )
			surface.SetFont( 'CloseCaption_Bold' )
			local w = surface.GetTextSize( target:GetClass() )
			local w2 = surface.GetTextSize( 'Health: ' )
			surface.SetTextColor( Color( 255, 255, 255, 255 ) )
			surface.SetTextPos( ScrW()/2 - w/2, 25 )
			surface.DrawText( target:GetClass() )
			surface.SetTextColor( Color( 255, 0, 0, 255 ) )
			surface.SetTextPos( ScrW()/2 - w2/2, ScrH()-45 )
			surface.DrawText( 'Health: ' )
	if InHitThing and !PrevInHitThing then
		surface.PlaySound( 'buttons/lever6.wav' )
	if !InHitThing and PrevInHitThing then
		surface.PlaySound( 'buttons/button19.wav' )
	PrevInHitThing = InHitThing
end )

hook.Add( "HUDShouldDraw", "HideHUD", function( name )
	if ( hide[ name ] ) then return false end
end )

I don’t understand why you want to release an aimbot to the public though. There are so many already and they all do the same thing

all of your other posts are about your broken hack menu; what’s the point of making a hack menu if you can’t make a “hack” for it?

Why the shit did i get hate on this thread for? i needed help with a problem and its obviously about LUA. doing LookupAttachment was not made for cheats, cheats made me a better coder then when i was when i started. at least i’m learning new things everyday from hundreds of talented lua coders from around the world. i wanted help, don’t bitch and complain and try and act “cool” on a forum no one cares.

Don’t forget to always type LUA in caps so people read it like you’re shouting.

I can understand your joking and i understand that, everyone can joke once and awhile, but it just gets to a point where its not even a help and support thread if its filled with pre plebs acting like computer thugs.

[editline]21st December 2016[/editline]

Thank you so much holy shit <3 ive been looking for a basic GetAttachment aimbot, would you be able to add a convar and make it so you can change the strength on the FOV thank you so much <3

The thing I posted doesn’t actually use the FOV - it just does a trace from the screen to see if an entity is standing in the middle of it. I’m not sure how you would use the FOV… maybe someone else will

Because you are actually not getting helped here. People are doing the work for you. When someone asks me for help on a problem set we work on the problems together they don’t just say i need these problems done k thanks. While i agree people can be a little more mindful of helping newbies out MPan has a point in saying its already been done before so the least you can do is google search or search to help yourself not ask for free work.

Via google search.

Ill see if i can add a fov to it ive come up with this and legit forgot where the fuck i was at lel

local IgnoreTeam = false

function GetPos(ply)
return ply:GetAttachment(ply:LookupAttachment("eyes")).Pos

function CheckVisible(ply)
local trc = {
start = LocalPlayer():GetShootPos(),
endpos = GetPos(ply),
filter = {ply,LocalPlayer()},
mask = MASK_SHOT

local trace = util.TraceLine(trc)
return trace.Fraction == 1

function GetPlayer(fov)
local ply = LocalPlayer()

for k,v in next, player.GetAll() do
if !v then continue end
if v == ply then continue end
if !v:IsPlayer() then continue end
if v:InVehicle() then continue end
if !CheckVisible(v) then continue end
if v:Team() == TEAM_SPECTATOR then continue end
if 0 >= v:Health() then continue end
if !v:Alive() then continue end

local mang = ply:EyeAngles()
local tang = (v:GetPos() - ply:GetShootPos()):Angle()
if (math.AngleDifference(mang.x, tang.x) + math.AngleDifference(mang.y, tang.y)) > fov then continue end
return v
return nil

I’m pretty certain you didn’t come up with that.