Guest User

Untitled

a guest
Apr 20th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.75 KB | None | 0 0
  1. //botBot, made by Muffin and Marvincmarvin
  2.  
  3. local util = util
  4. local vgui = vgui
  5. local table = table
  6. local math = math
  7. local string = string
  8. local surface = surface
  9. local draw = draw
  10.  
  11.  
  12. local botBot = {}
  13. local getall = player.GetAll()
  14. local val1, val2, val3 = 0, 0, 0
  15. local temp = 0
  16. local autoshoot = 0
  17. local aim = false
  18. local plyers = {}
  19. local bhop = false
  20.  
  21.  
  22. local function GetMeta( name )
  23. return table.Copy(_R[name] or {})
  24. end
  25. local AngM = GetMeta("Angle")
  26. local CmdM = GetMeta("CUserCmd")
  27. local EntM = GetMeta("Entity")
  28. local PlyM = GetMeta("Player")
  29. local VecM = GetMeta("Vector")
  30.  
  31. botBot.targets = {}
  32. botBot.ver = "a0.5"
  33.  
  34. botBot.espchecks = {}
  35. botBot.esp_enabled = CreateClientConVar( 'botBot_esp_enabled', 1, true, false )
  36. botBot.esp_tar_ply = CreateClientConVar( 'botBot_esp_targetplayers', 1, true, false )
  37. botBot.esp_tar_npc = CreateClientConVar( 'botBot_esp_targetnpcs', 1, true, false )
  38. botBot.esp_show_name = CreateClientConVar( 'botBot_esp_showname', 1, true, false )
  39. botBot.esp_show_health = CreateClientConVar( 'botBot_esp_showhealth', 1, true, false )
  40. botBot.esp_show_admin = CreateClientConVar( 'botBot_esp_showadmin', 1, true, false )
  41. botBot.esp_show_steam = CreateClientConVar( 'botBot_esp_showsteam', 1, true, false )
  42. botBot.esp_show_lines = CreateClientConVar( 'botBot_esp_showlines', 0, true, false )
  43. botBot.esp_show_bones = CreateClientConVar( 'botBot_esp_showbones', 1, true, false )
  44. botBot.esp_show_model = CreateClientConVar( 'botBot_esp_showmodel', 1, true, false )
  45. botBot.esp_show_rpents = CreateClientConVar( 'botBot_esp_showrpents', 1, true, false )
  46.  
  47. botBot.aim_enabled = CreateClientConVar( 'botBot_aim_enabled', 1, true, false )
  48. botBot.aim_npc = CreateClientConVar( 'botBot_aim_targetnpcs', 0, true, false )
  49. botBot.aim_maxdist = CreateClientConVar( 'botBot_aim_maxdist', 16340, true, false )
  50. botBot.aim_autoshoot = CreateClientConVar( 'botBot_aim_autoshoot', 0, true, false )
  51. botBot.aim_targetsteamfriends = CreateClientConVar( 'botBot_aim_targetsteamfriends', 1, true, false )
  52. botBot.aim_targetadmins = CreateClientConVar( 'botBot_aim_targetadmins', 1, true, false )
  53.  
  54. botBot.theme = CreateClientConVar( 'botBot_theme', 0, true, false )
  55.  
  56. botBot.colors = {}
  57. botBot.colors.blue = Color( 0, 160, 255 )
  58. botBot.colors.green = Color( 114, 255, 0 )
  59. botBot.colors.red = Color( 250, 50, 50 )
  60. botBot.colors.grey = Color( 150, 150, 150 )
  61. botBot.colors.darkgrey = Color( 20, 20, 20 )
  62.  
  63. botBot.colors.theme = {}
  64. botBot.colors.theme.norm = botBot.colors.blue
  65. botBot.colors.theme.light = Color( 0, 200, 250, 70 )
  66.  
  67. botBot.titles = {}
  68. botBot.titles[1] = "fuck your shit"
  69. botBot.titles[2] = "better than sethhack"
  70. botBot.titles[3] = "you suck at life"
  71. botBot.titles[4] = "lemonparty endorsed"
  72. botBot.titles[5] = "deal with it"
  73. botBot.titles[6] = "since 2001"
  74. botBot.titles[7] = "fights cancer"
  75.  
  76. for k, v in pairs( getall ) do
  77. if v == LocalPlayer() then
  78. table.remove( getall, k )
  79. end
  80. end
  81.  
  82. local targs = {}
  83.  
  84.  
  85. timer.Simple( 1, function()
  86. npctargs = {}
  87.  
  88. for k,v in pairs( ents.GetAll() ) do
  89. if v != LocalPlayer() and v:IsNPC() then
  90. table.insert( npctargs, v )
  91. end
  92. end
  93. end )
  94.  
  95.  
  96. local function FindPlayerByName( name )
  97. for k,v in pairs( player.GetAll() ) do
  98. if string.find( v:Name(), name, 1, true ) then
  99. return v
  100. end
  101. end
  102. end
  103.  
  104. function _R.Entity.GetVisible( self )
  105. local trace = {}
  106.  
  107. if self:IsPlayer() then
  108. trace = {start = LocalPlayer():GetShootPos(),endpos = self:HeadPos(),filter = {LocalPlayer(), self}}
  109. elseif self:IsNPC() then
  110. trace = {start = LocalPlayer():GetShootPos(),endpos = self:LocalToWorld(self:OBBCenter()),filter = {LocalPlayer(), self}}
  111. end
  112. local tr = util.TraceLine(trace)
  113.  
  114. if tr.Fraction == 1 then
  115. return true
  116. else
  117. return false
  118. end
  119. end
  120.  
  121.  
  122.  
  123. function _R.Entity.GetAlive( self )
  124. local ret = false
  125.  
  126. if self:IsValid() then
  127. if self:IsPlayer() then
  128. if self:Alive() then ret = true end
  129. elseif self:IsNPC() then
  130. if self:GetMoveType()!=0 then ret = true end
  131. end
  132. end
  133. return ret
  134. end
  135.  
  136.  
  137.  
  138.  
  139. /*---------------------*\
  140. --------#[Aimbot]#-------
  141. \*---------------------*/
  142.  
  143. local function FindTarget( pos )
  144. if table.Count( table.Add( player.GetAll(), npctargs ) ) > 1 then
  145.  
  146. local distance = math.huge
  147. local plys = {}
  148. local alltargs = {}
  149.  
  150. if botBot.aim_npc:GetInt() == 1 then
  151. alltargs = table.Add( targs, npctargs )
  152. else
  153. alltargs = targs
  154. end
  155.  
  156. for k,v in pairs( alltargs ) do
  157. if ( v:IsNPC() or v:Alive() ) and plys[k] != LocalPlayer() then
  158. local curdist = v:GetPos():Distance( pos )
  159.  
  160. if curdist < distance then
  161. table.insert( plys, v )
  162. distance = curdist
  163. end
  164. end
  165. end
  166.  
  167. for i = #plys, 1, -1 do
  168. if plys[i]:GetVisible() then
  169. if botBot.aim_targetsteamfriends:GetInt() == 0 then
  170. if plys[i]:GetFriendStatus() ~= "friend" then
  171. return plys[i]
  172. end
  173. elseif botBot.aim_targetadmins:GetInt() == 0 then
  174. if not plys[i]:IsAdmin() and not plys[i]:IsSuperAdmin() then
  175. return plys[i]
  176. end
  177. else
  178. return plys[i]
  179. end
  180. end
  181. end
  182. else
  183. return nil
  184. end
  185. end
  186.  
  187.  
  188. local function EntCheck( ent )
  189. if !ent:IsValid() then return false end
  190. if !ent:IsPlayer() and !ent:IsNPC() then return false end
  191. if util.PointContents( ent:EyePos() ) == CONTENTS_SOLID then return false end
  192. return true
  193. end
  194.  
  195. local function RandString()
  196. return tostring( math.Round( math.random( 52, 148) / math.random( 5, 100), math.random( 3, 14) ) )
  197. end
  198.  
  199. local function GetIndexInTable( var, tab )
  200. for k,v in pairs( tab ) do
  201. if var == v then
  202. return k
  203. end
  204. end
  205. return false
  206. end
  207.  
  208.  
  209. concommand.Add( "+botbot_aim", function() aim = true end )
  210.  
  211. hook.Add( "CreateMove", "cmove", function( UCMD )
  212. if aim == true and botBot.aim_enabled:GetInt() == 1 then
  213. local val, targ = pcall( FindTarget, LocalPlayer():GetPos() )
  214. local val2, val3 = pcall( EntCheck, targ )
  215.  
  216. if val == true and val2 == true and val3 == true and #targs > 0 then
  217.  
  218. local targpos = ( ( targ:GetPos() + Vector( 0, 0, 40 ) ) - LocalPlayer():GetShootPos() ):Normalize():Angle()
  219.  
  220. UCMD:SetViewAngles( targpos )
  221.  
  222. if botBot.aim_autoshoot:GetInt() == 1 and autoshoot == 0 then
  223. RunConsoleCommand( "+attack" )
  224. autoshoot = 1
  225. end
  226.  
  227. elseif autoshoot == 1 then
  228. RunConsoleCommand( "-attack" )
  229. autoshoot = 0
  230. end
  231. end
  232.  
  233. //Bunnyhop
  234. if bhop then
  235. if LocalPlayer():IsOnGround() then
  236. UCMD:SetButtons( UCMD:GetButtons() | IN_JUMP )
  237. end
  238. end
  239. end )
  240. concommand.Add( "-botbot_aim", function()
  241. aim = false
  242.  
  243. if autoshoot == 1 then
  244. RunConsoleCommand( "-attack" )
  245. autoshoot = 0
  246. end
  247. end )
  248. concommand.Add( "+botbot_bh", function() bhop = true end )
  249. concommand.Add( "-botbot_bh", function() bhop = false end )
  250.  
  251.  
  252.  
  253.  
  254.  
  255. /*---------------------*\
  256. --------#[ ESP ]#--------
  257. \*---------------------*/
  258.  
  259. function botBot:CreateMaterial( pl )
  260. local BaseInfo = {
  261. ['$basetexture'] = 'models/debug/debugwhite',
  262. ['$model'] = 1,
  263. ['$translucent'] = 1,
  264. ['$alpha'] = 1,
  265. ['$nocull'] = 1,
  266. ['$ignorez'] = 1
  267. }
  268. local mat = CreateMaterial( 'pb_solid_mat', 'VertexLitGeneric', BaseInfo )
  269. return mat
  270. end
  271.  
  272.  
  273.  
  274. function _R.Entity.HeadPos( self )
  275. if self:IsPlayer() then
  276. local hbone = self:LookupBone('ValveBiped.Bip01_Head1')
  277. return self:GetBonePosition(hbone)
  278. else
  279. return self:GetPos()
  280. end
  281. end
  282.  
  283.  
  284.  
  285. function _R.Entity:GetBones()
  286. local ret = {}
  287.  
  288. if self:IsPlayer() then
  289. ret = {
  290. h = self:GetBonePosition( self:LookupBone('ValveBiped.Bip01_Head1') ):ToScreen(),
  291. p = self:GetBonePosition( self:LookupBone('ValveBiped.Bip01_Spine') ):ToScreen(),
  292. r_t = self:GetBonePosition( self:LookupBone('ValveBiped.Bip01_R_Thigh') ):ToScreen(),
  293. r_c = self:GetBonePosition( self:LookupBone('ValveBiped.Bip01_R_Calf') ):ToScreen(),
  294. r_f = self:GetBonePosition( self:LookupBone('ValveBiped.Bip01_R_Foot') ):ToScreen(),
  295. r_ua = self:GetBonePosition( self:LookupBone('ValveBiped.Bip01_R_UpperArm') ):ToScreen(),
  296. r_fa = self:GetBonePosition( self:LookupBone('ValveBiped.Bip01_R_Forearm') ):ToScreen(),
  297. r_h = self:GetBonePosition( self:LookupBone('ValveBiped.Bip01_R_Hand') ):ToScreen(),
  298. l_t = self:GetBonePosition( self:LookupBone('ValveBiped.Bip01_L_Thigh') ):ToScreen(),
  299. l_c = self:GetBonePosition( self:LookupBone('ValveBiped.Bip01_L_Calf') ):ToScreen(),
  300. l_f = self:GetBonePosition( self:LookupBone('ValveBiped.Bip01_L_Foot') ):ToScreen(),
  301. l_ua = self:GetBonePosition( self:LookupBone('ValveBiped.Bip01_L_UpperArm') ):ToScreen(),
  302. l_fa = self:GetBonePosition( self:LookupBone('ValveBiped.Bip01_L_Forearm') ):ToScreen(),
  303. l_h = self:GetBonePosition( self:LookupBone('ValveBiped.Bip01_L_Hand') ):ToScreen(),
  304. n = self:GetBonePosition( self:LookupBone('ValveBiped.Bip01_Neck1') ):ToScreen()
  305. }
  306. end
  307. return ret
  308.  
  309. end
  310.  
  311. local function GetTargets()
  312. botBot.targets = {}
  313.  
  314. for _,ent in pairs( ents.GetAll() ) do
  315. if ( ent:IsPlayer() or ent:IsNPC() ) and ( ent != LocalPlayer() ) then
  316. if botBot.esp_tar_ply:GetInt() == 1 and ent:IsPlayer() then
  317. table.insert( botBot.targets, ent )
  318. elseif botBot.esp_tar_npc:GetInt() == 1 and ent:IsNPC() then
  319. table.insert( botBot.targets, ent )
  320. end
  321. end
  322. end
  323. end
  324.  
  325.  
  326.  
  327. local function EnableAll()
  328. RunConsoleCommand( 'botBot_esp_enabled', "1" )
  329. RunConsoleCommand( 'botBot_esp_targetplayers', "1" )
  330. RunConsoleCommand( 'botBot_esp_targetnpcs', "1" )
  331. RunConsoleCommand( 'botBot_esp_showname', "1" )
  332. RunConsoleCommand( 'botBot_esp_showhealth', "1" )
  333. RunConsoleCommand( 'botBot_esp_showadmin', "1" )
  334. RunConsoleCommand( 'botBot_esp_showsteam', "1" )
  335. RunConsoleCommand( 'botBot_esp_showlines', "1" )
  336. RunConsoleCommand( 'botBot_esp_showbones', "1" )
  337. RunConsoleCommand( 'botBot_esp_showmodel', "1" )
  338. end
  339.  
  340. local function DisableAll()
  341. RunConsoleCommand( 'botBot_esp_enabled', "0" )
  342. RunConsoleCommand( 'botBot_esp_targetplayers', "0" )
  343. RunConsoleCommand( 'botBot_esp_targetnpcs', "0" )
  344. RunConsoleCommand( 'botBot_esp_showname', "0" )
  345. RunConsoleCommand( 'botBot_esp_showhealth', "0" )
  346. RunConsoleCommand( 'botBot_esp_showadmin', "0" )
  347. RunConsoleCommand( 'botBot_esp_showsteam', "0" )
  348. RunConsoleCommand( 'botBot_esp_showlines', "0" )
  349. RunConsoleCommand( 'botBot_esp_showbones', "0" )
  350. RunConsoleCommand( 'botBot_esp_showmodel', "0" )
  351. end
  352.  
  353. local function DrawEsp()
  354. if botBot.esp_enabled:GetInt() == 1 then
  355. for _,pl in pairs( botBot.targets ) do
  356. if pl:IsValid() then
  357.  
  358. local pos = ( pl:GetPos() ):ToScreen()
  359.  
  360. b = pl:GetBones()
  361. local spos = b.h
  362. local lpos = ( pl:GetEyeTrace().HitPos ):ToScreen()
  363.  
  364. local drawcolor = Color(0,0,0)
  365.  
  366. if pl:GetVisible() and pl:GetAlive() then
  367. drawcolor = team.GetColor( pl:Team() ) or botBot.colors.green
  368. elseif not pl:GetVisible() and pl:GetAlive() then
  369. drawcolor = botBot.colors.red
  370. elseif not pl:GetAlive() then
  371. drawcolor = botBot.colors.grey
  372. end
  373.  
  374. if pl:IsPlayer() then
  375. local hpos = ( pl:HeadPos() ):ToScreen()
  376. local y = 7
  377.  
  378. surface.SetDrawColor( botBot.colors.grey )
  379. surface.DrawOutlinedRect( hpos.x-2, hpos.y-2, 4, 4 )
  380.  
  381. if botBot.esp_show_health:GetInt() == 1 then
  382. draw.RoundedBox( 0, pos.x-17, pos.y+4, 42, 6, botBot.colors.darkgrey )
  383. draw.RoundedBox( 0, pos.x-16, pos.y+5, 0.4 * math.Clamp( pl:Health(), 1, 100 ), 4, drawcolor )
  384. end
  385.  
  386. if botBot.esp_show_name:GetInt() == 1 then
  387. y = y + 10
  388. draw.SimpleText( pl:Nick(), 'BudgetLabel', pos.x, pos.y+y, drawcolor, 1, 1 )
  389. end
  390.  
  391. if botBot.esp_show_admin:GetInt() == 1 then
  392. y = y + 10
  393. local a_text = ''
  394.  
  395. if pl:IsAdmin() then
  396. if pl:IsSuperAdmin() then
  397. a_text = 'Super Admin'
  398. else
  399. a_text = 'Admin'
  400. end
  401. else
  402. a_text = 'Player'
  403. end
  404. draw.SimpleText( a_text, 'BudgetLabel', pos.x, pos.y+y, drawcolor, 1, 1 )
  405. end
  406.  
  407. if botBot.esp_show_steam:GetInt() == 1 then
  408. y = y + 10
  409. draw.SimpleText( pl:SteamID(), 'BudgetLabel', pos.x, pos.y+y, drawcolor, 1, 1 )
  410. end
  411.  
  412. if botBot.esp_show_bones:GetInt() == 1 then
  413. local b = pl:GetBones()
  414.  
  415. surface.SetDrawColor( drawcolor )
  416. surface.DrawLine(b.h.x, b.h.y, b.n.x, b.n.y)
  417. surface.DrawLine(b.n.x, b.n.y, b.p.x, b.p.y)
  418.  
  419. surface.DrawLine(b.r_t.x, b.r_t.y, b.r_c.x, b.r_c.y)
  420. surface.DrawLine(b.p.x, b.p.y, b.r_t.x, b.r_t.y)
  421. surface.DrawLine(b.r_c.x, b.r_c.y, b.r_f.x, b.r_f.y)
  422.  
  423. surface.DrawLine(b.n.x, b.n.y, b.r_ua.x, b.r_ua.y)
  424. surface.DrawLine(b.r_h.x, b.r_h.y, b.r_fa.x, b.r_fa.y)
  425. surface.DrawLine(b.r_fa.x, b.r_fa.y, b.r_ua.x, b.r_ua.y)
  426.  
  427. surface.DrawLine(b.l_t.x, b.l_t.y, b.l_c.x, b.l_c.y)
  428. surface.DrawLine(b.p.x, b.p.y, b.l_t.x, b.l_t.y)
  429. surface.DrawLine(b.l_c.x, b.l_c.y, b.l_f.x, b.l_f.y)
  430.  
  431. surface.DrawLine(b.n.x, b.n.y, b.l_ua.x, b.l_ua.y)
  432. surface.DrawLine(b.l_h.x, b.l_h.y, b.l_fa.x, b.l_fa.y)
  433. surface.DrawLine(b.l_fa.x, b.l_fa.y, b.l_ua.x, b.l_ua.y)
  434. end
  435. elseif pl:IsNPC() then
  436.  
  437. local pos = ( pl:GetPos() ):ToScreen()
  438. local y = 0
  439.  
  440. if botBot.esp_show_health:GetInt() == 1 then
  441. draw.RoundedBox( 0, pos.x-17, pos.y-4, 42, 6, botBot.colors.darkgrey)
  442. draw.RoundedBox( 0, pos.x-16, pos.y-3, 0.4*(pl:Health()), 4, drawcolor)
  443. end
  444.  
  445. if botBot.esp_show_name:GetInt() == 1 then
  446. y = y + 10
  447. draw.SimpleText(pl:GetClass(), 'BudgetLabel', pos.x, pos.y+y, drawcolor, 1, 1)
  448. end
  449.  
  450. end
  451.  
  452. if botBot.esp_show_lines:GetInt() == 1 then
  453. surface.SetDrawColor( drawcolor )
  454. surface.DrawLine( spos.x, spos.y, lpos.x, lpos.y )
  455. end
  456.  
  457. if botBot.esp_show_model:GetInt() == 1 then
  458. cam.Start3D( EyePos(), EyeAngles() )
  459.  
  460. local mat, col = botBot:CreateMaterial( v ), drawcolor
  461.  
  462. render.SuppressEngineLighting( true )
  463. render.SetColorModulation( ( col.r ), ( col.g ), ( col.b ) )
  464. SetMaterialOverride( mat )
  465. pl:DrawModel()
  466.  
  467. render.SuppressEngineLighting( false )
  468. render.SetColorModulation( 1, 1, 1 )
  469. SetMaterialOverride()
  470. pl:DrawModel()
  471.  
  472. cam.End3D()
  473.  
  474. end
  475. end
  476. end
  477.  
  478. if botBot.esp_show_rpents:GetInt() == 1 then
  479. local tempents = { "microwave", "spawned_shipment", "gunlab", "food", "melon", "money_printer", "spawned_weapon", "drug_lab", "drug" }
  480. local rpents = {}
  481.  
  482. for k,v in pairs( tempents ) do
  483. table.Add( rpents, ents.FindByClass( v ) )
  484. end
  485.  
  486. for _,ent in pairs( rpents ) do
  487. local drawcolor = Color(0,0,0)
  488. if ent:GetVisible() then
  489. drawcolor = botBot.colors.green
  490. else
  491. drawcolor = botBot.colors.red
  492. end
  493.  
  494. cam.Start3D( EyePos(), EyeAngles() )
  495.  
  496. local mat, col = botBot:CreateMaterial( v ), drawcolor
  497.  
  498. render.SuppressEngineLighting( true )
  499. render.SetColorModulation( ( col.r ), ( col.g ), ( col.b ) )
  500. SetMaterialOverride( mat )
  501. ent:DrawModel()
  502.  
  503. render.SuppressEngineLighting( false )
  504. render.SetColorModulation( 1, 1, 1 )
  505. SetMaterialOverride()
  506. ent:DrawModel()
  507.  
  508. cam.End3D()
  509.  
  510. end
  511. end
  512. end
  513. end
  514.  
  515. hook.Add( 'HUDPaint', 'botBot_esp', DrawEsp )
  516. hook.Add( 'Think', 'botBot_esp_target', GetTargets )
  517.  
  518. concommand.Add( 'botBot_esp_enableall', EnableAll )
  519. concommand.Add( 'botBot_esp_disableall', DisableAll )
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526. /*---------------------*\
  527. --------#[ GUI ]#--------
  528. \*---------------------*/
  529.  
  530. concommand.Add( "botbot_menu", function()
  531.  
  532. if ( table.Count( player.GetAll() ) ) > 1 then
  533. botBot.titles[8] = "players mad - " .. tostring( table.Count( player.GetAll() ) - 1 )
  534. else
  535. botBot.titles[8] = "just you? having fun?"
  536. end
  537.  
  538. if botBot.theme:GetInt() == 0 then
  539. botBot.colors.theme.norm = Color( 0, 160, 255 )
  540. botBot.colors.theme.light = Color( 0, 200, 255, 50 )
  541. elseif botBot.theme:GetInt() == 1 then
  542. botBot.colors.theme.norm = Color( 160, 250, 0 )
  543. botBot.colors.theme.light = Color( 200, 250, 0, 50 )
  544. elseif botBot.theme:GetInt() == 2 then
  545. botBot.colors.theme.norm = Color( 255, 160, 0 )
  546. botBot.colors.theme.light = Color( 255, 200, 0, 50 )
  547. elseif botBot.theme:GetInt() == 3 then
  548. botBot.colors.theme.norm = Color( 255, 255, 255 )
  549. botBot.colors.theme.light = Color( 255, 255, 255, 50 )
  550. end
  551.  
  552. local rand = math.random( #botBot.titles )
  553.  
  554. frame1 = vgui.Create( 'DFrame' )
  555. frame1:SetPos( -256, 256 )
  556. frame1:SetSize( 224, 300 )
  557. frame1:ShowCloseButton( false )
  558. frame1:SetTitle( "" )
  559. frame1.Paint = function()
  560.  
  561. surface.SetDrawColor( 50, 50, 50, 255 )
  562. surface.DrawRect( 1, 1, frame1:GetWide() - 2, frame1:GetTall() - 2)
  563.  
  564. for i = 1, 174 do
  565. surface.SetDrawColor( i - 30, i - 30, i - 30, a )
  566. surface.DrawLine( 225 - ( i * 3), 0, 500, 275 + ( i * 3 ) )
  567. end
  568.  
  569. surface.SetDrawColor( 0, 0, 0, 255 )
  570. surface.DrawOutlinedRect( 0, 0, frame1:GetWide(), frame1:GetTall())
  571.  
  572. draw.SimpleText( "botBot: " .. botBot.titles[rand], "ChatFont", 10, 7, botBot.colors.theme.norm )
  573.  
  574. surface.SetDrawColor( 30, 30, 30, 255 )
  575. surface.DrawRect( 204, 5, 16, 16 )
  576.  
  577. surface.SetDrawColor( 15, 15, 15, 255 )
  578. surface.DrawOutlinedRect( 203, 5, 17, 16 )
  579.  
  580. draw.SimpleText( "x", "Trebuchet22", 207, 0, botBot.colors.theme.norm )
  581.  
  582. end
  583.  
  584. button1 = vgui.Create( "DButton", frame1 )
  585. button1:SetSize( 17, 17 )
  586. button1:SetPos( 204, 5 )
  587. button1:SetText( "" )
  588. button1.DoClick = function()
  589. frame1:MoveTo( -256, 256, 0.5, 0, 2 )
  590. hook.Remove( "Think", "tehthink" )
  591. timer.Simple( 0.5, function()
  592. frame1:Close()
  593. end )
  594. end
  595. button1.Paint = function()
  596. return
  597. end
  598.  
  599. frame1:MakePopup()
  600.  
  601. sheet1 = vgui.Create( "DPropertySheet", frame1 )
  602. sheet1:SetPos( 5, 30 )
  603. sheet1:SetSize( 213, 282 )
  604. sheet1.Paint = function()
  605. return
  606. end
  607.  
  608.  
  609.  
  610.  
  611. ----------------
  612. -- Aimbot Tab --
  613. ----------------
  614. panel1 = vgui.Create( "DPanel", frame1 )
  615. panel1:SetPos( 7, 55 )
  616. panel1:SetSize( 211, 237 )
  617. panel1.Paint = function()
  618. draw.RoundedBoxEx( 4, 0, 0, panel1:GetWide(), panel1:GetTall(), Color( 0, 0, 0, 255 ), false, true, true, true )
  619. draw.RoundedBoxEx( 4, 1, 1, panel1:GetWide() - 2, panel1:GetTall() - 2, Color( 50, 50, 50, 255 ), false, true, true, true )
  620. draw.RoundedBox( 0, 1, 0, 51, 5, Color( 50, 50, 50, 255 ) )
  621. end
  622.  
  623. local Table = sheet1:AddSheet( " ", panel1, false, false, "Aimbot settings n'shit" )
  624. Table.Tab.Paint = function()
  625. draw.RoundedBoxEx( 4, 0, 0, Table.Tab:GetWide(), Table.Tab:GetTall(), Color( 0, 0, 0, 255 ), true, true, false, false )
  626. draw.RoundedBoxEx( 4, 1, 1, Table.Tab:GetWide() - 2, Table.Tab:GetTall() - 1, Color( 50, 50, 50, 255 ), true, true, false, false )
  627. draw.SimpleText( "Aimbot", "Default", 10, 5, botBot.colors.theme.norm )
  628. end
  629.  
  630.  
  631. local panel4 = vgui.Create( "DPanel", panel1 )
  632. panel4:SetPos( 11, 140 )
  633. panel4:SetSize( 162, 87 )
  634. panel4.Paint = function()
  635. surface.SetDrawColor( Color( 40, 40, 40, 255 ) )
  636. surface.DrawOutlinedRect( 0, 0, panel4:GetWide(), panel4:GetTall() )
  637. end
  638.  
  639. local list1 = vgui.Create( "DListView", panel1 )
  640. list1:SetPos( 12, 141 )
  641. list1:SetSize( 160, 85 )
  642. local test1 = list1:AddColumn( "Name" )
  643. test1.Header.PaintOver = function()
  644. surface.SetDrawColor( Color( 30, 30, 30, 255 ) )
  645. surface.DrawRect( 0, 0, test1.Header:GetWide(), test1.Header:GetTall() )
  646.  
  647. surface.SetDrawColor( Color( 50, 50, 50, 255 ) )
  648. surface.DrawRect( 1, 1, test1.Header:GetWide() - 2, test1.Header:GetTall() - 2 )
  649.  
  650. draw.SimpleText( "Name", "Default", test1.Header:GetWide() / 2 - 13, 1, botBot.colors.theme.norm )
  651.  
  652. end
  653. local test2 = list1:AddColumn( "Enemy" )
  654. test2.Header.PaintOver = function()
  655. surface.SetDrawColor( Color( 30, 30, 30, 255 ) )
  656. surface.DrawRect( 0, 0, test2.Header:GetWide(), test2.Header:GetTall() )
  657.  
  658. surface.SetDrawColor( Color( 50, 50, 50, 255 ) )
  659. surface.DrawRect( 1, 1, test2.Header:GetWide() - 2, test2.Header:GetTall() - 2 )
  660.  
  661. draw.SimpleText( "Enemy", "Default", test2.Header:GetWide() / 2 - 15, 1, botBot.colors.theme.norm )
  662.  
  663. end
  664.  
  665. function UpdateList()
  666. list1:Clear()
  667. getall = {}
  668.  
  669. for k,v in pairs( player.GetAll() ) do
  670. if v != LocalPlayer() then
  671. table.insert( getall, v )
  672. end
  673. end
  674.  
  675. for k,v in pairs( getall ) do
  676. list1:AddLine( v:Nick(), tostring( table.HasValue( targs, v ) ) )
  677. print(v)
  678. end
  679.  
  680. end
  681.  
  682.  
  683. local button2 = vgui.Create( "DButton", panel1 )
  684. button2:SetSize( 18, 18 )
  685. button2:SetPos( 178, 148 )
  686. button2:SetText( "" )
  687. button2.Paint = function()
  688. surface.SetDrawColor( 0, 0, 0, 255 )
  689. surface.DrawOutlinedRect( 0, 0, button2:GetWide(), button2:GetTall() )
  690.  
  691. surface.SetDrawColor( 30, 30, 30, 255 )
  692. surface.DrawRect( 1, 1, button2:GetWide() - 2, button2:GetTall() - 2 )
  693.  
  694. draw.SimpleText( ">>", "Trebuchet19", 0, 0, botBot.colors.theme.norm )
  695. end
  696. button2.DoClick = function()
  697. targs = {}
  698. UpdateList()
  699. end
  700.  
  701. local button3 = vgui.Create( "DButton", panel1 )
  702. button3:SetSize( 18, 18 )
  703. button3:SetPos( 178, 174 )
  704. button3:SetText( "" )
  705. button3.Paint = function()
  706. surface.SetDrawColor( 0, 0, 0, 255 )
  707. surface.DrawOutlinedRect( 0, 0, button3:GetWide(), button3:GetTall() )
  708.  
  709. surface.SetDrawColor( 30, 30, 30, 255 )
  710. surface.DrawRect( 1, 1, button3:GetWide() - 2, button3:GetTall() - 2 )
  711.  
  712. draw.SimpleText( "<<", "Trebuchet19", 1, 0, botBot.colors.theme.norm )
  713. end
  714. button3.DoClick = function()
  715. targs = player.GetAll()
  716.  
  717. for k,v in pairs( targs ) do
  718. if v == LocalPlayer() then
  719. table.remove( targs, k )
  720. end
  721. end
  722. UpdateList()
  723. end
  724.  
  725. local button4 = vgui.Create( "DButton", panel1 )
  726. button4:SetSize( 18, 18 )
  727. button4:SetPos( 178, 200 )
  728. button4:SetText( "" )
  729. button4.Paint = function()
  730. surface.SetDrawColor( 0, 0, 0, 255 )
  731. surface.DrawOutlinedRect( 0, 0, button4:GetWide(), button4:GetTall() )
  732.  
  733. surface.SetDrawColor( 30, 30, 30, 255 )
  734. surface.DrawRect( 1, 1, button4:GetWide() - 2, button4:GetTall() - 2 )
  735.  
  736. draw.SimpleText( "+-", "Trebuchet22", 2, -3, botBot.colors.theme.norm )
  737. end
  738. button4.DoClick = function()
  739. local selected = list1:GetLine( list1:GetSelectedLine() )
  740. local target = FindPlayerByName( selected:GetValue(1) )
  741.  
  742. if selected:GetValue(2) == "true" then
  743. table.remove( targs, GetIndexInTable( target, targs ) )
  744. else
  745. table.insert( targs, target )
  746. end
  747. UpdateList()
  748. end
  749.  
  750. local num1 = vgui.Create( "DNumSlider", panel1 )
  751. num1:SetPos( 16, 100 )
  752. num1:SetWide( 150 )
  753. num1:SetMin( 0 )
  754. num1:SetMax( 20000 )
  755. num1:SetText( "Maximum Dist." )
  756. num1:SetConVar( "botBot_aim_maxdist" )
  757. num1.Label:SetTextColor( botBot.colors.theme.norm )
  758. num1.Slider.Paint = function()
  759. draw.RoundedBox( 4, 0, 0, num1.Slider:GetWide(), num1.Slider:GetTall(), botBot.colors.theme.light )
  760.  
  761. surface.SetDrawColor( Color( 50, 50, 50, 255 ) )
  762. surface.DrawLine( 4, num1.Slider:GetTall() / 2, num1.Slider:GetWide() - 4, num1.Slider:GetTall() / 2 )
  763. end
  764.  
  765. local check2 = vgui.Create( "DCheckBoxLabel", panel1 )
  766. check2:SetPos( 15, 10 )
  767. check2:SetText( "Enabled" )
  768. check2:SizeToContents()
  769. check2:SetConVar( "botBot_aim_enabled" )
  770. check2:SetTextColor( botBot.colors.theme.norm )
  771.  
  772. local check3 = vgui.Create( "DCheckBoxLabel", panel1 )
  773. check3:SetPos( 15, 28 )
  774. check3:SetText( "Autoshoot" )
  775. check3:SizeToContents()
  776. check3:SetConVar( "botBot_aim_autoshoot" )
  777. check3:SetTextColor( botBot.colors.theme.norm )
  778.  
  779. local check4 = vgui.Create( "DCheckBoxLabel", panel1 )
  780. check4:SetPos( 15, 46 )
  781. check4:SetText( "NPCs" )
  782. check4:SizeToContents()
  783. check4:SetConVar( "botBot_aim_targetnpcs" )
  784. check4:SetTextColor( botBot.colors.theme.norm )
  785.  
  786. local check5 = vgui.Create( "DCheckBoxLabel", panel1 )
  787. check5:SetPos( 15, 64 )
  788. check5:SetText( "Steam Friends" )
  789. check5:SizeToContents()
  790. check5:SetConVar( "botBot_aim_targetsteamfriends" )
  791. check5:SetTextColor( botBot.colors.theme.norm )
  792.  
  793. local check6 = vgui.Create( "DCheckBoxLabel", panel1 )
  794. check6:SetPos( 15, 82 )
  795. check6:SetText( "Admins" )
  796. check6:SizeToContents()
  797. check6:SetConVar( "botBot_aim_targetadmins" )
  798. check6:SetTextColor( botBot.colors.theme.norm )
  799.  
  800. -------------
  801. -- ESP Tab --
  802. -------------
  803. panel2 = vgui.Create( "DPanel", frame1 )
  804. panel2:SetPos( 7, 55 )
  805. panel2:SetSize( 211, 237 )
  806. panel2.Paint = function()
  807. draw.RoundedBoxEx( 4, 0, 0, panel2:GetWide(), panel2:GetTall(), Color( 0, 0, 0, 255 ), false, true, true, true )
  808. draw.RoundedBoxEx( 4, 1, 1, panel2:GetWide() - 2, panel2:GetTall() - 2, Color( 50, 50, 50, 255 ), false, true, true, true )
  809. draw.RoundedBox( 0, 49, 0, 39, 5, Color( 50, 50, 50, 255 ) )
  810. end
  811.  
  812.  
  813. local Table2 = sheet1:AddSheet( " ", panel2, false, false, "'dem ESP options" )
  814. Table2.Tab.Paint = function()
  815. draw.RoundedBoxEx( 4, 0, 0, Table2.Tab:GetWide(), Table2.Tab:GetTall(), Color( 0, 0, 0, 255 ), true, true, false, false )
  816. draw.RoundedBoxEx( 4, 1, 1, Table2.Tab:GetWide() - 2, Table2.Tab:GetTall() - 1, Color( 50, 50, 50, 255 ), true, true, false, false )
  817. draw.SimpleText( "ESP", "Default", 10, 5, botBot.colors.theme.norm )
  818. end
  819.  
  820. Dlist = vgui.Create( "DPanelList", panel2 )
  821. Dlist:SetPos( 15, 10 )
  822. Dlist:SetSize( 115, 216 )
  823. Dlist:SetSpacing( 4 )
  824. Dlist:EnableHorizontal( false )
  825. Dlist:EnableVerticalScrollbar( true )
  826. Dlist.Paint = function() end
  827.  
  828. for i = 1, 10 do
  829. botBot.espchecks[i] = vgui.Create( "DCheckBoxLabel" )
  830. botBot.espchecks[i]:SetText( "Label" )
  831. botBot.espchecks[i]:SetTextColor( botBot.colors.theme.norm )
  832.  
  833. Dlist:AddItem( botBot.espchecks[i] )
  834. end
  835.  
  836. botBot.espchecks[1]:SetText( "Enabled" )
  837. botBot.espchecks[1]:SizeToContents()
  838. botBot.espchecks[1]:SetConVar( "botBot_esp_enabled" )
  839.  
  840. botBot.espchecks[2]:SetText( "Show Players" )
  841. botBot.espchecks[2]:SizeToContents()
  842. botBot.espchecks[2]:SetConVar( "botBot_esp_targetplayers" )
  843.  
  844. botBot.espchecks[3]:SetText( "Show NPCs" )
  845. botBot.espchecks[3]:SizeToContents()
  846. botBot.espchecks[3]:SetConVar( "botBot_esp_targetnpcs" )
  847.  
  848. botBot.espchecks[4]:SetText( "Show Names" )
  849. botBot.espchecks[4]:SizeToContents()
  850. botBot.espchecks[4]:SetConVar( "botBot_esp_showname" )
  851.  
  852. botBot.espchecks[5]:SetText( "Show Health" )
  853. botBot.espchecks[5]:SizeToContents()
  854. botBot.espchecks[5]:SetConVar( "botBot_esp_showhealth" )
  855.  
  856. botBot.espchecks[6]:SetText( "Show Admin Status" )
  857. botBot.espchecks[6]:SizeToContents()
  858. botBot.espchecks[6]:SetConVar( "botBot_esp_showadmin" )
  859.  
  860. botBot.espchecks[7]:SetText( "Show STEAMID" )
  861. botBot.espchecks[7]:SizeToContents()
  862. botBot.espchecks[7]:SetConVar( "botBot_esp_showsteam" )
  863.  
  864. botBot.espchecks[8]:SetText( "Show Lines" )
  865. botBot.espchecks[8]:SizeToContents()
  866. botBot.espchecks[8]:SetConVar( "botBot_esp_showlines" )
  867.  
  868. botBot.espchecks[9]:SetText( "Show Player Bones" )
  869. botBot.espchecks[9]:SizeToContents()
  870. botBot.espchecks[9]:SetConVar( "botBot_esp_showbones" )
  871.  
  872. botBot.espchecks[10]:SetText( "Show Player Model" )
  873. botBot.espchecks[10]:SizeToContents()
  874. botBot.espchecks[10]:SetConVar( "botBot_esp_showmodel" )
  875.  
  876. button5 = vgui.Create( "DButton", panel2 )
  877. button5:SetPos( 15, 195 )
  878. button5:SetSize( 60, 29 )
  879. button5:SetText( "" )
  880. button5.Paint = function()
  881. surface.SetDrawColor( 0, 0, 0, 255 )
  882. surface.DrawOutlinedRect( 0, 0, button5:GetWide(), button5:GetTall() )
  883.  
  884. surface.SetDrawColor( 30, 30, 30, 255 )
  885. surface.DrawRect( 1, 1, button5:GetWide() - 2, button5:GetTall() - 2 )
  886.  
  887. draw.SimpleText( "Enable All", "Default", 7, 8, botBot.colors.theme.norm )
  888. end
  889. button5.DoClick = function()
  890. RunConsoleCommand( "botBot_esp_enableall" )
  891. end
  892.  
  893. button6 = vgui.Create( "DButton", panel2 )
  894. button6:SetPos( 85, 195 )
  895. button6:SetSize( 60, 29 )
  896. button6:SetText( "" )
  897. button6.Paint = function()
  898. surface.SetDrawColor( 0, 0, 0, 255 )
  899. surface.DrawOutlinedRect( 0, 0, button6:GetWide(), button6:GetTall() )
  900.  
  901. surface.SetDrawColor( 30, 30, 30, 255 )
  902. surface.DrawRect( 1, 1, button6:GetWide() - 2, button6:GetTall() - 2 )
  903.  
  904. draw.SimpleText( "Disable All", "Default", 7, 8, botBot.colors.theme.norm )
  905. end
  906. button6.DoClick = function()
  907. RunConsoleCommand( "botBot_esp_disableall" )
  908. end
  909.  
  910.  
  911. --------------
  912. -- Misc Tab --
  913. --------------
  914. panel3 = vgui.Create( "DPanel", frame1 )
  915. panel3:SetPos( 7, 55 )
  916. panel3:SetSize( 211, 237 )
  917. panel3.Paint = function()
  918. draw.RoundedBoxEx( 4, 0, 0, panel3:GetWide(), panel3:GetTall(), Color( 0, 0, 0, 255 ), false, true, true, true )
  919. draw.RoundedBoxEx( 4, 1, 1, panel3:GetWide() - 2, panel3:GetTall() - 2, Color( 50, 50, 50, 255 ), false, true, true, true )
  920. draw.RoundedBox( 0, 85, 0, 42, 5, Color( 50, 50, 50, 255 ) )
  921. end
  922.  
  923. local Table3 = sheet1:AddSheet( " ", panel3, false, false, "We're spoiling you by giving you this tab, you know." )
  924. Table3.Tab.Paint = function()
  925. draw.RoundedBoxEx( 4, 0, 0, Table3.Tab:GetWide(), Table3.Tab:GetTall(), Color( 0, 0, 0, 255 ), true, true, false, false )
  926. draw.RoundedBoxEx( 4, 1, 1, Table3.Tab:GetWide() - 2, Table3.Tab:GetTall() - 1, Color( 50, 50, 50, 255 ), true, true, false, false )
  927. draw.SimpleText( "Misc", "Default", 10, 5, botBot.colors.theme.norm )
  928. end
  929.  
  930. local check1 = vgui.Create( "DCheckBox", panel3 )
  931. check1:SetPos( 20, 17 )
  932. -- check1:SetText( "Click to toggle BunnyHop" )
  933. -- check1:SizeToContents()
  934.  
  935. check1:SetValue( bhop )
  936.  
  937. check1.DoClick = function()
  938. check1:Toggle()
  939. bhop = not check1:GetValue()
  940. end
  941.  
  942. local label1 = vgui.Create( "DLabel", panel3 )
  943. label1:SetPos( 40, 16 )
  944. label1:SetText( "BunnyHop toggle" )
  945. label1:SetFont( "Default" )
  946. label1:SetTextColor( botBot.colors.theme.norm )
  947. label1:SizeToContents()
  948.  
  949. local label2 = vgui.Create( "DLabel", panel3 )
  950. label2:SetPos( 15, 32 )
  951. label2:SetText( "You can also bind a key to '+botbot_bh'" )
  952. label2:SetFont( "DefaultSmall" )
  953. label2:SetTextColor( botBot.colors.theme.light )
  954. label2:SizeToContents()
  955.  
  956. local label3 = vgui.Create( "DLabel", panel3 )
  957. label3:SetPos( 33, 49 )
  958. label3:SetText( "Theme" )
  959. label3:SetFont( "Default" )
  960. label3:SetTextColor( botBot.colors.theme.norm )
  961. label3:SizeToContents()
  962.  
  963. local multi1 = vgui.Create( "DMultiChoice", panel3 )
  964. multi1:SetPos( 20, 65 )
  965. multi1:AddChoice( "Blue" )
  966. multi1:AddChoice( "Green" )
  967. multi1:AddChoice( "Orange" )
  968. multi1:AddChoice( "White" )
  969. multi1.OnSelect = function( value, index, data )
  970. RunConsoleCommand( "botBot_theme", index - 1 )
  971.  
  972. frame1:Close()
  973. RunConsoleCommand( "botBot_menu" )
  974. sheet1:SetActiveTab( nil )
  975. end
  976.  
  977.  
  978.  
  979.  
  980. hook.Add( "Think", "tehthink", function()
  981. if #plyers ~= table.Count( player.GetAll() ) then
  982. getall = player.GetAll()
  983.  
  984. for k,v in pairs( getall ) do
  985. if v == LocalPlayer() then
  986. table.remove( getall, k )
  987. end
  988. end
  989. UpdateList()
  990. end
  991. plyers = player.GetAll()
  992. end )
  993. UpdateList()
  994.  
  995. frame1:MoveTo( 156, 256, 0.5, 0, 2)
  996. end )
Add Comment
Please, Sign In to add comment