BoohbahBot v1

Posts 1–6 of 6 · Page 1 of 1
BoohbahBot v1


yes this is an actual tv show but why



Code:
local ply = LocalPlayer()
local boohbah = {}
boohbah.Target = nil
boohbah.Attacking = false

function boohbah.FindTarget()
	boohbah.Target = nil

	local idx = #player.GetAll()
	for i = 1, idx do
		local v = player.GetAll()[i]

		if !v or v == ply or !IsValid(v) or !IsEntity(v) or 0 >= v:Health() or v:IsDormant() then continue end

		local tdata = {
			start = ply:GetShootPos(), 
			endpos = v:GetAttachment(v:LookupAttachment("forward")).Pos, 
			filter = {ply, v}, 
			mask = MASK_SHOT,
		}

		local trace = util.TraceLine(tdata)
		
		if trace.Fraction == 1 then
			boohbah.Target = v
		end	
	end
end

function boohbah.Attack(cmd)
	if boohbah.Attacking then
		cmd:RemoveKey(IN_ATTACK)
		boohbah.Attacking = false
	else
		cmd:SetButtons(bit.bor(cmd:GetButtons(), IN_ATTACK))
		boohbah.Attacking = true
	end
end

function boohbah.Aimbot(cmd)
	if boohbah.Target != nil then
		local tpos = (boohbah.Target:GetAttachment(boohbah.Target:Looku  pAttachment("forward")).Pos - ply:GetShootPos()):Angle()
		cmd:SetViewAngles(tpos)
		boohbah.Attack(cmd)
	end
end

hook.Add("Think", "boohbah.FindTarget", boohbah.FindTarget)
hook.Add("CreateMove", "boohbah.Aimbot", boohbah.Aimbot)
no toggle or switch thank me for the pro codes ok bye
Quote Originally Posted by pcdriza View Post


yes this is an actual tv show but why



Code:
local ply = LocalPlayer()
local boohbah = {}
boohbah.Target = nil
boohbah.Attacking = false

function boohbah.FindTarget()
	boohbah.Target = nil

	local idx = #player.GetAll()
	for i = 1, idx do
		local v = player.GetAll()[i]

		if !v or v == ply or !IsValid(v) or !IsEntity(v) or 0 >= v:Health() or v:IsDormant() then continue end

		local tdata = {
			start = ply:GetShootPos(), 
			endpos = v:GetAttachment(v:LookupAttachment("forward")).Pos, 
			filter = {ply, v}, 
			mask = MASK_SHOT,
		}

		local trace = util.TraceLine(tdata)
		
		if trace.Fraction == 1 then
			boohbah.Target = v
		end	
	end
end

function boohbah.Attack(cmd)
	if boohbah.Attacking then
		cmd:RemoveKey(IN_ATTACK)
		boohbah.Attacking = false
	else
		cmd:SetButtons(bit.bor(cmd:GetButtons(), IN_ATTACK))
		boohbah.Attacking = true
	end
end

function boohbah.Aimbot(cmd)
	if boohbah.Target != nil then
		local tpos = (boohbah.Target:GetAttachment(boohbah.Target:Looku  pAttachment("forward")).Pos - ply:GetShootPos()):Angle()
		cmd:SetViewAngles(tpos)
		boohbah.Attack(cmd)
	end
end

hook.Add("Think", "boohbah.FindTarget", boohbah.FindTarget)
hook.Add("CreateMove", "boohbah.Aimbot", boohbah.Aimbot)
no toggle or switch thank me for the pro codes ok bye
I recognise this TV Show, I watched it as a kid a few times I think ;-;
Quote Originally Posted by snipwnage3 View Post
I recognise this TV Show, I watched it as a kid a few times I think ;-;
you've had a very bad life haven't you
Quote Originally Posted by pcdriza View Post
Code:
	local idx = #player.GetAll()
	for i = 1, idx do
		local v = player.GetAll()[i]

		if !v or v == ply or !IsValid(v) or !IsEntity(v) or 0 >= v:Health() or v:IsDormant() then continue end
...
Please stop with this.

funny thing is i bet you actually do player iterations like this. Also remember; it's slower.
Quote Originally Posted by ehex View Post
Please stop with this.

funny thing is i bet you actually do player iterations like this. Also remember; it's slower.
no dude calling player.GetAll() is faster since it will actually look for players twice
when you loose an object and you search twice, you have even more chance of finding it
maybe if player.GetAll() looses some players the second call will find them back?
Posts 1–6 of 6 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Talk with us