Helpaimb0t

Posts 14 of 4 · Page 1 of 1
aimb0t
please understand that I only just got back into lua (I used to make a lot of scripts for gmod but then I got banned on gmod... ) and my skills have shown degraded, but my logical skills are all still there and I can put to and to together pretty easily.

okay

I had been using a script for Gmod called Project-Dead, and after learning lua for a week, I customized it for my friends and I and we used this primarily as our cheating script. It's good and all, but its aimbot is annoying as ****. It has only one option, and that is to snap-on to ANYONE around you when aimbot was on. I hate this, and so do my friends, so after they nagged me to make it better for a month, I've finally done that.

I have got something that works a lot better than what it was before, but its set up weird (i'll explain)

Code:
hook.Add("Think","garretAimbot", function() // garret is my name just to let you know
	if GetConVarNumber("garret_aimbot") == 1 then
		if LocalPlayer():GetEyeTraceNoCursor().Entity:IsPlayer() then
			target = LocalPlayer():GetEyeTraceNoCursor().Entity
			aimbone = LocalPlayer():GetEyeTraceNoCursor().Entity:LookupBone("ValveBiped.Bip01_Head1")
			targetheadpos,targetheadang = LocalPlayer():GetEyeTraceNoCursor().Entity:GetBonePosition(aimbone)
			LocalPlayer():SetEyeAngles((targetheadpos - LocalPlayer():GetShootPos()):Angle())
		end
	end
end)
it's set up to lock on to the head once I am actually looking at the person. It will stay locked on to the person until I either turn off the aimbot or jerk my mouse away from the player. I want it to lock on via a certain FOV radius so that it is easier to lock on to people from far away. Also, in the event that someone yells at me, I DID NOT MAKE THIS... I just implemented it into a sort of script of scripts script... yeah. hell if it makes you feel better I grabbed it off that topkek script. I liked it okay. IT WAS BETTER THAN TRYING TO FIGURE OUT AN AIMBOT MYSELF

tl;dr
how do I make an aimbot lock on to people in a certain fov radius (and if you can make it work with the script I gave above that would be great as well thanks)
Quote Originally Posted by jellybeansyummy View Post
please understand that I only just got back into lua (I used to make a lot of scripts for gmod but then I got banned on gmod... ) and my skills have shown degraded, but my logical skills are all still there and I can put to and to together pretty easily.

okay

I had been using a script for Gmod called Project-Dead, and after learning lua for a week, I customized it for my friends and I and we used this primarily as our cheating script. It's good and all, but its aimbot is annoying as ****. It has only one option, and that is to snap-on to ANYONE around you when aimbot was on. I hate this, and so do my friends, so after they nagged me to make it better for a month, I've finally done that.

I have got something that works a lot better than what it was before, but its set up weird (i'll explain)

Code:
hook.Add("Think","garretAimbot", function() // garret is my name just to let you know
	if GetConVarNumber("garret_aimbot") == 1 then
		if LocalPlayer():GetEyeTraceNoCursor().Entity:IsPlayer() then
			target = LocalPlayer():GetEyeTraceNoCursor().Entity
			aimbone = LocalPlayer():GetEyeTraceNoCursor().Entity:LookupBone("ValveBiped.Bip01_Head1")
			targetheadpos,targetheadang = LocalPlayer():GetEyeTraceNoCursor().Entity:GetBonePosition(aimbone)
			LocalPlayer():SetEyeAngles((targetheadpos - LocalPlayer():GetShootPos()):Angle())
		end
	end
end)
it's set up to lock on to the head once I am actually looking at the person. It will stay locked on to the person until I either turn off the aimbot or jerk my mouse away from the player. I want it to lock on via a certain FOV radius so that it is easier to lock on to people from far away. Also, in the event that someone yells at me, I DID NOT MAKE THIS... I just implemented it into a sort of script of scripts script... yeah. hell if it makes you feel better I grabbed it off that topkek script. I liked it okay. IT WAS BETTER THAN TRYING TO FIGURE OUT AN AIMBOT MYSELF

tl;dr
how do I make an aimbot lock on to people in a certain fov radius (and if you can make it work with the script I gave above that would be great as well thanks)
ZWorld Hack has a lock on feature if you want to look at it! http://www.mpgh.net/forum/showthread.php?t=924953
trigonometry
Code:
CreateClientConVar("garret_fov", 180, true, false)

local function isPlayer(ply)
	if (ply ~= LocalPlayer() && ply:Alive() && ply:Health() >= 1 && ply:IsValid() && ply:Team() ~= TEAM_SPECTATOR) then
		return true
	end
	return false
end

local function inSight(ply)
	local FoV = GetConVarNumber("garret_fov")
	if(FoV ~= 180) then
		local eye_Ang = LocalPlayer():GetAngles()
		local Ang = (ply:GetPos() - LocalPlayer():EyePos()):Angle()
		local Yaw, Pitch = math.abs(math.NormalizeAngle(eye_Ang.y - Ang.y)), math.abs(math.NormalizeAngle(eye_Ang.p - Ang.p))
		if(Yaw > FoV || Pitch > FoV) then return false end
	end
	return true
end

local function isVisible(ply)
	local Bone = ply:LookupBone("ValveBiped.Bip01_Head1")
	local trace = { 
		start = LocalPlayer():EyePos(), 
		endpos = ply:GetBonePosition(Bone), 
		filter = LocalPlayer(), 
		mask = MASK_SHOT 
	}
	local TRes = util.TraceLine(trace)
	if (TRes.HitWorld || TRes.Entity ~= ply) then 
		return false 
	end
	return true
end

// wiki (dot) garrysmod (dot) com/page/Enums/MOUSE <-- Mouse 'bindings'
hook.Add("CreateMove", "DontPutYourActualNameInHooksDur", function(ucmd)
	if (input.IsMouseDown(107)) then
		for k, ply in next, player.GetAll() do
			if (isPlayer(ply) && isVisible(ply) && inSight(ply)) then
				local Bone = ply:LookupBone("ValveBiped.Bip01_Head1")
				local Vec = ply:GetBonePosition(Bone)
				ucmd:SetViewAngles((Vec - LocalPlayer():GetShootPos()):Angle())
			end
		end
	end
end)
Use the cvar 'garret_fov' to adjust the fov. A 'Think' hooked aimbot... Sigh.
Posts 14 of 4 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?