InfoGarry's Mod Script Thread

Posts 76–90 of 219 · Page 6 of 15
Can anyone recommend some quality aimbots?
Quote Originally Posted by hermy11 View Post
Can anyone recommend some quality aimbots?
I have to recommend bluebots aimbot actually. Simple, effective and does what it should.
Spirit Walk - By RabidToaster
Just a code by RabidToaster. It's a client side noclip.
Commands:
sw_toggle (Toggles noclip)

Code:
local SW = {}
 
SW.Enabled = false
SW.ViewOrigin = Vector( 0, 0, 0 )
SW.ViewAngle = Angle( 0, 0, 0 )
SW.Velocity = Vector( 0, 0, 0 )
 
function SW.CalcView( ply, origin, angles, fov )
        if ( !SW.Enabled ) then return end
        if ( SW.SetView ) then
                SW.ViewOrigin = origin
                SW.ViewAngle = angles
               
                SW.SetView = false
        end
        return { origin = SW.ViewOrigin, angles = SW.ViewAngle }
end
hook.Add( "CalcView", "SpiritWalk", SW.CalcView )
 
function SW.CreateMove( cmd )
        if ( !SW.Enabled ) then return end
       
        // Add and reduce the old velocity.
        local time = FrameTime()
        SW.ViewOrigin = SW.ViewOrigin + ( SW.Velocity * time )
        SW.Velocity = SW.Velocity * 0.95
       
        // Rotate the view when the mouse is moved.
        local sensitivity = 0.022
        SW.ViewAngle.p = math.Clamp( SW.ViewAngle.p + ( cmd:GetMouseY() * sensitivity ), -89, 89 )
        SW.ViewAngle.y = SW.ViewAngle.y + ( cmd:GetMouseX() * -1 * sensitivity )
       
        // What direction we're going to move in.
        local add = Vector( 0, 0, 0 )
        local ang = SW.ViewAngle
        if ( cmd:KeyDown( IN_FORWARD ) ) then add = add + ang:Forward() end
        if ( cmd:KeyDown( IN_BACK ) ) then add = add - ang:Forward() end
        if ( cmd:KeyDown( IN_MOVERIGHT ) ) then add = add + ang:Right() end
        if ( cmd:KeyDown( IN_MOVELEFT ) ) then add = add - ang:Right() end
        if ( cmd:KeyDown( IN_JUMP ) ) then add = add + ang:Up() end
        if ( cmd:KeyDown( IN_DUCK ) ) then add = add - ang:Up() end
       
        // Speed.
        add = add:GetNormal() * time * 500
        if ( cmd:KeyDown( IN_SPEED ) ) then add = add * 2 end
       
        SW.Velocity = SW.Velocity + add
       
        // This stops us looking around crazily while spiritwalking.
        if ( SW.LockView == true ) then
                SW.LockView = cmd:GetViewAngles()
        end
        if ( SW.LockView ) then
                cmd:SetViewAngles( SW.LockView )
        end
       
        // This stops us moving while spiritwalking.
        cmd:SetForwardMove( 0 )
        cmd:SetSideMove( 0 )
        cmd:SetUpMove( 0 )
end
hook.Add( "CreateMove", "SpiritWalk", SW.CreateMove )
 
function SW.Toggle()
        SW.Enabled = !SW.Enabled
        SW.LockView = SW.Enabled
        SW.SetView = true
       
        local status = { [ true ] = "ON", [ false ] = "OFF" }
        print( "SpiritWalk " .. status[ SW.Enabled ] )
end
concommand.Add( "sw_toggle", SW.Toggle )
 
concommand.Add( "sw_pos", function() print( SW.ViewOrigin ) end )


---------- Post added at 10:08 PM ---------- Previous post was at 10:05 PM ----------

A shitty hitmarker from pastebin.
Not made by me. Probably copied from some shitty hack.
Code:
function Hitmarker()
local MYEYES = LocalPlayer():GetEyeTrace().Entity
local me = LocalPlayer()
if MYEYES:IsPlayer() then
if me:Health() > 0 then
if me:KeyDown(IN_ATTACK) then
if me:GetActiveWeapon():Clip1() > 0 then

surface.SetDrawColor( 255 , 255 , 255 , 255 )
surface.DrawLine(ScrW() / 2 - 5 , ScrH() / 2 - 5 , ScrW() / 2 - 15 , ScrH() / 2 - 15)
surface.DrawLine(ScrW() / 2 + 5 , ScrH() / 2 + 5 , ScrW() / 2 + 15, ScrH() / 2 + 15)
surface.DrawLine(ScrW() / 2 + 5 , ScrH() / 2 - 5 , ScrW() / 2 + 15 , ScrH() / 2 - 15)
surface.DrawLine(ScrW() / 2 - 5 , ScrH() / 2 + 5 , ScrW() / 2 - 15 , ScrH() / 2 + 15)
    end
    end
    end
    end
    end

hook.Add("HUDPaint","wtfisthisshittyhitmarker",Hitmarker)


---------- Post added at 10:10 PM ---------- Previous post was at 10:08 PM ----------

Yes, this has been posted before but still, really basic speedhack.
Also, not by me.

Code:
bind "e" "+use;speed.toggle"
alias "speed.toggle" "speed.on"
alias "speed.on" "host_framerate 8; alias speed.toggle speed.off"
alias "speed.off" "host_framerate 0; alias speed.toggle speed.on"
rate "25000"
cl_cmdrate "66"
cl_updaterate "66"
Save it as an autoexecutable CFG, you will need a bypasser for the host_framerate to operate correctly.
It feels like some have been duplicates now.
the speedhack is from x22 and I'm sure I've posted it before.
As well as SW. Anyhow, I guess there's no harm in that since I can't remember where I did.
ViewAll By RabidToaster
Another simple wallhack, shows entities and players through walls. Nothing more than that.
By RabidToaster.
Code:
// ViewAll by Rabid Toaster.
if SERVER then return end

local VA = {}

-- todo: not this
do
	local PANEL = {}
	function PANEL:Init()
		self.ConVars = {}
		self.Options = {}
	end
	function PANEL:AddOption( strName, tabConVars )
		self:AddChoice( strName, tabConVars )
		for k, v in pairs( tabConVars ) do
			self.ConVars[ k ] = 1
		end
	end
	function PANEL:OnSelect( index, value, data )
		for k, v in pairs( data ) do
			RunConsoleCommand( k, v )
		end
	end
	function PANEL:Think( CheckConvarChanges )
		self:CheckConVarChanges()
	end
	function PANEL:ConVarsChanged()
		for k, v in pairs( self.ConVars ) do
			if ( self[ k ] == nil ) then return true end
			if ( self[ k ] != GetConVarString( k ) ) then return true end
		end
		return false
	end
	function PANEL:CheckForMatch( cvars )
		if ( table.Count( cvars ) == 0 ) then return false end
		for k, v in pairs( cvars ) do
			if ( tostring(v) != GetConVarString( k ) ) then 
				return false 
			end
		end
		return true
	end
	function PANEL:CheckConVarChanges()
		if (!self:ConVarsChanged()) then return end
		for k, v in pairs( self.ConVars ) do
			self[ k ] = GetConVarString( k )
		end
		for k, v in pairs( self.Data ) do
			if ( self:CheckForMatch( v ) ) then
				self:SetText( self:GetOptionText(k) )
				return
			end
		end
	end
	PANEL.Base = "DComboBox"
	
	VA.CtrlListBox = PANEL
end

do
	local hooks = {}
	local created = {}
	local function CallHook(self, name, args)
		if !hooks[name] then return end
		for funcName, _ in pairs(hooks[name]) do
			local func = self[funcName]
			if func then
				local ok, err = pcall(func, self, unpack(args or {}))
				if !ok then
					ErrorNoHalt(err .. "\n")
				elseif err then
					return err
				end
			end
		end
	end
	local function AddHook(self, name, funcName)
		// If we haven't got a hook for this yet, make one with a random name and store it.
		// This is so anti-cheats can't detect by hook name, and so we can remove them later.
		if !created[name] then
			local random = ""
			for i = 1, math.random(4, 10) do
				local c = math.random(65, 116)
				if c >= 91 && c <= 96 then c = c + 6 end
				random = random .. string.char(c)
			end
				
			hook.Add(name, random, function(...) CallHook(self, name, {...}) end)
			created[name] = random
		end
		
		hooks[name] = hooks[name] or {}
		hooks[name][funcName] = true
	end
	
	// Don't let other scripts remove our hooks.
	local oldRemove = hook.Remove
	function hook.Remove(name, unique)
		if created[name] == unique then return end
		oldRemove(name, unique)
	end
	
	// Removes all hooks, useful if reloading the script.
	local function RemoveHooks()
		for hookName, unique in pairs(created) do
			oldRemove(hookName, unique)
		end
	end
	
	// Add copies the script can access.
	VA.AddHook = AddHook
	VA.CallHook = CallHook
	VA.RemoveHooks = RemoveHooks
end

concommand.Add("va_reload", function()
	VA:CallHook("Shutdown")
	print("Removing hooks...")
	VA:RemoveHooks()
	
	local info = debug.getinfo(1, "S")
	if info && info.short_src then
		print("Reloading (" .. info.short_src .. ")...")
		include(info.short_src)
	else
		print("Cannot find ViewAll file, reload manually.")
	end
end)
print("ViewAll loaded.")

do
	local settings = {}
	local function SettingVar(self, name)
		return (self.SettingPrefix or "") .. string.lower(name)
	end
	
	local function RandomName()
		local random = ""
		for i = 1, math.random(4, 10) do
			local c = math.random(65, 116)
			if c >= 91 && c <= 96 then c = c + 6 end
			random = random .. string.char(c)
		end
		return random
	end
	
	local function SetSetting(name, _, new)
		if !settings[name] then return end
		local info = settings[name]
		
		if info.Type == "number" then
			new = tonumber(new)
		elseif info.Type == "boolean" then
			new = (tonumber(new) or 0) > 0
		end
		
		info.Value = new
	end
	
	local function CreateSetting(self, name, desc, default, misc)
		local cvar = SettingVar(self, name)
		local info = {Name = name, Desc = desc, CVar = cvar, Type = type(default), Value = default}
		
		for k, v in pairs(misc or {}) do
			if !info[k] then info[k] = v end
		end
		
		// Convert default from boolean to number.
		if type(default) == "boolean" then
			default = default and 1 or 0
		end
		
		if !settings[cvar] then
			local tab = cvars.GetConVarCallbacks(cvar)
			if !tab then
				cvars.AddChangeCallback(cvar, function() end)
				tab = cvars.GetConVarCallbacks(cvar)
			end
			
			while true do
				local name = RandomName()
				if !tab[name] then
					tab[name] = SetSetting
					info.Callback = name
					break
				end
			end
		end
		
		settings[cvar] = info
		settings[#settings + 1] = info
		
		// Create the convar.
		CreateClientConVar(cvar, default, (info.Save != false), false)
		SetSetting(cvar, _, GetConVarString(cvar))
	end
	local function GetSetting(self, name)
		local cvar = SettingVar(self, name)
		if !settings[cvar] then return end
		return settings[cvar].Value
	end
	local function Shutdown()
		print("Removing settings callbacks...")
		for _, info in ipairs(settings) do
			if info.CVar && info.Callback then
				local tab = cvars.GetConVarCallbacks(info.CVar)
				if tab then
					tab[info.Callback] = nil
				end
			end
		end
	end
	local function SettingsList()
		return table.Copy(settings)
	end
	local function BuildMenu(self, panel)
		for _, info in ipairs(settings) do
			if info.Show != false then
				if info.MultiChoice then
					local ctrl = vgui.CreateFromTable(VA.CtrlListBox, panel)
					for k, v in pairs(info.MultiChoice) do
						ctrl:AddOption(k, {[info.CVar] = v})
					end
					
					local left = vgui.Create("DLabel", self)
					left:SetText(info.Desc or info.CVar)
					left:SetDark(true)
					ctrl:SetHeight(25)
					ctrl:Dock(TOP)
			
					panel:AddItem(left, ctrl)
				elseif info.Type == "number" then
					panel:NumSlider(info.Desc or info.CVar, info.CVar, info.Min or -1, info.Max or -1, info.Places or 0)
				elseif info.Type == "boolean" then
					panel:CheckBox(info.Desc or info.CVar, info.CVar)
				elseif info.Type == "string" then
					panel:TextEntry(info.Desc or info.CVar, info.CVar)
				end
			end
		end
	end
	
	VA.SettingPrefix = "va_"
	VA.CreateSetting = CreateSetting
	VA.Setting = GetSetting
	VA.SettingsList = SettingsList
	VA.BuildMenu = BuildMenu
	
	VA.SettingsShutdown = Shutdown
	VA:AddHook("Shutdown", "SettingsShutdown")
end

VA:CreateSetting("updatedelay", "Target update delay", 1, {Min = 0, Max = 5})
VA:CreateSetting("enabled", "Enabled", true)
VA:CreateSetting("fullbright", "Fullbright", true)
VA:CreateSetting("nodraw", "NoDraw entities to increase performance", false)
VA:CreateSetting("showfriendlies", "Draw members of your own team", true)
VA:CreateSetting("heldweapons", "Draw held weapons", true)
VA:CreateSetting("weapons", "Draw dropped weapons", true)
VA:CreateSetting("items", "Draw items", true)
VA:CreateSetting("ragdolls", "Draw ragdolls", true)
VA:CreateSetting("dangerous", "Draw dangerous items", true)

// ##################################################
// Targeting
// ##################################################

VA.DeathSequences = {
	["models/barnacle.mdl"] = {4, 15};
	["models/antlion_guard.mdl"] = {44};
	["models/hunter.mdl"] = {124, 125, 126, 127, 128};
}
VA.DangerousItems = {
	["npc_grenade_frag"] = true; // Normal grenades.
	["npc_satchel"] = true; // SLAM mines.
	["npc_tripmine"] = true; // SLAM tripwires.
	["rpg_missile"] = true; // RPG rockets.
	["crossbow_bolt"] = true; // Crossbow bolts...
	["grenade_ar2"] = true; // SMG grenades.
}
VA.EnemyNPCs = {
	["npc_headcrab"] = true;
	["npc_antlionguard"] = true;
	["npc_zombie"] = true;
	["npc_zombine"] = true;
	["npc_antlion_worker"] = true;
	["npc_metropolice"] = true;
	["npc_fastzombie_torso"] = true;
	["npc_combine_s"] = true;
	["npc_zombie_torso"] = true;
	["npc_rollermine"] = true;
	["npc_turret_floor"] = true;
	["npc_barnacle"] = true;
	["npc_poisonzombie"] = true;
	["npc_manhack"] = true;
	["npc_antlion"] = true;
	["npc_headcrab_black"] = true;
	["npc_headcrab_poison"] = true;
	["npc_fastzombie"] = true;
	["npc_combine_s"] = true;
	["npc_hunter"] = true;
	["npc_headcrab_fast"] = true;
	["npc_combine_s"] = true;
	["npc_cscanner"] = true;
	["npc_strider"] = true;
}

function VA:TargetInfo(ent)
	if !IsValid(ent) then return end
	local ply = LocalPlayer()
	if !IsValid(ply) then return end	
		
	local class = ent:GetClass()
	
	if ent:IsPlayer() then
		if ent:Alive() == false then return end
		if ply:Team() == ent:Team() && !self:Setting("showfriendlies") then return end
		
		local col = team.GetColor(ent:Team())
		
		local name = team.GetName(ent:Team())
		if name == "Spectator" then
			col.a = 64
		end
		
		return true, col
	end
	if ent:IsNPC() then
		if ent:GetMoveType() == MOVETYPE_NONE then return end
		if ent.IsDead then return end

		local model = string.lower(ent:GetModel() or "")
		if self.DeathSequences[model] then
			if table.HasValue(self.DeathSequences[model], ent:GetSequence()) then return end
		end
		
		if self.EnemyNPCs[class] then
			return true, Color(255, 0, 0)
		else
			return true, Color(0, 255, 0)
		end
	end
	if ent:IsWeapon() then
		if IsValid(ent:GetOwner()) then
			if self:Setting("heldweapons") then
				return self:TargetInfo(ent:GetOwner()), nil
			end
		else
			return self:Setting("weapons"), nil, true
		end
		
		return true
	end
	
	if self:Setting("items") then
		if string.find(class, "item") then
			return true
		end
	end
	
	if self:Setting("ragdolls") then
		if class == "prop_ragdoll" || class == "class C_ClientRagdoll" then
			return true, Color(255, 255, 0)
		end
	end
	
	if self:Setting("dangerous") then
		if self.DangerousItems[class] then
			return true, Color(255, 0, 0)
		end
	end
end
function VA:TargetCreated(ent)
	if !IsValid(ent) then return end
	
	local pass, colour, prop = self:TargetInfo(ent)
	if pass == true then
		self:AddTarget(ent, colour, prop)
	elseif self:IsNoDraw(ent:GetOwner()) then
		self:SetNoDraw(ent, false)
	end
	
	if ent:GetClass() == "raggib" then
		local owner = ent:GetOwner()
		if IsValid(owner) && owner:GetModel() != "models/zombie/classic_torso.mdl" then // They're a torso, not dead.
			owner.IsDead = true
		end
	end
end
VA:AddHook("OnEntityCreated", "TargetCreated")

VA.Targets = {}
VA.LastFindTargets = 0
local targets
function VA:FindTargets()
	if !self:Enabled() then return end
	
	if CurTime() < self.LastFindTargets + self:Setting("updatedelay") then return end
	self.LastFindTargets = CurTime()
		
	targets = {}
	for _, ent in pairs(ents.GetAll()) do
		local pass, colour, prop = self:TargetInfo(ent)
		if pass == true then
			targets[ent] = {colour or Color(255, 255, 255), prop == true}
		end
	end
	
	for targ, _ in pairs(self.Targets) do
		if IsValid(targ) && !targets[targ] then
			self:RemoveTarget(ent)
		end
	end
	
	self.Targets = targets
end
VA:AddHook("Think", "FindTargets")

function VA:AddTarget(ent, colour, prop)
	self.Targets[ent] = {colour or Color(255, 255, 255), prop == true}
end
function VA:RemoveTarget(ent)
	if !ent then return end
	if self:UseNoDraw() then
		self:SetNoDraw(ent, false)
	end
	self.Targets[ent] = nil
end

function VA:GetTargets()
	return self.Targets
end

// ##################################################
// Materials
// ##################################################

VA.Materials = {}
VA.MaterialNames = {}

VA:CreateSetting("material", "Material", "wireframe", {MultiChoice = VA.MaterialNames})

function VA:GetMaterial()
	local name = string.lower(self:Setting("material"))
	return self.Materials[name]
end
function VA:AddMaterial(name, base, shader)
	if !shader then shader = "VertexLitGeneric" end
	name = string.lower(name)
	
	local mat = CreateMaterial("viewall_" .. name, shader, {
		["$basetexture"] = base,
		["$ignorez"] = 1
	})
	self.Materials[name] = mat
	self.MaterialNames[name] = name
end
function VA:GetMaterialList()
	return self.Materials
end

VA:AddMaterial("solid", "models/debug/debugwhite")
VA:AddMaterial("wireframe", "models/wireframe", "Wireframe")

// ##################################################
// Rendering
// ##################################################

local targets, colour, Draw
function VA:RenderTargets()
	if !self:Enabled() then return end
	
	targets = self:GetTargets()
	//if #targets == 0 then return end
	
	local mat = self:GetMaterial(matName)
	
	// NoDraw to save drawing, and weed out invalid entities.
	local pass
	for ent, info in pairs(targets) do
		pass = self:TargetInfo(ent)
		if pass then
			if self:UseNoDraw() then
				self:SetNoDraw(ent, true)
			end
		else
			self:RemoveTarget(ent)
		end
	end
	
	local fullbright = self:Setting("fullbright")
	if fullbright then
		render.SuppressEngineLighting(true)
	end
	
	function Draw(ent, r, g, b, a, prop)
		render.SetColorModulation(r / 255, g / 255, b / 255)
		render.SetBlend(a / 255)
		
		if prop && IsValid(self.Prop) then
			self.Prop:SetModel("models/error.mdl")
			self.Prop:SetModel(ent:GetModel())
			self.Prop:SetPos(ent:GetPos())
			self.Prop:SetAngles(ent:GetAngles())
			
			self.Prop:DrawModel()
		else
			ent:DrawModel()
		end
	end
	
	cam.Start3D(EyePos(), EyeAngles())
		if mat != nil then
			render.MaterialOverride(mat)
			for ent, info in pairs(targets) do
				Draw(ent, info[1]["r"], info[1]["g"], info[1]["b"], info[1]["a"], info[2])
			end
			render.MaterialOverride(nil)
		end
		local r, g, b
		for ent, info in pairs(targets) do
			c = ent:GetColor()
			Draw(ent, c.r, c.g, c.b, info[1]["a"], info[2])
		end
	cam.End3D()
	
	render.SetBlend(1)
	
	if fullbright then
		render.SuppressEngineLighting(false)
	end
end
VA:AddHook("RenderScreenspaceEffects", "RenderTargets")

function VA:CreateProp()
	if !IsValid(self.Prop) then
		self.Prop = ents.CreateClientProp()
		self.Prop:SetNoDraw(true)
		self.Prop:Spawn()
	end
end
VA:AddHook("Think", "CreateProp")

function VA:Enabled()
	return self:Setting("enabled")
end

VA.NoDraw = {}
function VA:SetNoDraw(ent, bool)
	if !IsValid(ent) then return end
	if bool then
		ent:SetRenderMode(RENDERMODE_NONE)
		self.NoDraw[ent] = true
	else
		ent:SetRenderMode(RENDERMODE_NORMAL)
		self.NoDraw[ent] = nil
	end
end
function VA:IsNoDraw(ent)
	return self.NoDraw[ent] == true
end
function VA:UseNoDraw()
	return self:Setting("nodraw")
end

function VA:OpenMenu()
	local w, h = ScrW() / 3, ScrH() / 2

	local menu = vgui.Create("DFrame")
	menu:SetTitle("VA")
	menu:SetSize(w, h)
	menu:Center()
	menu:MakePopup()

	local scroll = vgui.Create("DPanelList", menu)
	scroll:SetPos(5, 25)
	scroll:SetSize(w - 10, h - 30)
	scroll:EnableVerticalScrollbar()

	local form = vgui.Create("DForm", menu)
	form:SetName("")
	form.Paint = function() end
	scroll:AddItem(form)

	self:BuildMenu(form)

	if VA.Menu then VA.Menu:Remove() end
	VA.Menu = menu
end
concommand.Add("va_menu", function() VA:OpenMenu() end)

function VA:RegisterMenu()
	spawnmenu.AddToolMenuOption("Options", "Hacks", "VA", "VA", "", "", function(p) self:BuildMenu(p) end)
end
VA:AddHook("PopulateToolMenu", "RegisterMenu")
Dosent works on some servers. I plaid on 1 server and the moment I started the hack it said "?????? Is a dirty cheater!" Here is the IP 208.146.44.19:27015

And from now on when I attempt to join the server my gmod crashes
Quote Originally Posted by lior784 View Post
Dosent works on some servers. I plaid on 1 server and the moment I started the hack it said "?????? Is a dirty cheater!" Here is the IP 208.146.44.19:27015

And from now on when I attempt to join the server my gmod crashes
they had an anticheat and banned you i thinbk
Quote Originally Posted by lior784 View Post
Dosent works on some servers. I plaid on 1 server and the moment I started the hack it said "?????? Is a dirty cheater!" Here is the IP 208.146.44.19:27015

And from now on when I attempt to join the server my gmod crashes
You said it doesn't work on serverS, and you tried it on one? Obviously the server had an anti cheat, would you mind naming which script you used?
And it does work, just not on the 1 server you tried it on.
A little entity finder i made.

The left list shows the entity classes you're looking for, the right list shows all the other entity classes on the map. Double click on either list to move the item to the other list.

http://i.imgur.com/nuJg2V3.jpg

Code:
//Toggle command
local showing = true

concommand.Add("ShowEnts", function()
	if showing then
		showing = false
	else
		showing = true
	end
end)

//Everything menu related
local EntsToShow = {}
local OtherEnts = {}

concommand.Add("ShowHXMenu", function(ply, cmd, args)
	function Reload(startX, startY)
		table.Empty(OtherEnts)
		for k,v in pairs(ents.GetAll()) do
			local addToAllEnts = true
			
			for i,p in pairs(EntsToShow) do
				if p == v:GetClass() then
					addToAllEnts = false
				end
			end
			
			for i,p in pairs(OtherEnts) do
				if p == v:GetClass() then
					addToAllEnts = false
				end
			end
			
			if addToAllEnts then
				table.insert(OtherEnts, v:GetClass())
			end
		end

		local main = vgui.Create( "DFrame" )
		main:SetSize( 400, 250 )
		if startX and startY then
			main:SetPos(startX, startY)
		else
			main:Center()
		end
		main:SetTitle( "" )
		main:SetVisible( true )
		main:SetDraggable( true )
		main:ShowCloseButton( true )
		main:MakePopup()
		main.Paint = function()
			drawRoundedBox( 8, 0, 0, main:GetWide(), main:GetTall(), Color( 0, 0, 0, 150 ) )
		end
		
		DermaList = vgui.Create( "DPanelList", main )
		DermaList:SetPos( 25,25 )
		DermaList:SetSize( 700, 500 )
		DermaList:SetSpacing( 75 )
		DermaList:EnableHorizontal( false )
		DermaList:EnableVerticalScrollbar( true )
		
		local SelectedEnts = vgui.Create("DListView")
		SelectedEnts:SetSize(150, 200)
		SelectedEnts:SetPos(0, 0)
		SelectedEnts:SetMultiSelect(false)
		SelectedEnts:AddColumn("Ents to show")
		for k,v in pairs(EntsToShow) do
			SelectedEnts:AddLine(v)
		end
		SelectedEnts.DoDoubleClick = function(parent, index, list)
			table.remove(EntsToShow, index)
			main:Close()
			local x, y = main:GetPos()
			Reload(x, y)
		end
		DermaList:Add(SelectedEnts)
		
		local AllEnts = vgui.Create("DListView")
		AllEnts:SetSize(150, 200)
		AllEnts:SetPos(200, 0)
		AllEnts:SetMultiSelect(false)
		AllEnts:AddColumn("Ents not to show")
		for k,v in pairs(OtherEnts) do
			AllEnts:AddLine(v)
		end
		AllEnts.DoDoubleClick = function(parent, index, list)
			table.insert(EntsToShow, OtherEnts[index])
			main:Close()
			local x, y = main:GetPos()
			Reload(x, y)
		end
		DermaList:Add(AllEnts)
	end
	Reload()
end)

//Actually drawing information
hook.Add("HUDPaint", "ShowEnts", function()
	if showing then
		for k,v in pairs(ents.GetAll()) do
			local drawing = false
			
			for i,p in pairs(EntsToShow) do
				if v:GetClass() == p then
					drawing = true
				end
			end
			
			if drawing then
				local stuff = v:GetPos():ToScreen()
				
				surface.SetTextPos( stuff.x - 15, stuff.y ) 
				surface.SetFont("default")
				local text = v:GetClass()
				surface.DrawText( text )
				
				local Width, Height = surface.GetTextSize(text)
				
				surface.SetDrawColor( 255, 0, 0, 255)
				surface.DrawOutlinedRect( stuff.x - 20, stuff.y, Width + 10, Height + 5)
			end
		end
	end
end)
ShowEnts is the command to toggle on/off.
ShowHXMenu is the command to open the menu.
Quote Originally Posted by Atheon View Post
A little entity finder i made.

The left list shows the entity classes you're looking for, the right list shows all the other entity classes on the map. Double click on either list to move the item to the other list.

http://i.imgur.com/nuJg2V3.jpg

Code:
//Toggle command
local showing = true

concommand.Add("ShowEnts", function()
	if showing then
		showing = false
	else
		showing = true
	end
end)

//Everything menu related
local EntsToShow = {}
local OtherEnts = {}

concommand.Add("ShowHXMenu", function(ply, cmd, args)
	function Reload(startX, startY)
		table.Empty(OtherEnts)
		for k,v in pairs(ents.GetAll()) do
			local addToAllEnts = true
			
			for i,p in pairs(EntsToShow) do
				if p == v:GetClass() then
					addToAllEnts = false
				end
			end
			
			for i,p in pairs(OtherEnts) do
				if p == v:GetClass() then
					addToAllEnts = false
				end
			end
			
			if addToAllEnts then
				table.insert(OtherEnts, v:GetClass())
			end
		end

		local main = vgui.Create( "DFrame" )
		main:SetSize( 400, 250 )
		if startX and startY then
			main:SetPos(startX, startY)
		else
			main:Center()
		end
		main:SetTitle( "" )
		main:SetVisible( true )
		main:SetDraggable( true )
		main:ShowCloseButton( true )
		main:MakePopup()
		main.Paint = function()
			drawRoundedBox( 8, 0, 0, main:GetWide(), main:GetTall(), Color( 0, 0, 0, 150 ) )
		end
		
		DermaList = vgui.Create( "DPanelList", main )
		DermaList:SetPos( 25,25 )
		DermaList:SetSize( 700, 500 )
		DermaList:SetSpacing( 75 )
		DermaList:EnableHorizontal( false )
		DermaList:EnableVerticalScrollbar( true )
		
		local SelectedEnts = vgui.Create("DListView")
		SelectedEnts:SetSize(150, 200)
		SelectedEnts:SetPos(0, 0)
		SelectedEnts:SetMultiSelect(false)
		SelectedEnts:AddColumn("Ents to show")
		for k,v in pairs(EntsToShow) do
			SelectedEnts:AddLine(v)
		end
		SelectedEnts.DoDoubleClick = function(parent, index, list)
			table.remove(EntsToShow, index)
			main:Close()
			local x, y = main:GetPos()
			Reload(x, y)
		end
		DermaList:Add(SelectedEnts)
		
		local AllEnts = vgui.Create("DListView")
		AllEnts:SetSize(150, 200)
		AllEnts:SetPos(200, 0)
		AllEnts:SetMultiSelect(false)
		AllEnts:AddColumn("Ents not to show")
		for k,v in pairs(OtherEnts) do
			AllEnts:AddLine(v)
		end
		AllEnts.DoDoubleClick = function(parent, index, list)
			table.insert(EntsToShow, OtherEnts[index])
			main:Close()
			local x, y = main:GetPos()
			Reload(x, y)
		end
		DermaList:Add(AllEnts)
	end
	Reload()
end)

//Actually drawing information
hook.Add("HUDPaint", "ShowEnts", function()
	if showing then
		for k,v in pairs(ents.GetAll()) do
			local drawing = false
			
			for i,p in pairs(EntsToShow) do
				if v:GetClass() == p then
					drawing = true
				end
			end
			
			if drawing then
				local stuff = v:GetPos():ToScreen()
				
				surface.SetTextPos( stuff.x - 15, stuff.y ) 
				surface.SetFont("default")
				local text = v:GetClass()
				surface.DrawText( text )
				
				local Width, Height = surface.GetTextSize(text)
				
				surface.SetDrawColor( 255, 0, 0, 255)
				surface.DrawOutlinedRect( stuff.x - 20, stuff.y, Width + 10, Height + 5)
			end
		end
	end
end)
ShowEnts is the command to toggle on/off.
ShowHXMenu is the command to open the menu.
Saved it as Entity.lua

lua_openscript entity.lua and ran showhxmenu.

I get this

[ERROR] lua/entity.lua:39: attempt to index global 'vgui' (a nil value)
1. Reload - lua/entity.lua:39
2. unknown - lua/entity.lua:94
3. unknown - lua/includes/modules/concommand.lua:69
Quote Originally Posted by naruske View Post
Saved it as Entity.lua

lua_openscript entity.lua and ran showhxmenu.

I get this

[ERROR] lua/entity.lua:39: attempt to index global 'vgui' (a nil value)
1. Reload - lua/entity.lua:39
2. unknown - lua/entity.lua:94
3. unknown - lua/includes/modules/concommand.lua:69
Use lua_openscript_cl instead of lua_openscript.

And you're going to have to fix a few spots in the code where i wrote drawRoundedBox before this will work. Replace drawRoundedBox with draw[dot]RoundedBox ([dot] is not literally [dot]...replace it with a .)
Quote Originally Posted by Atheon View Post
Use lua_openscript_cl instead of lua_openscript.

And you're going to have to fix a few spots in the code where i wrote drawRoundedBox before this will work. Replace drawRoundedBox with draw[dot]RoundedBox ([dot] is not literally [dot]...replace it with a .)
when i toggle it and open the menu to put printers to find, it doesn't show them through walls or give me the name when i look at it... help

Nvm works. it automaticly enables when i load lua.
ATM Hacker
Money stealer I posted a while ago but got deleted. Not going to risk a ban again so I'll just provide the script.

Description: Note: Works only on some servers using the darkrp atm addon, some servers fixed this exploit already.

To steal money from a specific person, run this console command: atm_getmoney [name of person] [amount of money you want to steal]
(this was made by a facepunch user)

To steal money from every account, run this console command: atm_takemoney [amound of money you want to take from every account]
(made by me, but based off of the above)

Errors will appear.

Credits: Random facepunch user + me

Code:
concommand.Add( "atm_getmoney", function(ply, cmd, args)

	local name = args[1]
	local money = args[2]

	if not money or not name then
		chat.AddText( nil, cmd.." name money" )
		return
	end

	local vict
	for k,v in pairs(player.GetAll()) do
		if string.find( v:Nick(), name ) then
			vict = v
			break
		end
	end

	if not IsValid(vict) then
		chat.AddText( nil, "No player found with "..name.." in their name." )
                return
	end

	chat.AddText( nil, "Attempting to take $"..money.." from "..vict:Nick().."." )
	RunConsoleCommand( "rp_atm_withdraw", "", vict:UniqueID(), money )

end )

concommand.Add("atm_takemoney", function(players, command, args)
	for k, v in pairs(player.GetAll()) do
		RunConsoleCommand("atm_getmoney", ""..v:GetName().."", args[1])
	end
end)
omg thank you mad yet :3 just what i needed
Advanced Crosshair 1.0
First version of an Advanced crosshair I made.
Checks if you are aiming at a player, shows their health and has a build in hitmarker.
I have more features (such as warning you if a player is aiming a weapon at you) planned for the future so check https://github.com/LennyPenny/Lennys...vcrosshair.lua for the latest version.

Here is 1.0 anyway:

Code:
CreateClientConVar("lenny_advcrosshair", 1, true, false)
CreateClientConVar("lenny_advcrosshair_hitmarker", 1, true, false)
CreateClientConVar("lenny_advcrosshair_info", 1, true, false)


function advcrosshair()
	if GetConVarNumber("lenny_advcrosshair") == 1 then
		local x = ScrW() / 2
		local y = ScrH() / 2
		target = LocalPlayer():GetEyeTrace().Entity
		if LocalPlayer():Alive() and LocalPlayer():GetActiveWeapon():IsValid() and (target:IsPlayer() or target:IsNPC()) then
			crosscolor = Color(220,60,90, 150)
			surface.SetDrawColor(crosscolor)
			if GetConVarNumber("lenny_advcrosshair_info") == 1 then
				draw.DrawText("Heath: "..target:Health(), "Trebuchet18", x, y +25, Color(255,255,255, 150), 1)

			end
			if GetConVarNumber("lenny_advcrosshair_hitmarker") == 1 then
				if LocalPlayer():KeyDown(IN_ATTACK) and LocalPlayer():GetActiveWeapon():Clip1() > 0 then
					surface.SetDrawColor(255,255,255)
					surface.DrawLine(x+15, y+15, x+8, y+8)
					surface.DrawLine(x-15, y-15, x-8, y-8)
					surface.DrawLine(x-15, y+15, x-8, y+8)
					surface.DrawLine(x+15, y-15, x+8, y-8)
				end
			end

		else
			crosscolor = Color(255,255,255, 150)
		end




	
		surface.SetDrawColor(crosscolor)
		local gap = 15
		local length = gap + 10
		surface.DrawLine( x - length, y, x - gap, y )
		surface.DrawLine( x + length, y, x + gap, y )
		surface.DrawLine( x, y - length, x, y - gap )
		surface.DrawLine( x, y + length, x, y + gap )
		surface.SetDrawColor(0, 255, 0)
		surface.DrawLine( x +2 , y, x -2, y)
		surface.DrawLine( x , y +2, x , y-2)
	end
end
hook.Add("HUDPaint", "advcrosshair", advcrosshair)
Posts 76–90 of 219 · Page 6 of 15

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?