--[[
	EXECUTABLE_PATH/Joseph/12.lua
	Joseph | STEAM_0:0:69348930 <2.26.87.183:27005> | [19-10-13 05:31:04PM]
	===BadFile===
]]

--[[
	lua/autorun/client/OubHack/vgui/oubhack_aimbot_panel.lua
	Oubliette | (STEAM_0:1:34029133)
	===DStream===
]]

/******************************************************************************
 .d88888b.  888     888 888888b.   888    888        d8888  .d8888b.  888    d8P  
d88P" "Y88b 888     888 888  "88b  888    888       d88888 d88P  Y88b 888   d8P   
888     888 888     888 888  .88P  888    888      d88P888 888    888 888  d8P    
888     888 888     888 8888888K.  8888888888     d88P 888 888        888d88K     
888     888 888     888 888  "Y88b 888    888    d88P  888 888        8888888b    
888     888 888     888 888    888 888    888   d88P   888 888    888 888  Y88b   
Y88b. .d88P Y88b. .d88P 888   d88P 888    888  d8888888888 Y88b  d88P 888   Y88b  
 "Y88888P"   "Y88888P"  8888888P"  888    888 d88P     888  "Y8888P"  888    Y88b 
 By Oubliete and UnknownAlias
*******************************************************************************/

-- The panel opened from the main menu.

oubhack.aimbotpanel = {}


/******************************************************************
 _______ __   _ _______ _____      _______ __   _ _______  _____ 
 |_____| | \  |    |      |        |______ | \  | |_____| |_____]
 |     | |  \_|    |    __|__      ______| |  \_| |     | |      
                                                                 
******************************************************************/

oubhack.aimbotpanel["AntiSnap"] = {}
oubhack.aimbotpanel["AntiSnap"].Func = function()
	local p = oubhack:CreateVgui("DPanel")
	p:SetVisible(false)
	function p:update()
		self:Clear(true)

		p.Enabled = oubhack:CreateVgui("oh_DToggle",self)
		p.Enabled:SetPos(2,2)
		p.Enabled:SetSize(150,30)
		p.Enabled:SetTitle("Anti-Snap")
		p.Enabled:SetEnabled(oubhack.antisnap)
		p.Enabled.DoClick = function()
			if oubhack.antisnap then	
				oubhack.antisnap = false;
			else	
				oubhack.antisnap = true;
			end
		end

		p.EnableCLLB = oubhack:CreateVgui("oh_DToggle",self)
		p.EnableCLLB:SetPos(2,33)
		p.EnableCLLB:SetSize(150,30)
		p.EnableCLLB:SetTitle("Clamp Lowest Speed")
		p.EnableCLLB:SetEnabled(oubhack.antisnap_cllb)
		p.EnableCLLB.DoClick = function()
			if oubhack.antisnap_cllb then	
				oubhack.antisnap_cllb = false;
			else	
				oubhack.antisnap_cllb = true;
			end
		end

		p.EnableCLHB = oubhack:CreateVgui("oh_DToggle",self)
		p.EnableCLHB:SetPos(2,64)
		p.EnableCLHB:SetSize(150,30)
		p.EnableCLHB:SetTitle("Clamp Highest Speed")
		p.EnableCLHB:SetEnabled(oubhack.antisnap_clhb)
		p.EnableCLHB.DoClick = function()
			if oubhack.antisnap_clhb then	
				oubhack.antisnap_clhb = false;
			else	
				oubhack.antisnap_clhb = true;
			end
		end


		self.CLHBPoint = vgui.Create( "DNumSlider", self )
		self.CLHBPoint:SetValue(oubhack.antisnap_hb * 100)
		self.CLHBPoint:SetPos( 175,10 )
		self.CLHBPoint:SetWide( 175 )
		self.CLHBPoint:SetText( "Clamp Highest Speed At :" )
		self.CLHBPoint:SetMin( 0 ) 
		self.CLHBPoint:SetMax( 360 )
		self.CLHBPoint:SetDecimals( 0 )
		self.CLHBPoint.OnValueChanged = function(panel,number)
			local a = oubhack.antisnap_hb
			oubhack.antisnap_hb = number;
		end

		self.CLLBPoint = vgui.Create( "DNumSlider", self )
		self.CLLBPoint:SetValue(oubhack.antisnap_lb * 100)
		self.CLLBPoint:SetPos( 175,45 )
		self.CLLBPoint:SetWide( 175 )
		self.CLLBPoint:SetText( "Clamp Lowest Speed At :" )
		self.CLLBPoint:SetMin( 0 ) 
		self.CLLBPoint:SetMax( 360 )
		self.CLLBPoint:SetDecimals( 0 )
		self.CLLBPoint.OnValueChanged = function(panel,number)
			local a = oubhack.antisnap_lb
			oubhack.antisnap_lb = number / 100;
		end

			self.DAngDe = vgui.Create( "DNumSlider", self )
		self.DAngDe:SetValue(oubhack.antisnap_speed )
		self.DAngDe:SetPos( 175,80 )
		self.DAngDe:SetWide( 175 )
		self.DAngDe:SetText( "Aimbot Speed Level :" )
		self.DAngDe:SetMin( 0 ) 
		self.DAngDe:SetMax( 360 )
		self.DAngDe:SetDecimals( 0 )
		self.DAngDe.OnValueChanged = function(panel,number)
			local a = oubhack.antisnap_speed
			oubhack.antisnap_speed = number ;
		end

	end
	p:update()
	return p;
end
oubhack.aimbotpanel["AntiSnap"].Desc = "Anti Snap toggle, and speed"

/****************************************************************************************************************************
 _______ _____ _______ ______   _____  _______      _______ _______ _______ _____ _    _ _______ _______ _____  _____  __   _
 |_____|   |   |  |  | |_____] |     |    |         |_____| |          |      |    \  /  |_____|    |      |   |     | | \  |
 |     | __|__ |  |  | |_____] |_____|    |         |     | |_____     |    __|__   \/   |     |    |    __|__ |_____| |  \_|
                                                                                                                             
*****************************************************************************************************************************/

oubhack.aimbotpanel["Activation"] = {}
oubhack.aimbotpanel["Activation"].Func = function()
	local p = oubhack:CreateVgui("DPanel")
	p:SetVisible(false)
	function p:update()
		self:Clear(true)

		p.BindList = oubhack:CreateVgui("DListView",self)
			p.BindList:AddColumn("Key")
			p.BindList:AddColumn("Enum")
			p.BindList:SetMultiSelect(false)
			p.BindList:SetPos(2,2)
			p.BindList:SetSize(300,ScrH()/2-26)
			p.BindList.OnRowSelected = function(panel,line)
				local value = panel:GetLine(line):GetValue(1)
				p.Selected = value
				p.BindButton:SetText("Bind "..value.." to aimbot")
			end
			local keys = table.SortByKey(oubhack.KeyToEnum,function(a,b) return a>b end)
			for v,k in pairs(keys) do
				p.BindList:AddLine(k,v)
			end


		p.CurrentBind = oubhack:CreateVgui("DPanel",self)
		p.CurrentBind:SetPos(p.BindList:GetWide(),2)
		p.CurrentBind:SetSize((ScrW()/2)-202-self.BindList:GetWide(),30)
		p.CurrentBind.Paint = function()
			local w,h = p.CurrentBind:GetWide(),p.CurrentBind:GetTall()
			draw.DrawText("Currently bound to ".. oubhack:EnumToString(oubhack.AimbotTrackKey), "default", (w/2),(h/2), Color(0, 255, 0, 255),TEXT_ALIGN_CENTER,TEXT_ALIGN_CENTER);
		end

		p.BindButton = oubhack:CreateVgui("DButton",self)
		p.BindButton:SetPos(p.BindList:GetWide(),2+p.CurrentBind:GetTall())
		p.BindButton:SetSize((ScrW()/2)-202-self.BindList:GetWide(),30)
		p.BindButton:SetText("Bind "..oubhack:EnumToString(oubhack.AimbotTrackKey).." to aimbot")
		p.BindButton.DoClick = function()
			local sel = p.Selected
			if sel then
				oubhack.AimbotTrackKey = oubhack:StringToEnum(sel)
			end
		end
	end
	p:update()
	return p;
end
oubhack.aimbotpanel["Activation"].Desc = "Change activation methods"

/*********************************************************************************************************************************************************************
 ______   _____  __   _ _______      _______ _______           / _    _ _______ _______ _______  _____   ______       _____  _______ _______ _______ _______ _______
 |_____] |     | | \  | |______      |______ |______ |        /   \  /  |______ |          |    |     | |_____/      |     | |______ |______ |______ |______    |   
 |_____] |_____| |  \_| |______      ______| |______ |_____  /     \/   |______ |_____     |    |_____| |    \_      |_____| |       |       ______| |______    |   
                                                            /                                                                                                       
*********************************************************************************************************************************************************************/

local bones = {}

-- center
bones["Head"] = "ValveBiped.Bip01_Head1"
bones["Spine"] = "ValveBiped.Bip01_Spine"
-- Right
bones["Right Hand"] = "ValveBiped.Bip01_R_Hand"
bones["Right forearm"] = "ValveBiped.Bip01_R_Forearm"
bones["Right Foot"] = "ValveBiped.Bip01_R_Foot"
bones["Right Thigh"] = "ValveBiped.Bip01_R_Thigh"
bones["Right Calf"] = "ValveBiped.Bip01_R_Calf"
bones["Right Shoulder"] = "ValveBiped.Bip01_R_Shoulder"
bones["Right Elbow"] = "ValveBiped.Bip01_R_Elbow"
-- Left
bones["Left Hand"] = "ValveBiped.Bip01_L_Hand"
bones["Left forearm"] = "ValveBiped.Bip01_L_Forearm"
bones["Left Foot"] = "ValveBiped.Bip01_L_Foot"
bones["Left Thigh"] = "ValveBiped.Bip01_L_Thigh"
bones["Left Calf"] = "ValveBiped.Bip01_L_Calf"
bones["Left Shoulder"] = "ValveBiped.Bip01_L_Shoulder"
bones["Left Elbow"] = "ValveBiped.Bip01_L_Elbow"
bones["OBB Center"] = false

oubhack.aimbotpanel["Targeting"] = {}
oubhack.aimbotpanel["Targeting"].Func = function()
	local p = oubhack:CreateVgui("DPanel")
	p:SetVisible(false)
	local options = {}
	options["Target Admins"] = {Desc="Allow the aimbot to target admins and super admins.",Enabled="target_admins"}
	options["Target NPC's"] = {Desc="Allow targetting of npc's (targetting value always low).",Enabled="target_npcs"}
	options["Do Traces"] = {Desc="Stop the aimbot peforming traces, aimbot WILL track through walls.",Enabled="do_traces"}
	options["Target Harmless"] = {Desc="Allow/disallow aimbot targeting for harmless people.",Enabled="target_harmless"}
	options["Target Traitors"] = {Desc="Stops targeting of Traitors, only useful if your a traitor, obviously.",Enabled="target_innocents"}
	options["Target Innocents"] = {Desc="Stops targeting of Innocents, only useful if your a traitor, obviously.",Enabled="target_traitors"}
	options["Target My Team"] = {Desc="Stops targeting players of your team. (doesn't work in TTT).",Enabled="self_target_team"}
	options["Target Drivers"] = {Desc="Allows targeting of players driving or riding in vehicles.",Enabled="target_vehicles"}
	function p:update()
		self:Clear(true)

		self.BoneList = oubhack:CreateVgui("DListView",self)
			self.BoneList:AddColumn("Bone")
			self.BoneList:SetMultiSelect(false)
			self.BoneList:SetPos(2,2)
			self.BoneList:SetSize(100,ScrW()/2-24)
			self.BoneList.OnRowSelected = function(panel,line)
				local bone = self.BoneList:GetLine(line):GetValue(1)
				self.ChangeBone:SetText("Target "..bone.." ")
				self.Selected = bone;
			end
			for k,v in pairs(bones) do
				p.BoneList:AddLine(k)
			end


		self.CLHBPoint = vgui.Create( "DNumSlider", self )
		self.CLHBPoint:SetValue(oubhack.aimbot_vector_offset.x)
		self.CLHBPoint:SetPos( 110,10 )
		self.CLHBPoint:SetWide( 175 )
		self.CLHBPoint:SetText( "Vector X Offset" )
		self.CLHBPoint:SetMin( -40 ) 
		self.CLHBPoint:SetMax( 40 )
		self.CLHBPoint:SetDecimals( 2 )
		self.CLHBPoint.OnValueChanged = function(panel,number)
			oubhack.aimbot_vector_offset.x = number
		end

		self.CLLBPoint = vgui.Create( "DNumSlider", self )
		self.CLLBPoint:SetValue(oubhack.aimbot_vector_offset.y)
		self.CLLBPoint:SetPos( 110,45 )
		self.CLLBPoint:SetWide( 175 )
		self.CLLBPoint:SetText( "Vector Y Offset" )
		self.CLLBPoint:SetMin( -40 ) 
		self.CLLBPoint:SetMax( 40 )
		self.CLLBPoint:SetDecimals( 2 )
		self.CLLBPoint.OnValueChanged = function(panel,number)
			oubhack.aimbot_vector_offset.y = number
		end 

			self.DAngDe = vgui.Create( "DNumSlider", self )
		self.DAngDe:SetValue(oubhack.aimbot_vector_offset.z)
		self.DAngDe:SetPos( 110,80 )
		self.DAngDe:SetWide( 175 )
		self.DAngDe:SetText( "Vector Z Offset" )
		self.DAngDe:SetMin( -40 ) 
		self.DAngDe:SetMax( 40 )
		self.DAngDe:SetDecimals( 2 )
		self.DAngDe.OnValueChanged = function(panel,number)
			oubhack.aimbot_vector_offset.z = number;
		end

		self.Div = oubhack:CreateVgui("DPanel",self)
			self.Div:SetPos(self.CLHBPoint.x + 180,1)
			self.Div:SetSize(1,ScrH()/2-22)
			self.Div.Paint = function()
				surface.SetDrawColor(0,255,0,255)
				surface.DrawRect( 0, 0, self:GetWide(), self:GetTall() -2 )
			end

		self.CurrentBone = oubhack:CreateVgui("DPanel",self)
			self.CurrentBone:SetPos(self.Div.x+5,2)
			self.CurrentBone:SetSize((ScrW()/2)-self.Div.x-202,30)
			self.CurrentBone.Paint = function()
				local w,h = p.CurrentBone:GetWide(),p.CurrentBone:GetTall()
				local v = oubhack.aimbot_vector_offset;
				draw.DrawText("Targeting Bone : ".. oubhack.target_bone_name, "default", (w/2),(h/2), Color(0, 255, 0, 255),TEXT_ALIGN_CENTER,TEXT_ALIGN_CENTER);
				draw.DrawText("Vector Offset :  ".. tostring(v), "default", (w/2)-4,(h/2)-14, Color(0, 255, 0, 255),TEXT_ALIGN_CENTER,TEXT_ALIGN_CENTER);
			end

		self.ChangeBone = oubhack:CreateVgui("DButton",self)
		self.ChangeBone:SetPos(self.Div.x+5,32)
		self.ChangeBone:SetSize((ScrW()/2)-self.Div.x-212,30)
		self.ChangeBone:SetText("Target "..oubhack.target_bone_name.." ")
		self.ChangeBone.DoClick = function()
			if self.Selected then
				oubhack.target_bone_name = self.Selected
				oubhack.target_bone = bones[self.Selected]
			end
		end


		self.OptionsList = oubhack:CreateVgui("DListView",self)
		self.OptionsList:SetPos(self.ChangeBone.x,self.ChangeBone.y+self.ChangeBone:GetTall()+5)
		self.OptionsList:SetSize(self.ChangeBone:GetWide(),(ScrH()/2)-22-self.ChangeBone.y-5 )
		self.OptionsList:AddColumn("Option")
		self.OptionsList:AddColumn("Enabled")
		for k,v in pairs(options) do 
			self.OptionsList:AddLine(k,tostring(oubhack[v.Enabled]))
		end
		for k,v in pairs(self.OptionsList:GetLines()) do
			v:SetTooltip(options[v:GetValue(1)].Desc)
		end
		self.OptionsList.DoDoubleClick = function(panel,line)
			local state = true
			local value = panel:GetLine(line):GetValue(2)
			if value == "true" then state = false end
			oubhack[options[panel:GetLine(line):GetValue(1)].Enabled] = state
			panel:GetLine(line):SetValue(2,tostring(state))
		end

	end
	p:update()
	return p;
end
oubhack.aimbotpanel["Targeting"].Desc = "Aimbot targeting settings"

/********************************************************************************************************************************************************
  ______  ______  _____  _     _  _____       _______ _______  ______  ______ _______ _______      _     _ _______ __   _ ______         _______  ______
 |  ____ |_____/ |     | |     | |_____]         |    |_____| |_____/ |  ____ |______    |         |_____| |_____| | \  | |     \ |      |______ |_____/
 |_____| |    \_ |_____| |_____| |               |    |     | |    \_ |_____| |______    |         |     | |     | |  \_| |_____/ |_____ |______ |    \_
                                                                                                                                                        
********************************************************************************************************************************************************/

oubhack.aimbotpanel["Group target handler"] = {}
oubhack.aimbotpanel["Group target handler"].Func = function()
	local p = oubhack:CreateVgui("DPanel")
	p:SetVisible(false)
	
	function p:update()
		-- This is a pile of shit. I plan to revise it in later editions.
		self:Clear(true)
		self.Mode = 1
		oubhack:CheckGroups()


			p.GroupList = oubhack:CreateVgui("DListView",self)
			p.GroupList:AddColumn("Name")
			p.GroupList:AddColumn("Members")
			p.GroupList:AddColumn("Steam Friends")
			p.GroupList:AddColumn("Status")
			p.GroupList:SetMultiSelect(true)
			p.GroupList:SetPos(2,2)
			p.GroupList:SetSize(350,ScrH()/2-26)
			p.GroupList.Think = function()
				local names = {}
				for _,t in pairs(p.GroupList:GetLines()) do names[#names+1] = t:GetValue(1) end
			 	if oubhack.groups then
					for k,v in pairs(oubhack.groups) do
						local sf = 0;
						for _,p in pairs(v.Mbrs) do if oubhack:IsSteamFriend(p) then sf=sf+1 end  end 
						if !table.HasValue(names,v.Name) then 
							if v.target then
								p.GroupList:AddLine(v.Name,#v.Mbrs,sf,"Will Target")
							else
								p.GroupList:AddLine(v.Name,#v.Mbrs,sf,"Won't Target")
							end
						end
					end
				end
			end
			
		p.GroupTargettingEnabled = oubhack:CreateVgui("oh_DToggle",self)
		p.GroupTargettingEnabled:SetPos(p.GroupList:GetWide()+ 4,2)
		p.GroupTargettingEnabled:SetSize((ScrW()/2)-208-self.GroupList:GetWide(),30)
		p.GroupTargettingEnabled:SetTitle("Group Targetting")
		p.GroupTargettingEnabled:SetEnabled(oubhack.group_targeting)
		p.GroupTargettingEnabled.DoClick = function()
			if oubhack.group_targeting then
				oubhack.group_targeting = false;
			else
				oubhack.group_targeting = true;
			end
		end

		p.ModeButton = oubhack:CreateVgui("oh_DSwitch",self)
		p.ModeButton:SetPos(p.GroupList:GetWide()+ 4,4 + p.GroupTargettingEnabled:GetTall())
		p.ModeButton:SetSize((ScrW()/2)-208-self.GroupList:GetWide(),30)
		p.ModeButton:SetText(1,"Target ONLY Selected")
		p.ModeButton:SetText(2,"DON'T Target Selected")
		p.ModeButton.DoClick = function(opt)
			self.Mode = opt;
			if opt == 1 then
				local tbl = p.GroupList:GetLines()
				p.GroupList:Clear(true)
				for _,group in pairs(oubhack.groups) do group.target = false end -- Stop targeting all groups, for this mode
				for k,v in pairs(tbl) do
					p.GroupList:AddLine(v:GetValue(1),v:GetValue(2),v:GetValue(3),"Won't Target")
				end
				p.ApplyButton:SetText("Target Selected Group(s)")
			else
				local tbl = p.GroupList:GetLines()
				p.GroupList:Clear(true)
				for _,group in pairs(oubhack.groups) do group.target = true end -- Stop targeting all groups, for this mode
				for k,v in pairs(tbl) do
					p.GroupList:AddLine(v:GetValue(1),v:GetValue(2),v:GetValue(3),"Will Target")
				end
				p.ApplyButton:SetText("Ignore Selected Group(s)")
			end
		end

		p.ApplyButton = oubhack:CreateVgui("DButton",self)
		p.ApplyButton:SetPos(p.GroupList:GetWide()+ 4,100)
		p.ApplyButton:SetSize((ScrW()/2)-208-self.GroupList:GetWide(),30)
		p.ApplyButton:SetText("Target Selected Group(s)")
		p.ApplyButton.DoClick = function() -- Sooo many for loops D:
			local tbl = p.GroupList:GetSelected()
			if tbl and #tbl > 0 then
				for k,v in pairs(tbl) do p.GroupList:RemoveLine(v:GetID()) end -- Remove the selected lines
				if self.Mode == 1 then 
					for k,v in pairs(tbl) do 
						for _,group in pairs(oubhack.groups) do if group.Name == v:GetValue(1) then group.target = true end end -- Target the selected groups
						p.GroupList:AddLine(v:GetValue(1),v:GetValue(2),v:GetValue(3),"Will Target") -- Redraw the selected lines, with the new info
					end
				else
					for k,v in pairs(tbl) do 
						for _,group in pairs(oubhack.groups) do if group.Name == v:GetValue(1) then group.target = false end end
						p.GroupList:AddLine(v:GetValue(1),v:GetValue(2),v:GetValue(3),"Won't Target") ------------------------------^^
					end
				end
			end
		end

	end
	p:update()
	return p;
end
oubhack.aimbotpanel["Group target handler"].Desc = "Add/remove groups that the aimbot will target"


/********************************************************************************************
  ______ _______ __   _  ______ _______ _______ _______      _______  _____  ______  _______     
 |  ____ |_____| | \  | |  ____ |______    |    |_____|      |  |  | |     | |     \ |______     
 |_____| |     | |  \_| |_____| ______|    |    |     |      |  |  | |_____| |_____/ |______     
                                                                                                 
********************************************************************************************/

oubhack.aimbotpanel["Gangsta mode"] = {}
oubhack.aimbotpanel["Gangsta mode"].Func = function()
	local p = oubhack:CreateVgui("DPanel")
	p:SetVisible(false)
	function p:update()
		self:Clear(true)

		p.Enabled = oubhack:CreateVgui("oh_DToggle",self)
		p.Enabled:SetPos(2,2)
		p.Enabled:SetSize(150,30)
		p.Enabled:SetTitle("Gangsta mode")
		p.Enabled:SetEnabled(oubhack.gangsta_mode)
		p.Enabled.DoClick = function()
			if oubhack.gangsta_mode then	
				oubhack.gangsta_mode = false;
			else	
				oubhack.gangsta_mode = true;
			end
		end

		self.GangAPitch = vgui.Create( "DNumSlider", self )
		self.GangAPitch:SetValue(oubhack.gangsta_angle.p)
		self.GangAPitch:SetPos( 25,50 )
		self.GangAPitch:SetWide( 150 )
		self.GangAPitch:SetText( "Pitch Offset" )
		self.GangAPitch:SetMin( -50 ) 
		self.GangAPitch:SetMax( 50 )
		self.GangAPitch:SetDecimals( 0 )
		self.GangAPitch.OnValueChanged = function(panel,number)
			local a = oubhack.gangsta_angle
			oubhack.gangsta_angle = Angle(number,a.y,a.r)
		end

		self.GangAYaw = vgui.Create( "DNumSlider", self )
		self.GangAYaw:SetValue(oubhack.gangsta_angle.y)
		self.GangAYaw:SetPos( 25,100 )
		self.GangAYaw:SetWide( 150 )
		self.GangAYaw:SetText( "Yaw Offset" )
		self.GangAYaw:SetMin( -50 ) 
		self.GangAYaw:SetMax( 50 )
		self.GangAYaw:SetDecimals( 0 )
		self.GangAYaw.OnValueChanged = function(panel,number)
			local a = oubhack.gangsta_angle
			oubhack.gangsta_angle = Angle(a.p,number,a.r)
		end

		self.GangARoll = vgui.Create( "DNumSlider", self )
		self.GangARoll:SetValue(oubhack.gangsta_angle.r)
		self.GangARoll:SetPos( 25,150 )
		self.GangARoll:SetWide( 150 )
		self.GangARoll:SetText( "Roll Offset" )
		self.GangARoll:SetMin( -360 ) 
		self.GangARoll:SetMax( 360 )
		self.GangARoll:SetDecimals( 0 )
		self.GangARoll.OnValueChanged = function(panel,number)
			local a = oubhack.gangsta_angle
			oubhack.gangsta_angle = Angle(a.p,a.y,number)
		end

				self.GangVX = vgui.Create( "DNumSlider", self )
		self.GangVX:SetValue(oubhack.gangsta_vector.x)
		self.GangVX:SetPos( 180,50 )
		self.GangVX:SetWide( 150 )
		self.GangVX:SetText( "X-Axis Offset" )
		self.GangVX:SetMin( -10 ) 
		self.GangVX:SetMax( 10 )
		self.GangVX:SetDecimals( 0 )
		self.GangVX.OnValueChanged = function(panel,number)
			local a = oubhack.gangsta_vector
			oubhack.gangsta_vector = Vector(number,a.y,a.z)
		end

		self.GangVY = vgui.Create( "DNumSlider", self )
		self.GangVY:SetValue(oubhack.gangsta_vector.y)
		self.GangVY:SetPos( 180,100 )
		self.GangVY:SetWide( 150 )
		self.GangVY:SetText( "Y-Axis Offset" )
		self.GangVY:SetMin( -10 ) 
		self.GangVY:SetMax( 10 )
		self.GangVY:SetDecimals( 0 )
		self.GangVY.OnValueChanged = function(panel,number)
			local a = oubhack.gangsta_vector
			oubhack.gangsta_vector = Vector(a.x,number,a.z)
		end

		self.GangVZ = vgui.Create( "DNumSlider", self )
		self.GangVZ:SetValue(oubhack.gangsta_vector.z)
		self.GangVZ:SetPos( 180,150 )
		self.GangVZ:SetWide( 150 )
		self.GangVZ:SetText( "Z-Axis Offset" )
		self.GangVZ:SetMin( -10 ) 
		self.GangVZ:SetMax( 10 )
		self.GangVZ:SetDecimals( 0 )
		self.GangVZ.OnValueChanged = function(panel,number)
			local a = oubhack.gangsta_vector
			oubhack.gangsta_vector = Vector(a.x,a.y,number)
		end
	end
	p:update()
	return p;
end
oubhack.aimbotpanel["Gangsta mode"].Desc = "Turn on/off, and config gangsta mode"


/*****************************************************************************************************************************
 _______ _____ _______ ______   _____  _______       _____  _______ __   _ _______             __   _  _____  ______  _______
 |_____|   |   |  |  | |_____] |     |    |         |_____] |_____| | \  | |______ |           | \  | |     | |     \ |______
 |     | __|__ |  |  | |_____] |_____|    |         |       |     | |  \_| |______ |_____      |  \_| |_____| |_____/ |______
                                                                                                                             
*****************************************************************************************************************************/

function oubhack:GetAimbotPanel(w,h)
	if self.AimbotPanel then self.AimbotPanel:Remove() end
	self.AimbotPanel = self:CreateVgui("DFrame")
		self.AimbotPanel:SetSize(w,h)
		self.AimbotPanel:SetSkin("oubhack")
		self.AimbotPanel:MakePopup()
		self.AimbotPanel:SetVisible(false)
		self.AimbotPanel:SetTitle("Aimbot settings menu")
		self.AimbotPanel:ShowCloseButton(false)
		self.AimbotPanel:SetSizable(true)

		function self.AimbotPanel:update()
			self:Clear(true)
			self.Minimize = oubhack:CreateVgui("DButton",self)
				self.Minimize:SetSize(22,22)
				self.Minimize:SetPos(self:GetWide()-self.Minimize:GetWide(),0)
				self.Minimize:SetText("-")
				self.Minimize.DoClick = function()
					oubhack.Frame:ClosePanel(self)
					self.State = 0;
				end
				self.Minimize.Think = function()
					self.Minimize:SetPos(self:GetWide()-self.Minimize:GetWide(),0)
				end		

			self.CatergoryList = oubhack:CreateVgui("oh_DPanelList",self)
				self.CatergoryList:EnableVerticalScrollbar()
				self.CatergoryList:SetPos(0,22)
				self.CatergoryList:SetSize(200,ScrH()/2-22)
				self.CatergoryList.Think = function()
					self.CatergoryList:SetSize(200,self:GetTall()-22)
				end
			for k,v in pairs(oubhack.aimbotpanel) do
			self.Option = oubhack:CreateVgui("oh_DOption")
				self.Option:SetSize(140,25)
				self.Option:SetText(k)
				self.Option:SetDesc(v.Desc)
				self.Option:SetPanel(v.Func())
				self.Option.DoClick = function(panel)
					if panel.Selected or self.SwitchBoard.MovingPanel then return false end; 
					for k,v in pairs(self.CatergoryList.Items) do
						if IsValid(v) and v.Selected then
							v:Deselect()
						end
					end
					panel:Select()
					self.SwitchBoard:ChangePanel(panel:GetPanel())
				end
				--self.Option:SetPos(10,22)
				self.CatergoryList:AddItem(self.Option)
			end

		self.SwitchBoard = oubhack:CreateVgui("oh_DSwitchPanel",self)
			self.SwitchBoard:SetPos(200,22)
			self.SwitchBoard:SetSize( (ScrW()/2) - 200, (ScrH()/2) - 22)
			self.SwitchBoard:SetPanel(oubhack.aimbotpanel["AntiSnap"].Func())
		
		end
		
	self.AimbotPanel:update();
	return self.AimbotPanel;
end


