Advertisement
leaky

BlueBot

Oct 17th, 2016
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 35.77 KB | None | 0 0
  1. --[[BBVERSION=083
  2. Made by:
  3.  .  ....................................................................................................................
  4. ..MMMMMMMM8....,MM~........MMM.....NMM...MMMMMMMMMM........NMM.....MMMO..MMZ..MMMMMMMMM7....MMMMMMMMM...,MMM......MMM...
  5. ..MMMMMMMMMM...,MM:........MMM.....NMM...MMMMMMMMMM...  ...NMM...+MMM....MMZ..MMMMMMMMMMM...MMMMMMMMMM?. :MMM...:MMM..  
  6. ..MM$.....MM$..,MM:........MMM.....NMM...MMN...............NMM..MMM7.....MMZ..MMM.....7MM...MM8.....MMD...~MMN..MMN.....
  7. ..MM8???IMMM. .,MM:   ..  .MMM.  ..NMM...MMM???????.     ..NMM~MMM..   ..MMZ .MMM....?MMM...MMD???IMMM.  ...MMMMMM.    
  8. ..MMMMMMMMM8...,MM:   .. ..MMM.  ..NMM...MMMMMMMMMN.     ..NMMMMMMM..  ..MMZ .MMMMMMMMMM....MMMMMMMMMN...  .=MMMM..  .  
  9. ..MMZ.....MMM..,MM:   ..  .MMM.   .NMM...MMN........     ..NMMM.,MMM.  ..MMZ .MMM..OMM8.....MM8.....MMM..  ..MMM...    
  10. ..MM$.   .DMM..,MM:   ..  .NMM.....MMM...MMN.            ..NMM....MMM....MMZ .MMM...,MMM....MM8.  ..8MM..   .NMM...    
  11. ..MMMMMMMMMMM..,MMMMMMMMM..,MMM+..MMM? ..MMMMMMMMMM~.. . ..NMM....~MMM...MMZ .MMM....~MMN...MMMMMMMMMMM..   .NMM.... ...
  12. ..MMMMMMMMM:. .,MMMMMMMMM....MMMMMMM:....MMMMMMMMMM~.. ....NMM.....+MMM..MMZ..MMM.... ,MMM..MMMMMMMMM=... ...NMM.... ...
  13. ..       ......           .........  .....         .........   ..... . . .  ...   ....  . ..       ............  .......
  14. If you paid for this, you got scammed, kido
  15. I'll be updating this regularly and it's pretty modular so feel free to add onto it
  16. Please don't reupload any shitty variation of the hack you make.
  17.  
  18. NOTICE: If you take code from this, add credits for Blue Kirby please. THANK YAWWW
  19. Official Blue Bot thread: http://www.mpgh.net/forum/713-garrys-mod-hacks-cheats/654228-blue-bot-lua-hack.html]]
  20.  
  21. local BB = { };
  22.  
  23. --This is your prefix you can change it to anything you want
  24. --By default it's random so every time you load the hack it's different
  25. --This is just to make it a little bit more difficult for anti-cheats
  26. --I don't recommend making it blue_bot or anything with bot in the name
  27. --Try using like llama or catpenis just nothing with hack or bot in the name
  28.  
  29. --Default to nil if you want to use a random prefix
  30. -----------------------------
  31. BB.CustomPrefix = "bb";
  32. -----------------------------
  33.  
  34. -------------------------------------------------------
  35. --Don't edit below unless you know what you are doing--
  36. -------------------------------------------------------
  37.  
  38. function BB.RandomString( len, numbers, special )
  39.     local chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"..(numbers == true && "1234567890" or "")..(special == true && "!?@#$%^&*[](),.-+={}:;'\"<>|\\" or ""); --You can change the list if you like
  40.     local result = "";
  41.    
  42.     if (len < 1) then
  43.         len = math.random( 10, 20 );
  44.     end
  45.    
  46.     for i = 1, len do
  47.         result = result..string.char( string.byte( chars, math.random( 1, string.len( chars ) ) ) );
  48.     end
  49.    
  50.     return tostring( result );
  51. end
  52.  
  53. BB.MetaPlayer = FindMetaTable( "Player" );
  54. BB.CreateClientConVar = CreateClientConVar;
  55.  
  56. local function CreateClientConVar( cvarname, default, save, onmenu )
  57.     BB.CreateClientConVar( cvarname, default, save, false );
  58.     return {cvar = GetConVar( cvarname ), OnMenu = onmenu, name = cvarname, main = string.find( cvarname, "enable" )};
  59. end
  60.  
  61. BB.RandomPrefix = BB.CustomPrefix or BB.RandomString( math.random( 5, 8 ), false );
  62. BB.DeadPlayers = { };
  63. BB.Traitors = { };
  64. BB.TWeaponsFound = { };
  65. BB.Recoils = { };
  66. BB.RandomHooks = { hook = { }, name = { } };
  67. BB.ply = LocalPlayer;
  68. BB.players = player.GetAll;
  69. BB.Target = nil;
  70. BB.mouse1 = false;
  71. BB.AimbotKeyDown = false;
  72. BB.ShouldFire = 0;
  73. BB.Aimbotting = false;
  74. BB.CVARS = {Bools = { }, Numbers = { }};
  75. BB.CVARS.Bools["Aimbot"] = CreateClientConVar( BB.RandomPrefix.."_aimbot_enabled", "0", true, true );
  76. BB.CVARS.Bools["Aim on key"] = CreateClientConVar( BB.RandomPrefix.."_aim_on_key", "1", true, true );
  77. BB.CVARS.Bools["Aim on mouse1"] = CreateClientConVar( BB.RandomPrefix.."_aim_on_mouse", "1", true, true );
  78. BB.CVARS.Numbers["Max Angle"] = CreateClientConVar( BB.RandomPrefix.."_aimbot_max_angle", "30", true, true );
  79. BB.CVARS.Bools["Aim at team mates"] = CreateClientConVar( BB.RandomPrefix.."_aimbot_friendly_fire", "1", true, true );
  80. BB.CVARS.Bools["Aim at steam friends"] = CreateClientConVar( BB.RandomPrefix.."_aimbot_steam_friends", "0", true, true );
  81. BB.CVARS.Bools["ESP"] = CreateClientConVar( BB.RandomPrefix.."_esp_enabled", "1", true, true );
  82. BB.CVARS.Bools["ESP: Show health"] = CreateClientConVar( BB.RandomPrefix.."_esp_show_health", "1", true, true );
  83. BB.CVARS.Bools["ESP: Show user group (admins)"] = CreateClientConVar( BB.RandomPrefix.."_esp_show_admins", "1", true, true );
  84. BB.CVARS.Bools["ESP: Show weapon"] = CreateClientConVar( BB.RandomPrefix.."_esp_show_weapon", "1", true, true );
  85. BB.CVARS.Bools["ESP: Show name"] = CreateClientConVar( BB.RandomPrefix.."_esp_show_name", "1", true, true );
  86. BB.CVARS.Bools["ESP: TTT Show traitors"] = CreateClientConVar( BB.RandomPrefix.."_esp_show_traitors", "1", true, true );
  87. BB.CVARS.Bools["ESP: TTT Show dead bodies"] = CreateClientConVar( BB.RandomPrefix.."_esp_show_dead_bodies", "1", true, true );
  88. BB.CVARS.Bools["ESP: TTT Show C4"] = CreateClientConVar( BB.RandomPrefix.."_esp_show_c4", "1", true, true );
  89. BB.CVARS.Bools["ESP: GMODZ Show items"] = CreateClientConVar( BB.RandomPrefix.."_esp_show_gmodz_items", "1", true, true );
  90. BB.CVARS.Bools["ESP: GMODZ Show inventories"] = CreateClientConVar( BB.RandomPrefix.."_esp_show_gmodz_inventories", "1", true, true );
  91. BB.CVARS.Bools["Chams"] = CreateClientConVar( BB.RandomPrefix.."_chams_enabled", "1", true, true );
  92. BB.CVARS.Bools["Crosshair"] = CreateClientConVar( BB.RandomPrefix.."_crosshair_enabled", "1", true, true );
  93. BB.CVARS.Bools["No Recoil"] = CreateClientConVar( BB.RandomPrefix.."_no_recoil", "1", true, true );
  94. BB.CVARS.Bools["No Visual Recoil"] = CreateClientConVar( BB.RandomPrefix.."_no_visual_recoil", "1", true, true );
  95. BB.CVARS.Bools["Traitor Detector"] = CreateClientConVar( BB.RandomPrefix.."_traitor_detector", "1", true, true );
  96. BB.CVARS.Bools["Show spectators"] = CreateClientConVar( BB.RandomPrefix.."_show_spectators", "1", true, true );
  97. BB.CVARS.Bools["Simplify spectator list"] = CreateClientConVar( BB.RandomPrefix.."_show_spectators_simplify", "0", true, true );
  98. BB.CVARS.Bools["Bunny hop"] = CreateClientConVar( BB.RandomPrefix.."_bunnyhop", "1", true, true );
  99. BB.CVARS.Bools["Auto pistol"] = CreateClientConVar( BB.RandomPrefix.."_auto_pistol", "1", true, true );
  100. BB.CVARS.Bools["Trigger bot"] = CreateClientConVar( BB.RandomPrefix.."_triggerbot", "1", true, true );
  101. BB.CVARS.Bools["Trigger bot team mates"] = CreateClientConVar( BB.RandomPrefix.."_triggerbot_friendly_fire", "1", true, true );
  102. BB.CVARS.Bools["Trigger bot steam friends"] = CreateClientConVar( BB.RandomPrefix.."_triggerbot_steam_friends", "1", true, true );
  103. BB.Mat = CreateMaterial( string.lower( BB.RandomString( math.random( 5, 8 ), false, false ) ), "VertexLitGeneric", { ["$basetexture"] = "models/debug/debugwhite", ["$model"] = 1, ["$ignorez"] = 1 } ); --Last minute change
  104. BB.HeadPos = nil;
  105. BB.JumpReleased = false;
  106. BB.TraceRes = nil;
  107. BB.Font = nil;
  108. BB.IsTraitor = nil;
  109. BB.IsTTT = false;
  110. BB.IsGmodZ = false;
  111. BB.PrintEx = MsgC;
  112. BB.LatestVersion = nil;
  113. BB.Version = "0.8.3";
  114. BB.V = 83; --DO NOT EDIT THIS
  115. BB.TimerName = BB.RandomString( 0, false, false );
  116. BB.Unloaded = false;
  117. BB.ToggleFade = nil;
  118.  
  119. function BB.Init( )
  120.     --Eww this is ugly
  121.     BB.Font = BB.RandomString( 0, false, false );
  122.     surface.CreateFont( BB.Font, { font = "Arial", size = 14, weight = 750, antialias = false, outline = true } );
  123.     BB.IsTTT = string.find( GAMEMODE.Name , "Terror" );
  124.     BB.IsGmodZ = ( string.lower( GAMEMODE.Name ) == "gmodz" );
  125.    
  126.     RunConsoleCommand( "showconsole" );
  127.     Msg( "\n\n\n" );
  128.     BB.Print( true, true, Color( 25, 225, 80 ), "Loaded!", Color( 255, 255, 255 ), "\tv"..BB.Version );
  129.     BB.Print( true, true, Color( 255, 255, 255 ), "Your random prefix is "..BB.RandomPrefix );
  130.     BB.Print( true, true, Color( 255, 255, 255 ), "Checking for updates..." );
  131.     MsgC( Color( 255, 255, 255 ), "Made by: Blue Kirby\n\n\n\n" );
  132.    
  133.     http.Fetch( "http://bluekirbygmod.googlecode.com/svn/trunk/Blue%20Bot/blue_bot.lua",
  134.         function( HTML )
  135.             local findpos = string.find( HTML, "BBVERSION=", 0, false );
  136.            
  137.             if (findpos) then
  138.                 local version = tonumber( string.sub( HTML, findpos+10, findpos+13 ) );
  139.                 if ( version > BB.V ) then
  140.                     BB.Print( true, true, Color( 255, 200, 200 ), "Your version is out of date!" );
  141.                     BB.LatestVersion = HTML;
  142.                     BB.UpdateMenu();
  143.                 else
  144.                     BB.Print( true, true, Color( 200, 255, 200 ), "Your version is up to date." );
  145.                 end
  146.             end
  147.         end,
  148.        
  149.         function()
  150.             BB.Error( "Failed checking for updates." );
  151.         end
  152.     );
  153.    
  154.     if (BB.IsTTT) then
  155.         BB.IsTraitor = BB.MetaPlayer.IsTraitor
  156.        
  157.         function BB.MetaPlayer:IsTraitor()
  158.             if (self == BB.ply()) then return BB.IsTraitor( self ); end
  159.            
  160.             if (!table.HasValue( BB.Traitors, self ) || !BB.CVARS.Bools["Traitor Detector"].cvar:GetBool()) then
  161.                 return BB.IsTraitor( self );
  162.             else
  163.                 return true;
  164.             end
  165.         end
  166.     end
  167. end
  168.  
  169. function BB.Print( timestamp, stamp, ... )
  170.     if (timestamp) then
  171.         Msg( "["..os.date("%H:%M:%S").."] " );
  172.     end
  173.    
  174.     if (stamp) then
  175.         MsgC( Color( 50, 100, 255 ), "[Blue Bot] " );
  176.     end
  177.    
  178.     local t = {...};
  179.    
  180.     if (#t == 1) then
  181.         BB.PrintEx( Color( 255, 255, 255 ), t[1] );
  182.     else
  183.         for i = 1, #t, 2 do
  184.             BB.PrintEx( t[i], t[i+1] );
  185.         end
  186.     end
  187.    
  188.     Msg( '\n' );
  189. end
  190.  
  191. function BB.PrintChat( ... )
  192.     chat.AddText( Color( 50, 100, 255 ), "[Blue Bot] ", ... );
  193. end
  194.  
  195. function BB.Error( error )
  196.     Msg( "["..os.date("%H:%M:%S").."] " );
  197.     MsgC( Color( 255, 50, 50 ), "[Blue Bot] ERROR: " );
  198.     MsgC( Color( 255, 255, 255 ), error.."\n" );
  199. end
  200.  
  201. function BB.IsOnTeam( ply )
  202.     if ( BB.IsTTT ) then
  203.         return ply:IsTraitor() == BB.ply():IsTraitor();
  204.     else
  205.         return ply:Team() == BB.ply():Team();
  206.     end
  207. end
  208.  
  209. function BB.GetValidPlayers( )
  210.     local players = { };
  211.    
  212.     for _, ply in pairs( BB.players() ) do
  213.         if ( ply != BB.ply && IsValid( ply ) &&
  214.         ply:IsPlayer() &&
  215.         ply:Alive() &&
  216.         ply:Health() >= 1 &&
  217.         ( ply:GetFriendStatus() != "friend" || BB.CVARS.Bools["Aim at steam friends"].cvar:GetBool() ) &&
  218.         ( !BB.IsOnTeam( ply ) || BB.CVARS.Bools["Aim at team mates"].cvar:GetBool() ) ) then
  219.             table.insert( players, ply );
  220.         end
  221.     end
  222.    
  223.     return players
  224. end
  225.  
  226. function BB.IsVisible( ply )
  227.     if (!IsValid( ply )) then return false end
  228.    
  229.     local vecPos, _ = ply:GetBonePosition( ply:LookupBone( "ValveBiped.Bip01_Head1" ) or 12 );
  230.     local trace = { start = BB.ply():EyePos(), endpos = vecPos, filter = BB.ply(), mask = MASK_SHOT };
  231.     local traceRes = util.TraceLine( trace );
  232.    
  233.     BB.TraceRes = traceRes;
  234.    
  235.     if (traceRes.HitWorld || traceRes.Entity != ply) then return false end;
  236.    
  237.     return true;
  238. end
  239.  
  240. function BB.ClosestAngle( players )
  241.     local flAngleDifference = nil;
  242.     local newAngle = nil;
  243.     local viewAngles = BB.ply():EyeAngles();
  244.    
  245.     for _, ply in pairs( players ) do
  246.         local vecPos, ang = ply:GetBonePosition( ply:LookupBone( "ValveBiped.Bip01_Head1" ) or 12 );
  247.         local oldpos = vecPos;
  248.         vecPos = vecPos - BB.VelocityPrediction( BB.ply() ) + BB.VelocityPrediction( ply )
  249.         local angAngle = ( vecPos - BB.ply():EyePos() ):Angle()
  250.         local flDif = math.abs( math.AngleDifference( angAngle.p, viewAngles.p ) ) + math.abs( math.AngleDifference( angAngle.y, viewAngles.y ) );
  251.        
  252.         if ((flAngleDifference == nil || flDif < flAngleDifference) && (!BB.CVARS.Numbers["Max Angle"].cvar:GetBool() || flDif < BB.CVARS.Numbers["Max Angle"].cvar:GetFloat())) then
  253.             BB.HeadPos = oldpos:ToScreen();
  254.             BB.Target = ply;
  255.             flAngleDifference = flDif;
  256.             newAngle = angAngle;
  257.         end
  258.     end
  259.    
  260.     return newAngle;
  261. end
  262.  
  263. function BB.VelocityPrediction( ply ) return ply:GetAbsVelocity() * 0.012; end
  264.  
  265. function BB.Aimbot( )
  266.     BB.HeadPos = nil;
  267.     BB.Aimbotting = false;
  268.    
  269.     if (!BB.CVARS.Bools["Aimbot"].cvar:GetBool() || !BB.mouse1 && (BB.CVARS.Bools["Aim on key"].cvar:GetBool() == true || BB.CVARS.Bools["Aim on mouse1"].cvar:GetBool() == true) && !BB.AimbotKeyDown) then return end
  270.    
  271.     local players = {};
  272.    
  273.     for _, ply in pairs( BB.GetValidPlayers() ) do
  274.         if (BB.IsVisible( ply )) then
  275.             table.insert( players, ply );
  276.         end
  277.     end
  278.    
  279.     if (table.Count( players ) == 0) then
  280.         BB.Target = nil;
  281.         return
  282.     end;
  283.    
  284.     local newAngle = BB.ClosestAngle( players );
  285.    
  286.     if ( newAngle != nil ) then
  287.         BB.ply():SetEyeAngles( newAngle );
  288.         BB.Aimbotting = true;
  289.     end
  290. end
  291.  
  292. function BB.TableSortByDistance( former, latter ) return latter:GetPos():Distance( BB.ply():GetPos() ) > former:GetPos():Distance( BB.ply():GetPos() ) end
  293. function BB.TableSortByAsc( former, latter ) print( "hey" ) return string.byte( string.lower( former.name ), 1 ) < string.byte( string.lower( latter.name ), 1 ) end
  294.  
  295. function BB.GetPlayersByDistance( )
  296.     local players = BB.players( );
  297.    
  298.     table.sort( players, BB.TableSortByDistance );
  299.    
  300.     return players;
  301. end
  302.  
  303. function BB.CreateMove( cmd )
  304.     if (BB.IsTTT && BB.ply():Alive() && BB.ply():Health() >= 1 && BB.ply():Team() != TEAM_SPECTATOR) then
  305.         BB.ply().voice_battery = 100; --Infinite voichat time I don't need to check if it's TTT because swag
  306.     end
  307.    
  308.     if (cmd:KeyDown( IN_ATTACK ) && !BB.mouse1 && BB.CVARS.Bools["Aim on mouse1"].cvar:GetBool() == true ) then
  309.         BB.mouse1 = true;
  310.         BB.Aimbot( );
  311.     elseif ( !cmd:KeyDown( IN_ATTACK ) && BB.mouse1 && BB.CVARS.Bools["Aim on mouse1"].cvar:GetBool() == true ) then
  312.         BB.mouse1 = false;
  313.     end
  314.    
  315.     if (BB.CVARS.Bools["No Recoil"].cvar:GetBool() && IsValid( BB.ply() ) && BB.ply():Alive() && BB.ply():Health() > 0 && IsValid( BB.ply():GetActiveWeapon() )) then
  316.         if ( BB.ply():GetActiveWeapon().Primary && BB.ply():GetActiveWeapon().Primary.Recoil ) then
  317.             BB.Recoils[BB.ply():GetActiveWeapon():EntIndex()] = BB.ply():GetActiveWeapon().Primary.Recoil;
  318.             BB.ply():GetActiveWeapon().Primary.Recoil = 0;
  319.         end
  320.     end
  321.    
  322.     local triggerbot = false;
  323.    
  324.     if (BB.CVARS.Bools["Trigger bot"].cvar:GetBool()) then
  325.         local trace = BB.ply():GetEyeTrace();
  326.        
  327.         if (IsValid( trace.Entity ) && trace.Entity:IsPlayer() && (trace.Entity:Team() != BB.ply():Team() || BB.CVARS.Bools["Trigger bot team mates"].cvar:GetBool()) && (trace.Entity:GetFriendStatus() != "friend" || BB.CVARS.Bools["Trigger bot steam friends"].cvar:GetBool())) then
  328.             triggerbot = true;
  329.         end
  330.     end
  331.    
  332.     if (!cmd:KeyDown( IN_ATTACK ) && (BB.CVARS.Bools["Trigger bot"].cvar:GetBool() && BB.Aimbotting || triggerbot)) then
  333.         cmd:SetButtons( IN_ATTACK + cmd:GetButtons() );
  334.     end
  335.    
  336.     if (cmd:KeyDown( IN_ATTACK ) && BB.CVARS.Bools["Auto pistol"].cvar:GetBool() && IsValid( BB.ply():GetActiveWeapon() ) && BB.ply():GetActiveWeapon():GetClass() != "weapon_ar2" && BB.ply():GetActiveWeapon():GetClass() != "weapon_smg1" && (!BB.ply():GetActiveWeapon().Primary or BB.ply():GetActiveWeapon().Primary.Automatic == false)) then
  337.         if (BB.ShouldFire == 3) then
  338.             cmd:RemoveKey( IN_ATTACK );
  339.             BB.ShouldFire = 0;
  340.         end
  341.        
  342.         BB.ShouldFire = BB.ShouldFire + 1;
  343.     else
  344.         BB.ShouldFire = 0;
  345.     end
  346.    
  347.     if (cmd:KeyDown( IN_JUMP )) then --Credits to gir489 original code for TF2
  348.         if (!BB.JumpReleased) then
  349.             if (BB.CVARS.Bools["Bunny hop"].cvar:GetBool() && !BB.ply():OnGround()) then
  350.                 cmd:RemoveKey( IN_JUMP );
  351.             end
  352.         else
  353.             BB.JumpReleased = false
  354.         end
  355.     elseif (!BB.JumpReleased) then
  356.         BB.JumpReleased = true;
  357.     end
  358. end
  359.  
  360. function BB.NoVisualRecoil( ply, pos, angles, fov )
  361.    if (BB.CVARS.Bools["No Visual Recoil"].cvar:GetBool() && BB.ply():Health() > 0 && BB.ply():Team() != TEAM_SPECTATOR && BB.ply():Alive()) then
  362.        return GAMEMODE:CalcView( ply, BB.ply():EyePos(), BB.ply():EyeAngles(), fov, 0.1 );
  363.    end
  364. end
  365.  
  366. function BB.AddToColor( color, add )
  367.     return color + add <= 255 and color + add or color + add - 255
  368. end
  369.  
  370. function BB.SubtractFromColor( color, sub )
  371.     return color - sub >= 0 and color - sub or color - sub + 255
  372. end
  373.  
  374. function BB.ESP( )
  375.     if (BB.ToggleFade or 0 > CurTime()) then
  376.         draw.DrawText( "Aimbot: "..(BB.AimbotKeyDown and "on" or "off"), BB.Font, ScrW()/2, ScrH()/2, Color( 255, 255, 255, 255 * (BB.ToggleFade - CurTime()) ), 1 );
  377.     end
  378.    
  379.     if (!BB.CVARS.Bools["Crosshair"].cvar:GetBool() && !BB.CVARS.Bools["ESP"].cvar:GetBool() && !BB.CVARS.Bools["Show spectators"].cvar:GetBool()) then return end;
  380.    
  381.     if ( BB.CVARS.Bools["Crosshair"].cvar:GetBool() ) then
  382.         surface.SetDrawColor( Color( 255, 255, 255 ) );
  383.         surface.DrawLine( ScrW()/2-10, ScrH()/2, ScrW()/2-4, ScrH()/2 );
  384.         surface.DrawLine( ScrW()/2+10, ScrH()/2, ScrW()/2+4, ScrH()/2 );
  385.         surface.DrawLine( ScrW()/2, ScrH()/2-10, ScrW()/2, ScrH()/2-4 );
  386.         surface.DrawLine( ScrW()/2, ScrH()/2+10, ScrW()/2, ScrH()/2+4 );
  387.     end
  388.    
  389.     if (BB.CVARS.Bools["Show spectators"].cvar:GetBool()) then
  390.         local spectators = 0;
  391.         for _, ply in pairs( BB.players() ) do
  392.             if (ply != BB.ply() && (ply:GetObserverMode() == OBS_MODE_IN_EYE|| ply:GetObserverMode() == OBS_MODE_CHASE) && ply:GetObserverTarget() == BB.ply()) then
  393.                 if (spectators == 0 && !BB.CVARS.Bools["Simplify spectator list"].cvar:GetBool()) then
  394.                     draw.DrawText( "Spectating you: "..ply:Nick(), BB.Font, ScrW()/2, 25, Color( 255, 100, 50 ), 1 );
  395.                 elseif (!BB.CVARS.Bools["Simplify spectator list"].cvar:GetBool()) then
  396.                     draw.DrawText( ply:Nick(), BB.Font, ScrW()/2, 25 + spectators*13, Color( 255, 100, 50 ), 1 );
  397.                 else
  398.                     draw.DrawText( "Someone is spectating you!", BB.Font, ScrW()/2, 25, Color( 255, 100, 50 ), 1 );
  399.                     break;
  400.                 end
  401.                
  402.                 spectators = spectators + 1;
  403.             end
  404.         end
  405.     end
  406.    
  407.     if ( !BB.CVARS.Bools["ESP"].cvar:GetBool() ) then return end
  408.    
  409.     surface.SetFont( BB.Font );
  410.    
  411.     for _, ply in pairs( BB.players() ) do
  412.         if (ply != BB.ply() && ply:Health() >= 1 && ply:Alive() && ply:Team() != TEAM_SPECTATOR) then
  413.             local min, max = ply:GetRenderBounds();
  414.             local pos = ply:GetPos() + Vector( 0, 0, ( min.z + max.z ) );
  415.             local color = Color( 50, 255, 50, 255 );
  416.            
  417.             if ( ply:Health() <= 10 ) then color = Color( 255, 0, 0, 255 );
  418.             elseif ( ply:Health() <= 20 ) then color = Color( 255, 50, 50, 255 );
  419.             elseif ( ply:Health() <= 40 ) then color = Color( 250, 250, 50, 255 );
  420.             elseif ( ply:Health() <= 60 ) then color = Color( 150, 250, 50, 255 );
  421.             elseif ( ply:Health() <= 80 ) then color = Color( 100, 255, 50, 255 ); end
  422.            
  423.             pos = ( pos + Vector( 0, 0, 10 ) ):ToScreen();
  424.            
  425.             if ( BB.CVARS.Bools["ESP: Show name"].cvar:GetBool() ) then
  426.                 local width, height = surface.GetTextSize( tostring( ply:Nick() ) ); -- I have to do tostring because sometimes errors would occur
  427.                 draw.DrawText( ply:Nick(), BB.Font, pos.x, pos.y-height/2, ( BB.IsTTT && ply:IsTraitor() ) and Color( 255, 150, 150, 255 ) or Color( 255, 255, 255, 255 ), 1 );
  428.             end
  429.            
  430.             if ( BB.CVARS.Bools["ESP: Show user group (admins)"].cvar:GetBool() && ply:GetNetworkedString( "UserGroup" ) != "user" ) then
  431.                 local width, height = surface.GetTextSize( ply:GetNetworkedString( "UserGroup" ) );
  432.                 draw.DrawText( ply:GetNetworkedString( "UserGroup" ), BB.Font, pos.x, pos.y-height-3, Color( 255, 200, 50, 255 ), 1 );
  433.                 pos.y = pos.y - (height - 6);
  434.             end
  435.            
  436.             if ( BB.IsTTT && BB.CVARS.Bools["ESP: TTT Show traitors"].cvar:GetBool() && ply:IsTraitor() ) then
  437.                 local width, height = surface.GetTextSize( "TRAITOR" );
  438.                 draw.DrawText( "TRAITOR", BB.Font, pos.x, pos.y-height-3, Color( 255, 0, 0, 255 ), 1 );
  439.             end
  440.            
  441.             pos = ply:GetPos():ToScreen();
  442.            
  443.             if (BB.CVARS.Bools["ESP: Show health"].cvar:GetBool()) then
  444.                 local width, height = surface.GetTextSize( "Health: "..tostring( ply:Health() ) );
  445.                 draw.DrawText( "Health: "..tostring( ply:Health() ), BB.Font, pos.x, pos.y, color, 1 );
  446.                 pos.y = pos.y + 13;
  447.             end
  448.            
  449.             if (BB.CVARS.Bools["ESP: Show weapon"].cvar:GetBool() && IsValid( ply:GetActiveWeapon() )) then
  450.                 local width, height = surface.GetTextSize( ply:GetActiveWeapon():GetPrintName() or ply:GetActiveWeapon():GetClass() );
  451.                 draw.DrawText( ply:GetActiveWeapon():GetPrintName() or ply:GetActiveWeapon():GetClass(), BB.Font, pos.x, pos.y, Color( 255, 200, 50 ), 1 );
  452.             end
  453.         end
  454.     end
  455.    
  456.     if (BB.IsTTT) then
  457.         if (BB.CVARS.Bools["ESP: TTT Show C4"].cvar:GetBool()) then
  458.             for _, ent in pairs( ents.FindByClass( "ttt_c4" ) ) do
  459.                 if (!BB.ply():IsTraitor() or !ent:GetArmed()) then
  460.                     local pos = ent:GetPos():ToScreen();
  461.                     local width, height = surface.GetTextSize( "C4" );
  462.                    
  463.                     draw.DrawText( !ent:GetArmed() and "C4 - Unarmed" or "C4 - "..string.FormattedTime(ent:GetExplodeTime() - CurTime(), "%02i:%02i"), BB.Font, pos.x, pos.y-height/2, Color( 255, 200, 200, 255 ), 1 );
  464.                 end
  465.             end
  466.         end
  467.        
  468.         if (BB.CVARS.Bools["ESP: TTT Show dead bodies"].cvar:GetBool()) then
  469.             for _, ent in pairs( ents.FindByClass( "prop_ragdoll" ) ) do
  470.                 local name = CORPSE.GetPlayerNick( ent, false );
  471.                
  472.                 if ( name != false ) then
  473.                     local pos = ent:GetPos():ToScreen();
  474.                     local width, height = surface.GetTextSize( name );
  475.                    
  476.                     draw.DrawText( name, BB.Font, pos.x, pos.y-height/2, Color( 255, 255, 255, 255 ), 1 );
  477.                    
  478.                     if ( !CORPSE.GetFound(ent, false) ) then
  479.                         draw.DrawText( "Unidentified", BB.Font, pos.x, pos.y-height/2+12, Color( 200, 200, 0, 255 ), 1 );
  480.                     end
  481.                 end
  482.             end
  483.         end
  484.     end
  485.  
  486.     if (BB.IsGmodZ) then
  487.         for _, ent in pairs( ents.FindByClass( "gmodz_item" ) ) do
  488.             if (ent.id) then
  489.                 local item = items[ent.id];
  490.                
  491.                 if (item) then
  492.                     local name = item.name or "ERROR";
  493.                     local pos = ent:GetPos():ToScreen();
  494.                     local width, height = surface.GetTextSize( name );
  495.                    
  496.                     draw.DrawText( name, BB.Font, pos.x, pos.y-height/2, Color( 255, 255, 220, 255 ), 1 );
  497.                 end
  498.             else
  499.                 net.Start( "item_ask_info" );
  500.                     net.WriteEntity( ent );
  501.                 net.SendToServer();
  502.             end
  503.         end
  504.     end
  505.    
  506.     if (BB.HeadPos != nil) then
  507.         local width = 5;
  508.         local height = 5;
  509.         surface.SetDrawColor( Color( 255, 0, 0, 255 ) );
  510.         surface.DrawOutlinedRect( BB.HeadPos.x-width/2, BB.HeadPos.y-height/2, width, height );
  511.     end
  512. end
  513.  
  514. function BB.Chams()
  515.     if (BB.CVARS.Bools["Chams"].cvar:GetBool()) then
  516.         for _, ply in pairs( BB.GetPlayersByDistance( ) ) do
  517.             if (ply != BB.ply() && IsValid( ply ) && ply:Alive() && ply:Health() > 0 && ply:Team() != TEAM_SPECTATOR) then
  518.                 local color = (BB.IsTTT and ply:IsTraitor( )) and Color( 200, 50, 50 ) or team.GetColor( ply:Team( ) );
  519.                
  520.                 cam.Start3D( BB.ply():EyePos(), BB.ply():EyeAngles() );
  521.                     render.SuppressEngineLighting( true );
  522.                     render.SetColorModulation( color.r/255, color.g/255, color.b/255, 1 );
  523.                     render.MaterialOverride( BB.Mat );
  524.                     ply:DrawModel();
  525.                     render.SetColorModulation( BB.AddToColor( color.r, 150 )/255, BB.AddToColor( color.g, 150 )/255, BB.AddToColor( color.b, 150 )/255, 1 );
  526.                    
  527.                     if (IsValid( ply:GetActiveWeapon() )) then
  528.                         ply:GetActiveWeapon():DrawModel()
  529.                     end
  530.                    
  531.                     if (BB.IsTTT && ply:IsTraitor()) then
  532.                         render.SetColorModulation( 1, 0, 0, 1 );
  533.                     else
  534.                         render.SetColorModulation( 1, 1, 1, 1 );
  535.                     end
  536.                    
  537.                     render.MaterialOverride();
  538.                     render.SetModelLighting( 4, color.r/255, color.g/255, color.b/255 );
  539.                     ply:DrawModel();
  540.                     render.SuppressEngineLighting( false );
  541.                 cam.End3D();
  542.             end
  543.         end
  544.        
  545.         for _, ent in pairs( ents.FindByClass( "ttt_c4" ) ) do
  546.             cam.Start3D( BB.ply():EyePos(), BB.ply():EyeAngles() );
  547.                 render.SuppressEngineLighting( true );
  548.                 render.SetColorModulation( 1, 0, 0, 1 );
  549.                 render.MaterialOverride( BB.Mat );
  550.                 ent:DrawModel( );
  551.                
  552.                 render.SetColorModulation( 1, 1, 1, 1 );
  553.                 render.MaterialOverride();
  554.                 render.SetModelLighting( BOX_TOP, 1, 1, 1 )
  555.                 ent:DrawModel();
  556.                    
  557.                 render.SuppressEngineLighting( false );
  558.             cam.End3D();
  559.         end
  560.        
  561.         if (BB.IsTTT) then
  562.             for _, ent in pairs( ents.FindByClass( "prop_ragdoll" ) ) do
  563.                 if ( CORPSE.GetPlayerNick(ent, false) != false ) then
  564.                     cam.Start3D( BB.ply():EyePos(), BB.ply():EyeAngles() );
  565.                         render.SuppressEngineLighting( true );
  566.                         render.SetColorModulation( 1, 0.8, 0.5, 1 );
  567.                         render.MaterialOverride( BB.Mat );
  568.                         ent:DrawModel( );
  569.                        
  570.                         render.SetColorModulation( 1, 1, 1, 1 );
  571.                         render.MaterialOverride();
  572.                         render.SetModelLighting( BOX_TOP, 1, 1, 1 )
  573.                         ent:DrawModel();
  574.                            
  575.                         render.SuppressEngineLighting( false );
  576.                     cam.End3D();
  577.                 end
  578.             end
  579.         end
  580.     end
  581. end
  582.  
  583. function BB.PlayerDeath( ply )
  584.     BB.PrintChat( Color( 255, 255, 255 ), ply:Nick().." has died!" );
  585. end
  586.  
  587. timer.Create( BB.TimerName, 0.25, 0, function( )   
  588.     if (!BB.IsTTT || GetRoundState() != 3) then
  589.         table.Empty( BB.DeadPlayers );
  590.         return;
  591.     end
  592.    
  593.     for _, ply in pairs( BB.players() ) do
  594.         if ((!ply:Alive() || ply:Health() <= 0) && !table.HasValue( BB.DeadPlayers, ply )) then
  595.             table.insert( BB.DeadPlayers, ply );
  596.             BB.PlayerDeath( ply );
  597.         end
  598.     end
  599. end )
  600.  
  601. function BB.TraitorDetector()
  602.     if (!BB.IsTTT || BB.ply():IsTraitor()) then return end
  603.    
  604.     if (GetRoundState() == 2) then
  605.         for _, wep in pairs(ents.GetAll()) do
  606.             if (wep.CanBuy && wep:IsWeapon() && !table.HasValue(BB.TWeaponsFound, wep:EntIndex())) then
  607.                 table.insert( BB.TWeaponsFound, wep:EntIndex() )
  608.             end
  609.         end
  610.     end
  611.    
  612.     if (GetRoundState() != 3 && GetRoundState() != 2) then
  613.         table.Empty( BB.Traitors );
  614.         table.Empty( BB.TWeaponsFound );
  615.         return;
  616.     end
  617.    
  618.     for _, wep in pairs(ents.GetAll()) do
  619.         if (wep:IsWeapon() && wep.CanBuy && IsValid( wep:GetOwner() ) && wep:GetOwner():IsPlayer() && !table.HasValue( BB.TWeaponsFound, wep:EntIndex() )) then
  620.             local ply = wep:GetOwner();
  621.             table.insert( BB.TWeaponsFound, wep:EntIndex() );
  622.            
  623.             if (!ply:IsDetective()) then
  624.                 if (!table.HasValue(BB.Traitors, ply)) then
  625.                     table.insert(BB.Traitors, ply);
  626.                 end
  627.                 if (ply != BB.ply() && !BB.ply():IsTraitor() && BB.CVARS.Bools["Traitor Detector"].cvar:GetBool()) then
  628.                     chat.AddText( Color( 255, 150, 150 ), ply:Nick(), Color( 255, 255, 255 ), " is a ", Color( 255, 50, 50 ), "traitor: ", Color( 200, 120, 50 ), wep:GetPrintName() or wep:GetClass() );
  629.                 end
  630.             end
  631.         end
  632.     end
  633. end
  634.  
  635. function BB.AddHook( hookname, name, func )
  636.     table.insert( BB.RandomHooks.hook, hookname );
  637.     table.insert( BB.RandomHooks.name, name );
  638.     hook.Add( hookname, name, func );
  639. end
  640.  
  641. function BB.Menu( )
  642.     --Creating main stuff
  643.     local UsedCVARS = { };
  644.    
  645.     local Panel = vgui.Create( "DFrame" );
  646.     Panel:SetSize( 500, 300 );
  647.     Panel:SetPos( ScrW()/2-Panel:GetWide()/2, ScrH()/2-Panel:GetTall()/2 );
  648.     Panel:SetTitle( "Blue Bot" );
  649.     Panel:MakePopup();
  650.    
  651.     local SettingsSheet = vgui.Create( "DPropertySheet", Panel );
  652.     SettingsSheet:SetPos( 0, 23 );
  653.     SettingsSheet:SetSize( SettingsSheet:GetParent():GetWide(), SettingsSheet:GetParent():GetTall() - 23 );
  654.    
  655.     local MainPanel = vgui.Create( "DPanel", Panel );
  656.     MainPanel:SetPos( 0, 0 );
  657.     MainPanel:SetSize( MainPanel:GetParent():GetWide(), MainPanel:GetParent():GetTall() - 23 );
  658.     MainPanel.Paint = function() end;
  659.    
  660.     local AimPanel = vgui.Create( "DPanel", Panel );
  661.     AimPanel:SetPos( 0, 0 );
  662.     AimPanel:SetSize( MainPanel:GetParent():GetWide(), MainPanel:GetParent():GetTall() - 23 );
  663.     AimPanel.Paint = function() end;
  664.     AimPanel:SetVisible( false );
  665.    
  666.     local ESPPanel = vgui.Create( "DPanel", Panel );
  667.     ESPPanel:SetPos( 0, 0 );
  668.     ESPPanel:SetSize( MainPanel:GetParent():GetWide(), MainPanel:GetParent():GetTall() - 23 );
  669.     ESPPanel.Paint = function() end;
  670.     ESPPanel:SetVisible( false );
  671.    
  672.     local MiscPanel = vgui.Create( "DPanel", Panel );
  673.     MiscPanel:SetPos( 0, 25 );
  674.     MiscPanel:SetSize( MainPanel:GetParent():GetWide(), MainPanel:GetParent():GetTall() - 23 );
  675.     MiscPanel.Paint = function() end;
  676.     MiscPanel:SetVisible( false );
  677.    
  678.     SettingsSheet:AddSheet("General", MainPanel, "gui/silkicons/user", false, false, "General settings");
  679.     SettingsSheet:AddSheet("Aimbot", AimPanel, "gui/silkicons/user", false, false, "Aimbot settings");
  680.     SettingsSheet:AddSheet("ESP/Chams", ESPPanel, "gui/silkicons/user", false, false, "ESP/Chams settings");
  681.     SettingsSheet:AddSheet("Misc", MiscPanel, "gui/silkicons/user", false, false, "Misc settings");
  682.     --==Main Panel==--
  683.     local Label = vgui.Create( "DLabel", MainPanel );
  684.     Label:SetPos( 10, 5 );
  685.     Label:SetColor( Color( 255, 255, 255, 255 ) );
  686.     Label:SetText( "Settings" );
  687.     Label:SizeToContents();
  688.    
  689.     Label = vgui.Create( "DLabel", MainPanel );
  690.     Label:SetPos( 275, 5 );
  691.     Label:SetColor( Color( 255, 255, 255, 255 ) );
  692.     Label:SetText( "More coming soon" );
  693.     Label:SizeToContents();
  694.    
  695.     local List = vgui.Create( "DPanelList", MainPanel );
  696.     List:SetPos( 10, 20 );
  697.     List:SetSize( 200, 200 );
  698.     List:SetSpacing( 5 );
  699.     List:EnableHorizontal( false );
  700.     List:EnableVerticalScrollbar( true );
  701.     List:SetPadding( 5 );
  702.     function List:Paint()
  703.         draw.RoundedBox( 4, 0, 0, List:GetWide(), List:GetTall(), Color( 0, 0, 0, 150 ) );
  704.     end
  705.    
  706.     table.sort( BB.CVARS.Bools, BB.TableSortByAsc );
  707.    
  708.     for name, base in pairs(BB.CVARS.Bools) do
  709.         if (base.OnMenu && base.main) then
  710.             local CheckBox = vgui.Create( "DCheckBoxLabel" );
  711.             CheckBox:SetText( name );
  712.             CheckBox:SetConVar( base.cvar:GetName() );
  713.             CheckBox:SetValue( base.cvar:GetBool() );
  714.             CheckBox:SizeToContents();
  715.             List:AddItem( CheckBox );
  716.             table.insert( UsedCVARS, base );
  717.         end
  718.     end
  719.    
  720.     List = vgui.Create( "DPanelList", MainPanel );
  721.     List:SetPos( 275, 20 );
  722.     List:SetSize( 200, 200 );
  723.     List:SetSpacing( 5 );
  724.     List:EnableHorizontal( false );
  725.     List:EnableVerticalScrollbar( true );
  726.     List:SetPadding( 5 );
  727.     function List:Paint()
  728.         draw.RoundedBox( 4, 0, 0, List:GetWide(), List:GetTall(), Color( 0, 0, 0, 150 ) );
  729.     end
  730.     --==Aimbot==--
  731.     Label = vgui.Create( "DLabel", AimPanel );
  732.     Label:SetPos( 10, 5 );
  733.     Label:SetColor( Color( 255, 255, 255, 255 ) );
  734.     Label:SetText( "Aimbot settings" );
  735.     Label:SizeToContents();
  736.    
  737.     local List = vgui.Create( "DPanelList", AimPanel );
  738.     List:SetPos( 10, 20 );
  739.     List:SetSize( 200, 200 );
  740.     List:SetSpacing( 5 );
  741.     List:EnableHorizontal( false );
  742.     List:EnableVerticalScrollbar( true );
  743.     List:SetPadding( 5 );
  744.     function List:Paint()
  745.         draw.RoundedBox( 4, 0, 0, List:GetWide(), List:GetTall(), Color( 0, 0, 0, 150 ) );
  746.     end
  747.    
  748.     for name, base in pairs(BB.CVARS.Bools) do
  749.         if (base.OnMenu && !base.main && string.find( base.cvar:GetName(), "aim" )) then
  750.             local CheckBox = vgui.Create( "DCheckBoxLabel" );
  751.             CheckBox:SetText( name );
  752.             CheckBox:SetConVar( base.cvar:GetName() );
  753.             CheckBox:SetValue( base.cvar:GetBool() );
  754.             CheckBox:SizeToContents();
  755.             List:AddItem( CheckBox );
  756.             table.insert( UsedCVARS, base );
  757.         end
  758.     end
  759.    
  760.     local FOVSlider = vgui.Create( "DNumSlider", AimPanel );
  761.     FOVSlider:SetPos( 275, -15 );
  762.     FOVSlider:SetSize( 150, 100 );
  763.     FOVSlider:SetText( "Max Angle" );
  764.     FOVSlider:SetMin( 0 );
  765.     FOVSlider:SetMax( 180 );
  766.     FOVSlider:SetDecimals( 0 );
  767.     FOVSlider:SetConVar( BB.RandomPrefix.."_aimbot_max_angle" );
  768.     FOVSlider.Paint = function()
  769.         draw.RoundedBox( 4, 0, 36, FOVSlider:GetWide(), 25, Color( 0, 0, 0, 150 ) );
  770.     end
  771.     --==ESP==--
  772.     Label = vgui.Create( "DLabel", ESPPanel );
  773.     Label:SetPos( 10, 5 );
  774.     Label:SetColor( Color( 255, 255, 255, 255 ) );
  775.     Label:SetText( "ESP/Chams settings" );
  776.     Label:SizeToContents();
  777.    
  778.     List = vgui.Create( "DPanelList", ESPPanel );
  779.     List:SetPos( 10, 20 );
  780.     List:SetSize( 200, 200 );
  781.     List:SetSpacing( 5 );
  782.     List:EnableHorizontal( false );
  783.     List:EnableVerticalScrollbar( true );
  784.     List:SetPadding( 5 );
  785.     function List:Paint()
  786.         draw.RoundedBox( 4, 0, 0, List:GetWide(), List:GetTall(), Color( 0, 0, 0, 150 ) );
  787.     end
  788.    
  789.     for name, base in pairs(BB.CVARS.Bools) do
  790.         if (base.OnMenu && !base.main && (string.find( base.cvar:GetName(), "esp" ) || string.find( base.cvar:GetName(), "cham" ))) then
  791.             local CheckBox = vgui.Create( "DCheckBoxLabel" );
  792.             CheckBox:SetText( name );
  793.             CheckBox:SetConVar( base.cvar:GetName() );
  794.             CheckBox:SetValue( base.cvar:GetBool() );
  795.             CheckBox:SizeToContents();
  796.             List:AddItem( CheckBox );
  797.             table.insert( UsedCVARS, base );
  798.         end
  799.     end
  800.     --==MISC==--
  801.     Label = vgui.Create( "DLabel", MiscPanel );
  802.     Label:SetPos( 10, 5 );
  803.     Label:SetColor( Color( 255, 255, 255, 255 ) );
  804.     Label:SetText( "Misc settings" );
  805.     Label:SizeToContents();
  806.    
  807.     List = vgui.Create( "DPanelList", MiscPanel );
  808.     List:SetPos( 10, 20 );
  809.     List:SetSize( 200, 200 );
  810.     List:SetSpacing( 5 );
  811.     List:EnableHorizontal( false );
  812.     List:EnableVerticalScrollbar( true );
  813.     List:SetPadding( 5 );
  814.     function List:Paint()
  815.         draw.RoundedBox( 4, 0, 0, List:GetWide(), List:GetTall(), Color( 0, 0, 0, 150 ) );
  816.     end
  817.    
  818.     for name, base in pairs(BB.CVARS.Bools) do
  819.         if (base.OnMenu && !table.HasValue( UsedCVARS, base )) then
  820.             local CheckBox = vgui.Create( "DCheckBoxLabel" );
  821.             CheckBox:SetText( name );
  822.             CheckBox:SetConVar( base.cvar:GetName() );
  823.             CheckBox:SetValue( base.cvar:GetBool() );
  824.             CheckBox:SizeToContents();
  825.             List:AddItem( CheckBox );
  826.         end
  827.     end
  828. end
  829.  
  830. function BB.UpdateMenu()
  831.     local Panel = vgui.Create( "DFrame" );
  832.     Panel:SetSize( 800, 600 );
  833.     Panel:SetPos( ScrW()/2-Panel:GetWide()/2, ScrH()/2-Panel:GetTall()/2 );
  834.     Panel:SetTitle( "Blue Bot - Notice" );
  835.     Panel:MakePopup();
  836.    
  837.     local Label = vgui.Create( "DLabel", Panel );
  838.     Label:SetColor( Color( 255, 255, 255, 255 ) );
  839.     Label:SetFont( "DermaLarge" );
  840.     Label:SetText( "Your version is outdated! "..BB.Version );
  841.     Label:SizeToContents();
  842.     Label:SetPos( Label:GetParent():GetWide()/2-Label:GetWide()/2-5, 50 );
  843.     Label.Paint = function()
  844.         Label:SetColor( Color( 255, 255 - (math.sin( CurTime() * 4 ) * 255), 255 - (math.sin( CurTime() * 4 ) * 255), 255 ) );
  845.     end
  846.    
  847.     local HTML = vgui.Create( "HTML", Panel );
  848.     HTML:OpenURL( "http://bluekirbygmod.googlecode.com/svn/trunk/Blue%20Bot/changelog.txt" );
  849.     HTML:SetSize( HTML:GetParent():GetWide() - 50, HTML:GetParent():GetTall() - 160 );
  850.     HTML:SetPos( 25, 100 )
  851.     HTML.Paint = function()
  852.         surface.SetDrawColor( Color( 255, 255, 255, 255 ) );
  853.         surface.DrawRect( 0, 0, HTML:GetWide(), HTML:GetTall() );
  854.     end
  855.    
  856.     local Button = vgui.Create( "DButton", Panel );
  857.     Button:SetText( "Save" );
  858.     Button:SetSize( Button:GetParent():GetWide() - 50, 25 );
  859.     Button:SetPos( 25, Button:GetParent():GetTall() - 30 );
  860.     Button.DoClick = function()
  861.         HTML:SetVisible( false );
  862.         Panel:SetSize( 400, 150 );
  863.         Panel:SetPos( ScrW()/2-Panel:GetWide()/2, ScrH()/2-Panel:GetTall()/2 );
  864.         Label:SetText( "Saved to data/bluebotv"..BB.V..".txt" );
  865.         Label:SizeToContents();
  866.         Label:SetPos( Label:GetParent():GetWide()/2-Label:GetWide()/2-5, 50 );
  867.         file.Write( "bluebotv"..BB.V..".txt", BB.LatestVersion );
  868.     end
  869. end
  870.  
  871. BB.Init();
  872.  
  873. BB.AddHook( "RenderScreenspaceEffects" , BB.RandomString( 0, true, true ), BB.Chams );
  874. BB.AddHook( "Think", BB.RandomString( 0, true, true ), BB.Aimbot );
  875. BB.AddHook( "Think", BB.RandomString( 0, true, true ), BB.TraitorDetector );
  876. BB.AddHook( "CreateMove", BB.RandomString( 0, true, true ), BB.CreateMove );
  877. BB.AddHook( "CalcView", BB.RandomString( 0, true, true ), BB.NoVisualRecoil );
  878. BB.AddHook( "HUDPaint", BB.RandomString( 0, true, true ), BB.ESP );
  879.  
  880. concommand.Add( BB.RandomPrefix.."_unload", function( ply, cmd, args )
  881.     for i = 1, #BB.RandomHooks.hook do
  882.         hook.Remove( BB.RandomHooks.hook[i], BB.RandomHooks.name[i] );
  883.         BB.Print( true, true, Color( 255, 255, 255 ), "Unhooked "..BB.RandomHooks.hook[i].." using name "..BB.RandomHooks.name[i] );
  884.     end
  885.    
  886.     concommand.Remove( BB.RandomPrefix.."_unload" );
  887.     concommand.Remove( BB.RandomPrefix.."_menu" );
  888.     concommand.Remove( "+"..BB.RandomPrefix.."_aimbot" );
  889.     concommand.Remove( "-"..BB.RandomPrefix.."_aimbot" );
  890.     concommand.Remove( BB.RandomPrefix.."_aimbot_toggle" );
  891.     timer.Destroy( BB.TimerName );
  892.     BB.Unloaded = true;
  893.     BB.Print( true, true, Color( 255, 255, 255 ), "Unloaded successfully!" );
  894. end );
  895.  
  896. concommand.Add( BB.RandomPrefix.."_menu", BB.Menu );
  897. concommand.Add( "+"..BB.RandomPrefix.."_aimbot", function( ply, cmd, args )
  898.     BB.AimbotKeyDown = true;
  899.    
  900.     BB.Aimbot();
  901. end );
  902.  
  903. concommand.Add( "-"..BB.RandomPrefix.."_aimbot", function( ply, cmd, args )
  904.     BB.AimbotKeyDown = false;
  905. end );
  906.  
  907. concommand.Add( BB.RandomPrefix.."_aimbot_toggle", function( ply, cmd, args )
  908.     BB.AimbotKeyDown = !BB.AimbotKeyDown;
  909.     BB.ToggleFade = CurTime() + 1.3;
  910.    
  911.     if (BB.AimbotKeyDown == true) then
  912.         BB.Aimbot();
  913.     end
  914. end );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement