Guest User

Explicity Boat v7 [NOT PASTED]

a guest
Oct 6th, 2015
1,331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 102.11 KB | None | 0 0
  1. /*
  2.        ____                __   _         _   __           ___              __
  3.       / __/ __ __   ___   / /  (_) ____  (_) / /_  __ __  / _ ) ___  ___ _ / /_
  4.      / _/   \ \ /  / _ \ / /  / / / __/ / / / __/ / // / / _  |/ _ \/ _ `// __/
  5.     /___/  /_\_\  / .__//_/  /_/  \__/ /_/  \__/  \_, / /____/ \___/\_,_/ \__/
  6.                  /_/                             /___/                        
  7.     by OJ
  8.    
  9.     www.ExplicityBoat.net
  10.    
  11.     If you have successfully stolen, cracked, or leaked this; congratulations buddy.
  12.     I hope it fuels your ego & helps grow your tiny e-penis.
  13.     The "encryption" was just there to fool people who don't know basic Lua.
  14.     Don't let OJ get ahold of it, he'll rename it and claim it as his own. -- 'Hue hue hue' -Moosicorn
  15.    
  16.     Yes, there is some borrowed code/methods in here, but not much at all.
  17.     I reused a bunch of stuff from Hera v5 & that has since been removed, but some still remains.
  18.    
  19.     !!! You do not have permission to redistribute this. !!!
  20.     !!! You do not have permission to modify this, use any of this, or manipulate it in any way. !!!
  21.        
  22.     -----------------
  23.    
  24.         Credits
  25.        
  26.     -----------------
  27.    
  28.     fr1kin <3 - for teaching me Lua in the first place & tons of help along the way.
  29.     Function - for helping test shit, small fixes, dragon dildos, & bae
  30.     Styler - for Silent aim method
  31.     thedynesty2 - for testing & shit
  32.     OJ - pasting everything he's ever seen & telling people he coded shit until it gets leaked.
  33.     crdriza - general help & shit
  34.    
  35.     daz - some stuff
  36.     & whoever else gave me fancy methods of doing shit
  37.  
  38.    
  39.     --------------------------
  40.    
  41.         TODO List & Ideas
  42.    
  43.     --------------------------
  44.    
  45.     - *** [Slowly replace userdata shit with _R.Entity]
  46.         e.g: _R.Entity.GetPos( player ) instead of player:GetPos()
  47.    
  48.     - [Continue optimizing ESP]
  49.         Ideas:
  50.         - Use OnEntityCreated/Removed to shorten needed loops
  51.         - Only update loop when an entity is created or removed
  52.         - Separate functions for each feature with "if !bool then return end" instead of "if bool then (doshit) end"
  53.         - New fonts?
  54.         - Buy a new fucking graphics card. <-- <-- <-- <-- <--
  55.    
  56.     - [Get Coder/Code a C++ login & loader] <- implying i'll ever do this
  57.         - Use SteamID verification, 1 SteamID per customer
  58.         - IP whitelist on source file
  59.         - AES? encryption for module
  60.         - Auto download gmcl_modules or add needed functions to injected .dll
  61.         - Load before autorun & hide logged location of source.
  62.         - encrypt lua before running
  63.         - GarrysMod/ data directory, or SQL.
  64.    
  65.     ------------------------------
  66.    
  67.         Interesting functions
  68.        
  69.     ------------------------------
  70.    
  71.     gcinfo() - Get Lua memory usage in KB
  72.     AngRand() - Generates a random pitch, yaw, & roll -90 to 90 & -180 to 180
  73.     IsUselessModel( mdl ) - http://wiki.garrysmod.com/page/Global/IsUselessModel
  74.     JoinServer( ip )
  75.     HSVToColor( RealTime() * 120 % 360, 1, 1 ) - Rainbow! ~ I forgot who gave me this, but thanks.
  76.  
  77. */
  78.  
  79. local dickheads = {
  80.     ["STEAM_0:0:103305234"] = true,
  81. }
  82.  
  83. if dickheads[_G.debug.getregistry().Player.SteamID( _G.Entity( _G.LocalPlayer():EntIndex() ) )] then g.MsgN( "Blacklisted." ) return end
  84.  
  85. if _G.ExplicityBoat then
  86.     _G.ExplicityBoat = nil
  87.     MsgC( Color( 255, 0, 0 ), "[ExplicityBoat] Detected an anti-cheat, or ExplicityBoat was reloaded.\n" )
  88. end
  89.  
  90. local ExplicityBoat = {}
  91. ExplicityBoat.DataFolder = "advdupe2 - Copy" -- sneaky sneaky :^)
  92. ExplicityBoat.Info = {
  93.     ["Version"] = "build 1.4.0",
  94.     ["Updated"] = "9/22/15",
  95.     ["Size"] = "95kb",
  96.     ["Lines"] = "3,071",
  97. }
  98.  
  99. local G = table.Copy( _G ) -- fuck listing all functions manually, this is quicker.
  100. local _R = G.debug.getregistry()
  101.  
  102. ExplicityBoat.Detours = {
  103.     ["net.Start"] = {
  104.         ["checksaum"] = true,
  105.         ["checksum"] = true,
  106.         ["gcontrolled_vars"] = true,
  107.         ["controlled_vars"] = true,
  108.         ["quack"] = true,
  109.         ["leyac_cmd"] = true, -- old but blocks old versions
  110.     },
  111.     ["Commands"] = {
  112.     },
  113. }
  114. ExplicityBoat["Spoof"] = {
  115.     ["sv_allowcslua"] = G.GetConVarNumber( "sv_allowcslua" ), // some anti-cheats man..
  116.     ["sv_cheats"] = 0,
  117.     ["host_timescale"] = 1,
  118.     ["host_framerate"] = 0,
  119. }  
  120.  
  121. // Aimbot vars nd shit
  122. ExplicityBoat.Target = nil
  123. ExplicityBoat.Typing = false
  124. ExplicityBoat.Locked = false
  125.  
  126. ExplicityBoat.Bools = {
  127.    
  128.     -- Load settings
  129.     ["load_unhooked"] = false,
  130.    
  131.     -- Aimbot & view settings
  132.     ["aim_toggle"] = false,
  133.     ["aim_autoshoot"] = true,
  134.     ["aim_antiaim"] = true,
  135.     ["aim_silent"] = true,
  136.     ["aim_psilent"] = false,
  137.     ["aim_anti"] = false,
  138.     ["aim_nospread"] = true,
  139.     ["aim_norecoil"] = true,
  140.     ["aim_prediction"] = true, 
  141.     ["aim_antiantiaim"] = false,
  142.     ["aim_checkfov"] = false,
  143.     ["aim_ignorelos"] = false,
  144.     ["aim_ignoresteam"] = true,
  145.     ["aim_ignoreadmins"] = false,
  146.     ["aim_ignorebots"] = false,
  147.     ["aim_ignoreteam"] = false,
  148.     ["aim_ignorefriends"] = true,
  149.    
  150.     -- ESP settings
  151.     ["esp_enabled"] = true,
  152.     ["esp_name"] = true,
  153.     ["esp_health_text"] = true,
  154.     ["esp_health_bar"] = true,
  155.     ["esp_chams"] = true,
  156.     ["esp_chams_weapon"] = true,
  157.     ["esp_weapon"] = true,
  158.     ["esp_box"] = true,
  159.     ["esp_crosshair"] = false,
  160.     ["esp_crosshair_box"] = false,
  161.     ["esp_laser"] = true,
  162.     ["esp_nohands"] = true,
  163.     ["esp_status"] = true,
  164.     ["esp_list"] = true,
  165.     ["esp_snaplines"] = false,
  166.     ["esp_distance"] = false,
  167.     ["esp_dynamiclight"] = false,
  168.     ["esp_wireweapon"] = false,
  169.     ["esp_aimpos"] = false,
  170.  
  171.     ["misc_bhop"] = true,
  172.     ["misc_bhop_autostrafe"] = false,
  173.     ["misc_namechanger"] = false,
  174.     ["misc_debug"] = true,
  175.     ["misc_triggerbot"] = false,
  176.     ["misc_triggerbot_nospread"] = true,
  177.     ["misc_fakelag"] = false,
  178.     ["misc_thirdperson"] = false,
  179.    
  180. }
  181.  
  182. ExplicityBoat.Vars = {
  183.    
  184.     -- Aimbot Vars
  185.     ["aim_distance"] = 2147483647,
  186.     ["aim_fov"] = 180,
  187.     ["aim_offset"] = 0,
  188.     ["aim_method"] = "Hitbox",
  189.     ["aim_anti_method"] = "Classic",
  190.     ["aim_hitbox"] = "Head",
  191.     ["aim_bone"] = "Head",
  192.     ["aim_target_method"] = "Distance",
  193.     ["aim_prediction_method"] = "Engine Vlocity",
  194.     ["aim_anti_spin_speed"] = 10,
  195.    
  196.     -- ESP Vars
  197.     ["esp_distance"] = 3000,
  198.     ["esp_chams_material"] = "Solid",
  199.     ["esp_asus_alpha"] = 0.95,
  200.     ["esp_box_width"] = 1.5,
  201.     ["esp_fov"] = 90,
  202.     ["esp_laser_attachment"] = "Iron Sights",
  203.    
  204.     -- Misc Vars
  205.     ["speedhack_speed"] = 3.5,
  206.     ["speedhack_type"] = "pSpeed",
  207.    
  208.     ["misc_triggerbot_method"] = "Hitbox",
  209.     ["misc_menucolor"] = Color( 0, 188, 255, 75 ),
  210.     ["misc_menucolor2"] = Color( 255, 0, 0, 90 ),
  211.     ["misc_lasercolor"] = Color( 255, 0, 0, 255 ),
  212.     ["misc_thirdperson_distance"] = 90,
  213.     ["misc_fakelag_rate"] = 9,
  214.    
  215. }
  216.  
  217. ExplicityBoat.Binds = {
  218.     ["+aimbot"] = KEY_F,
  219.     ["+menu"] = KEY_INSERT,
  220.     ["+speedhack"] = KEY_B,
  221.     ["+triggerbot"] = KEY_G,
  222. }
  223.  
  224. ExplicityBoat.Entities = {}
  225. ExplicityBoat.Friends = {}
  226. ExplicityBoat.BadEntities = {
  227.     ["env_sprite"] = true,
  228.     ["player"] = true,
  229.     ["prop_physics"] = true,
  230.     ["prop_door_rotating"] = true,
  231.     ["prop_dynamic"] = true,
  232.     ["viewmodel"] = true,
  233.     ["weapon_physgun"] = true,
  234.     ["weapon_physcannon"] = true,
  235.     ["keys"] = true,
  236.     ["pocket"] = true,
  237.     ["gmod_tool"] = true,
  238.     ["physgun_beam"] = true,
  239.     ["func_door_rotating"] = true,
  240.     ["func_breakable_surf"] = true,
  241.     ["worldspawn"] = true,
  242. }
  243.  
  244. ExplicityBoat.Keys = {
  245.     [1] = { Name = "A", Key = KEY_A },
  246.     [2] = { Name = "B", Key = KEY_B },
  247.     [3] = { Name = "C", Key = KEY_C },
  248.     [4] = { Name = "D", Key = KEY_D },
  249.     [5] = { Name = "E", Key = KEY_E },
  250.     [6] = { Name = "F", Key = KEY_F },
  251.     [7] = { Name = "G", Key = KEY_G },     
  252.     [8] = { Name = "H", Key = KEY_H },
  253.     [9] = { Name = "I", Key = KEY_I },
  254.     [10] = { Name = "J", Key = KEY_J },
  255.     [11] = { Name = "K", Key = KEY_K },
  256.     [12] = { Name = "L", Key = KEY_L },
  257.     [13] = { Name = "M", Key = KEY_M },
  258.     [14] = { Name = "N", Key = KEY_N },
  259.     [15] = { Name = "O", Key = KEY_O },
  260.     [16] = { Name = "P", Key = KEY_P },
  261.     [17] = { Name = "Q", Key = KEY_Q },
  262.     [18] = { Name = "R", Key = KEY_R },
  263.     [19] = { Name = "S", Key = KEY_S },
  264.     [20] = { Name = "T", Key = KEY_T },
  265.     [21] = { Name = "U", Key = KEY_U },
  266.     [22] = { Name = "V", Key = KEY_V },
  267.     [23] = { Name = "W", Key = KEY_W },
  268.     [24] = { Name = "X", Key = KEY_X },
  269.     [25] = { Name = "Y", Key = KEY_Y },
  270.     [26] = { Name = "Z", Key = KEY_Z },
  271.     [27] = { Name = "SPACE", Key = KEY_SPACE },
  272.     [28] = { Name = "TAB", Key = KEY_TAB },
  273.     [29] = { Name = "Left Shift", Key = KEY_LSHIFT },
  274.     [30] = { Name = "Right Shift", Key = KEY_RSHIFT },
  275.     [31] = { Name = "Left Alt", Key = KEY_LALT },
  276.     [32] = { Name = "Right Alt", Key = KEY_RALT },
  277.     [33] = { Name = "Delete", Key = KEY_DELETE },
  278.     [34] = { Name = ".", Key = KEY_PERIOD },
  279.     [35] = { Name = "/", Key = KEY_SLASH },
  280.     [36] = { Name = "[", Key = KEY_LBRACKET },
  281.     [37] = { Name = ";", Key = KEY_SEMICOLON },
  282.     [38] = { Name = "'", Key = KEY_APOSTROPHE },
  283.     [39] = { Name = ",", Key = KEY_COMMA },
  284.     [40] = { Name = "Insert", Key = KEY_INSERT },
  285. }
  286.  
  287. ExplicityBoat.DefaultConfig = G.file.Read( ExplicityBoat.DataFolder .. "/defaultconfig.txt", "DATA" ) or "default"
  288.  
  289. // nospread shit
  290. ExplicityBoat.RecoilBackup = {}
  291.  
  292. ExplicityBoat.BadWeapons = {
  293.     ["gmod_tool"] = true,
  294.     ["gmod_camera"] = true,
  295.     ["weapon_physgun"] = true,
  296.     ["weapon_crowbar"] = true,
  297.     ["keys"] = true,
  298.     ["pocket"] = true,
  299. }
  300.  
  301. ExplicityBoat["Colors"] = {
  302.     ["White"] = Color( 255, 255, 255, 255 ),
  303.     ["Black"] = Color( 0, 0, 0, 255 ),
  304.     ["Green"] = Color( 0, 255, 0, 255 ),
  305.     ["Red"] = Color( 255, 0, 0, 255 ),
  306.     ["DarkRed"] = Color( 200, 50, 50, 255 ),
  307.     ["Cyan"] = Color( 0, 255, 255, 255 ),
  308.     ["Purple"] = Color( 255, 0, 255 ),
  309. }
  310.  
  311. ExplicityBoat.AdminGroups = {
  312.     ["trialmod"] = true,
  313.     ["tmod"] = true,
  314.     ["trial-mod"] = true,
  315.     ["trialmoderator"] = true,
  316.     ["t-mod"] = true,
  317.     ["mod"] = true,
  318.     ["moderator"] = true,
  319.     ["operator"] = true,
  320.     ["vipmod"] = true,
  321.     ["vipmoderator"] = true,
  322.     ["admin"] = true,
  323.     ["vipadmin"] = true,
  324.     ["head-admin"] = true,
  325.     ["headadmin"] = true,
  326.     ["manager"] = true,
  327.     ["developer"] = true,
  328.     ["dev"] = true,
  329.     ["superadmin"] = true,
  330.     ["sadmin"] = true,
  331.     ["super"] = true,
  332.     ["vipsuperadmin"] = true, -- i cry
  333.     ["owner"] = true,
  334.     ["root_user"] = true,
  335.     ["vipowner"] = true, -- wouldn't be surprised it
  336.     ["doubleadmin"] = true, -- what the fuck is this
  337. }
  338.  
  339. G.surface.CreateFont( "ExplicityBoat_status", { font = "coolvetica", size = 20, antialias = true } ) -- HudHintTextLarge
  340. G.surface.CreateFont( "ExplicityBoat_logo", { size = 25, weight = 0, antialias = true, shadow = false, font = "Tahoma" } )
  341. G.surface.CreateFont( "ExplicityBoat_logo_small", { size = 13, weight = 0, antialias = true, shadow = false, font = "Tahoma" } )
  342. G.surface.CreateFont( "ESPFont", { size = 14, weight = 200, antialias = false, shadow = true, font = "Arial" } )
  343.  
  344. /* General notification/display functions */
  345.  
  346. local sound
  347. function ExplicityBoat.Sound( Error )
  348.     if Error then
  349.         sound = G.Sound( "/HL1/fvox/buzz.wav" )
  350.     else
  351.         sound = G.Sound( "/buttons/button17.wav" )
  352.     end
  353.     local createSound = G.CreateSound( G.LocalPlayer(), sound )
  354.     createSound:Play()
  355. end
  356.  
  357. function ExplicityBoat.Message( col, text )
  358.     G.MsgC( ExplicityBoat.Colors.Cyan, "[ExplicityBoat]: " )
  359.     G.MsgC( col, text .. "\n" )
  360. end
  361.  
  362. function ExplicityBoat.ACNotify( text )
  363.     G.MsgC( ExplicityBoat.Colors.White, "[ExplicityBoat]: " )
  364.     G.MsgC( ExplicityBoat.Colors.Red, text .. "\n" )
  365.     ExplicityBoat.logEvent( "anticheat", text )
  366.     ExplicityBoat.Sound( Error )
  367. end
  368.  
  369. function ExplicityBoat.Debug( text )
  370.     if ExplicityBoat.Bools["misc_debug"] then
  371.         G.MsgC( ExplicityBoat.Colors.Purple, "[ExplicityBoatDebug]: " )
  372.         G.MsgC( Color( 255, 255, 255 ), text .. "\n" )
  373.     end
  374.     ExplicityBoat.logEvent( "Debug", text )
  375. end
  376.  
  377. function ExplicityBoat.LogDetour( text )
  378.     if ExplicityBoat.Bools["misc_debug"] then
  379.         G.MsgC( ExplicityBoat.Colors.White, "[ExplicityBoatDetour]: " )
  380.         G.MsgC( Color( 255, 255, 255 ), text .. "\n" )
  381.     end
  382.     ExplicityBoat.logEvent( "Detour", text )
  383. end
  384.  
  385. /* Detour function */
  386. function ExplicityBoat.Detour( Old, New )
  387.     ExplicityBoat.Detours[New] = Old
  388.     ExplicityBoat.Message( Color( 200, 150, 255 ), "Detouring function " .. G.tostring( Old ) .. "." )
  389.     ExplicityBoat.logEvent( "Load", "Detouring function " .. G.tostring( Old ) .. "." )
  390.     return New
  391. end
  392.  
  393. -- Load the modules
  394. G.require( "bsendpacket" ) bSendPacket = true
  395. G.require( "snixzz2" )
  396. G.require( "pspeed" )
  397. G.require( "name_enabler" )
  398.  
  399. -- C++ Module functions
  400. ExplicityBoat.Functions = {
  401.  
  402.     -- gmcl_frozen
  403.     ["PredictSpread"] = _G.NHTable.ZeroSpread,
  404.     ["SetMuted"] = _G.NHTable.SetMuted,
  405.     ["LocalPlayer"] = _G.NHTable.SetLPIndex,
  406.     ["SetCvarName"] = _G.NHTable.SetCvarName,
  407.     ["ConCommand"] = _G.NHTable.ClientCMD,
  408.     ["IsMuted"] = _G.NHTable.IsMuted,
  409.     ["NoDraw"] = _G.NHTable.NoDraw,
  410.     ["RawGet"] = _G.NHTable.RawGet,
  411.     ["SetViewAngles"] = _G.NHTable.SetViewAngles,
  412.     ["AsusWalls"] = _G.NHTable.AsusWalls,
  413.     ["GetCvar"] = _G.NHTable.GetCvar,
  414.     ["IsDormant"] = _G.NHTable.IsDormant,
  415.     ["GetServerIP"] = _G.NHTable.GetServerIP,
  416.     ["Changename"] = _G.NHTable.Changename,
  417.     ["IsVisible"] = _G.NHTable.IsVisible,
  418.     ["SetCvarValue"] = _G.NHTable.SetCvarValue,
  419.    
  420.     -- gmcl_pspeed
  421.     ["SetSpeed"] = _G.SetSpeed,
  422.  
  423. }
  424.  
  425. ExplicityBoat.ACStatus = {
  426.     ["CAC"] = "DETECTED",
  427.     ["LeyAC"] = "DETECTED",
  428.     ["TAC v4"] = "UNDETECTED",
  429.     ["HERP-AC"] = "BYPASSED",
  430.     ["TAC v2"] = "BYPASSED",
  431.     ["QAC"] = "BYPASSED",
  432.     ["VAC"] = "UNDETECTED", -- Shut up, it does exist. it's a tiny blacklist.
  433.     ["GAC"] = "UNDETECTED",
  434.     ["Kevlar"] = "UNDETECTED",
  435.     ["Daz's AC"] = "UNDETECTED",
  436.     ["GModZ AC"] = "UNDETECTED",
  437.     ["VBAC"] = "UNDETECTED",
  438. }
  439.  
  440. /*
  441.     Logging system
  442. */
  443. ExplicityBoat.LogCache = {}
  444. ExplicityBoat.ConsoleLogs = {}
  445. ExplicityBoat.LastLog = 0
  446. ExplicityBoat.MaxLogs = 15
  447. ExplicityBoat.NoLog = { -- Types of logs to not save in data/
  448.     ["Setting"] = true,
  449.     ["Load"] = true,
  450.     ["Detours"] = true,
  451.     ["Config"] = true,
  452.     ["Info"] = true,
  453.     ["debug"] = true,
  454.     ["Timer"] = true,
  455.     ["Hook"] = true,
  456.     ["Main"] = true,
  457. }
  458.  
  459. ExplicityBoat.Lines = {}
  460. function ExplicityBoat.logEvent( Type, str )
  461.  
  462.     G.table.insert( ExplicityBoat.Lines, str )
  463.     if ExplicityBoat.Console then
  464.         ExplicityBoat.Console:AddLine( str )
  465.     end
  466.    
  467.     ExplicityBoat.LogCache[Type] = str
  468.  
  469.     ExplicityBoat.ConsoleLogs[ExplicityBoat.LastLog + 1] = str
  470.     ExplicityBoat.LastLog = ExplicityBoat.LastLog + 1
  471.    
  472.     if ExplicityBoat.LastLog == ExplicityBoat.MaxLogs then
  473.         ExplicityBoat.ConsoleLogs = {}
  474.         ExplicityBoat.LastLog = 0
  475.     end
  476.    
  477.     if !ExplicityBoat.NoLog[Type] then
  478.         local logFile = "[" .. G.os.date() .. "] " .. str .. "\n"
  479.         G.file.Append( ExplicityBoat.DataFolder .. "/logs/" .. Type .. ".txt", logFile )
  480.     end
  481. end
  482.  
  483. /* Anti-Cheat bypass functions */
  484. -- This is all really outdated. TODO: Update thhis
  485. ExplicityBoat.Backup = {}
  486. function ExplicityBoat.AntiCheats()
  487.    
  488.     -- Notify of detoured functions i guess
  489.     for k, v in G.pairs( ExplicityBoat.Functions ) do
  490.         ExplicityBoat.Message( Color( 200, 255, 0 ), "Copied function " .. G.tostring( v ) .. " '" .. k .. "'" )
  491.         v = nil
  492.     end
  493.  
  494.     -- HERP-AC c+p shitty ac
  495.     if _G.CheckVars then
  496.         ExplicityBoat.ACNoitfy( "function CheckVars exists, detouring the scan." )
  497.         _G.CheckVars = ExplicityBoat.Detour( _G.CheckVars, function()
  498.             ExplicityBoat.Message( Color( 50, 255, 50 ), "HERP-AC attempted to scan cvars, stopping that..." )
  499.         end )
  500.     end
  501.    
  502.     -- Tyler's Anti-Cheat v2 (shameless bypass of my own anti-cheat)
  503.     if _G.RunCheck then
  504.         ExplicityBoat.ACNoitfy( "function RunCheck exists, detouring." )
  505.         _G.RunCheck = ExplicityBoat.Detour( _G.RunCheck, function()
  506.             ExplicityBoat.Message( Color( 50, 255, 50 ), "TAC attempted to run a check, returning no information." )
  507.         end )
  508.     end
  509.    
  510.     -- Prestige Gaming CAC
  511.     if _G.CAC then
  512.         ExplicityBoat.ACNoitfy( "table CAC exists, bypassing anti-cheat." )
  513.         function CAC:FilePlayer() ExplicityBoat.ACNoitfy( "CAC:FilePlayer() Attempted to run" ) end
  514.         G.timer.Destroy( "CAC" )
  515.     end
  516.  
  517.     -- Some shitty PERP anti-cheat
  518.     G.concommand.Remove( "0_u_found" )
  519.     G.concommand.Add( "0_u_found", function()
  520.         ExplicityBoat.ACNoitfy( "anti-cheat concommand 0_u_found blocked" )
  521.     end )
  522.     G.hook.Remove( "InitPostEntity", "detrp" )
  523.    
  524.     -- Anti-cheat current detection status
  525.     for k, v in G.pairs( ExplicityBoat.ACStatus ) do
  526.         G.MsgC( Color( 255, 150, 0 ), "[ExplicityBoat] " )
  527.         G.MsgC( Color( 255, 255, 255 ), k .. ": " )
  528.         if v == "DETECTED" then
  529.             G.MsgC( Color( 255, 0, 0 ), v .. "\n" )
  530.         elseif v == "BYPASSED" then
  531.             G.MsgC( Color( 255, 255, 0 ), v .. "\n" )
  532.         elseif v == "UNDETECTED" then
  533.             G.MsgC( Color( 0, 255, 0 ), v .. "\n" )
  534.         end
  535.     end
  536.    
  537.     G.hook.Remove( "OnGamemodeLoaded", "___scan_g_init" )
  538.     G.hook.GetTable()["OnGamemodeLoaded"]["___scan_g_init"] = function() end
  539.        
  540. end
  541. ExplicityBoat.AntiCheats()
  542.  
  543. -- TODO: Add runstring section to menu
  544. local compiledString
  545. function ExplicityBoat.RunString( str )
  546.  
  547.     compiledString = G.CompileString( str, "[C]", false )
  548.    
  549.     if G.type( compiledString ) == "string" then
  550.         ExplicityBoat.Message( Color( 0, 255, 255 ), "Failed to run Lua. '" .. str .. "'" )
  551.         return
  552.     end
  553.  
  554.     compiledString()
  555.    
  556. end
  557.  
  558. local Name
  559. ExplicityBoat.Hooks = {}
  560. function ExplicityBoat.AddHook( Type, Func )
  561.     Name = G.tostring( Func )
  562.     ExplicityBoat.Message( Color( 255, 255, 0 ), "Adding unsecure hook '" .. Name .. "'" )
  563.     ExplicityBoat.Hooks[Type] = Name
  564.     return G.hook.Add( Type, Name, Func )
  565. end
  566.  
  567. ExplicityBoat.TimerCache = {}
  568. function ExplicityBoat.RegisterTimer( delay, rep, func )
  569.     Name = G.tostring( func )
  570.     ExplicityBoat.Message( Color( 125, 0, 282 ), "Adding timer " .. Name .. " with delay '" .. Name .. "'" )
  571.     ExplicityBoat.logEvent( "Load", "Adding timer " .. Name .. " with delay '" .. Name .. "'" )
  572.     G.table.insert( ExplicityBoat.TimerCache, Name )
  573.     return G.timer.Create( Name, delay, rep, func )
  574. end
  575.  
  576. function ExplicityBoat.ForceCvar( cvar, value ) -- removed until further notice
  577.     if ExplicityBoat.Spoof[cvar] == nil then
  578.         ExplicityBoat.Spoof[cvar] = G.GetConVarNumber( cvar )
  579.     end
  580.     --G.GetConVar( cvar ):SetValue( value )
  581. end
  582.  
  583. /*
  584.  
  585.     Settings & Menu backend.
  586.     Config system recycled from hake v2
  587.     Re-wrote a bit of it.
  588.    
  589. */
  590.  
  591. function ExplicityBoat.CreateOption( dtype, parent, oText, oBool, xPos, yPos, oWide, xPos2, yPos2, oDec, func )
  592.     local addx, addy = 3, 3.5
  593.    
  594.     if dtype == "Checkbox" then
  595.         dtype = "DCheckBoxLabel"
  596.         local text, bool, x, y = oText, oBool, xPos, yPos
  597.         local checkbox = G.vgui.Create( dtype, parent )
  598.         checkbox:SetText( text )
  599.         checkbox:SetPos( x + addx, y + addy )
  600.         checkbox:SizeToContents()
  601.         checkbox:SetTextColor( G.color_white )
  602.         checkbox:SetChecked( ExplicityBoat.Bools[bool] )
  603.         checkbox.OnChange = function( check )
  604.             ExplicityBoat.Bools[bool] = checkbox:GetChecked()
  605.         end    
  606.        
  607.     elseif dtype == "Slider" then
  608.         dtype = "DNumSlider"
  609.         local text, var, min, max, wide, x, y, Dec = oText, oBool, xPos, yPos, oWide, xPos2, yPos2, oDec
  610.         local slider = G.vgui.Create( dtype, parent )
  611.         slider:SetPos( x + addx, y + addy )
  612.         slider:SetWide( wide )
  613.         slider:SetText( text )
  614.         slider:SetMin( min )
  615.         slider:SetMax( max )
  616.         slider:SetDecimals( Dec )
  617.         slider:SetValue( ExplicityBoat.Vars[var] )
  618.         slider.OnValueChanged = function( p, v )
  619.             ExplicityBoat.Vars[var] = v
  620.         end
  621.        
  622.     elseif dtype == "Label" then
  623.         dtype = "DLabel"
  624.         local text, x, y = oText, oBool, xPos
  625.         local label = G.vgui.Create( dtype, parent )
  626.         label:SetPos( x, y )
  627.         label:SetText( text )
  628.         label:SizeToContents()
  629.         label:SetTextColor( G.color_white )
  630.        
  631.     end
  632. end
  633.  
  634. function ExplicityBoat.ConfigExists( cfg )
  635.     if G.file.Exists( ExplicityBoat.DataFolder .. "/configs/" .. ExplicityBoat.Info.Version .. "/" .. cfg .. ".txt", "DATA" ) then
  636.         return true
  637.     else
  638.         return false
  639.     end
  640. end
  641.  
  642. function ExplicityBoat.SaveConfig( cfg )
  643.     local save = {}
  644.     save.Vars = ExplicityBoat.Vars
  645.     save.Bools = ExplicityBoat.Bools
  646.     save.Binds = ExplicityBoat.Binds
  647.     save.Entities = ExplicityBoat.Entities
  648.     save.Friends = ExplicityBoat.Friends
  649.     cfg = G.string.gsub( cfg, " ", "_" )
  650.     if !ExplicityBoat.ConfigExists( cfg ) then
  651.         G.table.insert( ExplicityBoat.Configs, cfg )
  652.         G.file.Write( ExplicityBoat.DataFolder .. "/configs/" .. ExplicityBoat.Info.Version .. "/" .. cfg .. ".txt", G.util.TableToJSON( save ) )
  653.         ExplicityBoat.Message( ExplicityBoat.Colors.Green, "Created config " .. cfg .. "!" )
  654.         ExplicityBoat.logEvent( "Config", "Created config '" .. cfg .. "'" )
  655.     else
  656.         ExplicityBoat.Message( ExplicityBoat.Colors.Red, "Config " .. cfg .. " already exists!" )
  657.         ExplicityBoat.logEvent( "Config", "Config " .. cfg .. " already exists" )
  658.     end
  659. end
  660.  
  661. function ExplicityBoat.UpdateConfig()
  662.     local cfg = ExplicityBoat.CurrentConfig
  663.     if cfg != "default" then
  664.         if ExplicityBoat.ConfigExists( cfg ) then
  665.             local save = {}
  666.             save.Vars = ExplicityBoat.Vars
  667.             save.Bools = ExplicityBoat.Bools
  668.             save.Binds = ExplicityBoat.Binds
  669.             save.Entities = ExplicityBoat.Entities
  670.             save.Friends = ExplicityBoat.Friends
  671.             G.file.Write( ExplicityBoat.DataFolder .. "/configs/" .. ExplicityBoat.Info.Version .. "/" .. cfg .. ".txt", G.util.TableToJSON( save ) )
  672.             ExplicityBoat.Message( ExplicityBoat.Colors.Green, "Updated '" .. cfg .. "' with current settings" )
  673.             ExplicityBoat.logEvent( "Config", "Updated '" .. cfg .. "' with current settings" )
  674.         else
  675.             ExplicityBoat.Message( ExplicityBoat.Colors.Red, "Config " .. cfg .. " wasn't found!" )
  676.             ExplicityBoat.logEvent( "Config", "Config '" .. cfg .. "' wasn't found" )
  677.         end
  678.     else
  679.         ExplicityBoat.Message( ExplicityBoat.Colors.Red, "You can't modify 'default' config!" )
  680.         ExplicityBoat.logEvent( "Config", "You can't modify 'default' config!" )
  681.     end    
  682. end
  683.    
  684. function ExplicityBoat.LoadConfig( cfg )
  685.     cfg = G.string.lower( cfg )
  686.     if ExplicityBoat.CurrentConfig != cfg then
  687.         if ExplicityBoat.ConfigExists( cfg ) then
  688.             local ToRead = G.util.JSONToTable( G.file.Read( ExplicityBoat.DataFolder .. "/configs/" .. ExplicityBoat.Info.Version .. "/" .. cfg .. ".txt", "DATA" ) )
  689.             ExplicityBoat.Vars = ToRead.Vars
  690.             ExplicityBoat.Bools = ToRead.Bools
  691.             ExplicityBoat.Binds = ToRead.Binds
  692.             ExplicityBoat.Entities = ToRead.Entities
  693.             ExplicityBoat.Friends = ToRead.Friends
  694.             ExplicityBoat.CurrentConfig = cfg
  695.             ExplicityBoat.Message( ExplicityBoat.Colors.Green, "Loaded config '" .. cfg .. "'" )
  696.             ExplicityBoat.logEvent( "Config", "Loaded config '" .. cfg .."'" )
  697.         else
  698.             ExplicityBoat.LoadConfig( "default" )
  699.             ExplicityBoat.CurrentConfig = "default"
  700.             ExplicityBoat.Message( Color( 255, 0, 0 ), "Invalid config file! '" .. cfg .. "' Loading default!" )
  701.             ExplicityBoat.logEvent( "Config", "Invalid config file '" .. cfg .."' Loading default!" )
  702.         end
  703.     else
  704.         ExplicityBoat.Message( ExplicityBoat.Colors["White"], "Config " .. cfg .. " is already loaded!" )
  705.         ExplicityBoat.logEvent( "Config", "Config '" .. cfg .."' is already loaded." )
  706.     end
  707. end
  708.  
  709. function ExplicityBoat.DeleteConfig( cfg )
  710.     cfg = G.string.lower( cfg )
  711.     if cfg != ExplicityBoat.DefaultConfig then
  712.         if G.file.Exists( ExplicityBoat.DataFolder .. "/configs/" .. ExplicityBoat.Info.Version .. "/" .. cfg .. ".txt", "DATA" ) then
  713.             G.file.Delete( ExplicityBoat.DataFolder .. "/configs/" .. ExplicityBoat.Info.Version .. "/" .. cfg .. ".txt" )
  714.             ExplicityBoat.Message( ExplicityBoat.Colors["DarkRed"], "Deleted config " .. cfg )
  715.             ExplicityBoat.logEvent( "Config", "Deleted config '" .. cfg .. "'" )
  716.         else
  717.             ExplicityBoat.Message( Color( 255, 0, 0 ), "Unable to find config " .. cfg "!" )
  718.             ExplicityBoat.logEvent( "Config", "Unable to find config '" .. cfg .."'" )
  719.         end
  720.     else
  721.         ExplicityBoat.Message( ExplicityBoat.Colors["Red"], "You cannot delete the default config!" )
  722.         ExplicityBoat.logEvent( "Config", "You cannot delete the default config" )
  723.     end
  724. end
  725.  
  726. function ExplicityBoat.RenameConfig( Old, New )
  727.     New = G.string.gsub( New, " ", "_" )
  728.     New = G.string.lower( New )
  729.     if Old != ExplicityBoat.DefaultConfig then
  730.         if !ExplicityBoat.ConfigExists( New ) then
  731.             local OldConfig = G.file.Read( ExplicityBoat.DataFolder .. "/configs/" .. ExplicityBoat.Info.Version .. "/" .. Old .. ".txt", "DATA" )
  732.             if ExplicityBoat.ConfigExists( Old ) then
  733.                 G.file.Delete( ExplicityBoat.DataFolder .. "/configs/" .. ExplicityBoat.Info.Version .. "/" .. Old .. ".txt", "DATA" )
  734.             end
  735.             G.file.Write( ExplicityBoat.DataFolder .. "/configs/" .. ExplicityBoat.Info.Version .. "/" .. New .. ".txt", OldConfig )
  736.             ExplicityBoat.Message( ExplicityBoat.Colors["DarkRed"], "Renamed " .. Old .. " to " .. New .. "." )
  737.             ExplicityBoat.logEvent( "Config", "Renamed config '" .. Old .. "' to '" .. New .. "'" )
  738.         else
  739.             ExplicityBoat.Message( Color( 255, 0, 0 ), "Config " .. New .. " already exists! Pick a different name." )
  740.             ExplicityBoat.logEvent( "Config", "Config '" .. New .. "' already exists, pick a different name" )
  741.         end
  742.     else
  743.         ExplicityBoat.Message( ExplicityBoat.Colors["Red"], "You cannot rename the default config!" )
  744.         ExplicityBoat.logEvent( "Config", "You cannot rename the default config" )
  745.     end
  746. end
  747.  
  748. function ExplicityBoat.SetDefaultConfig( cfg )
  749.     if cfg != ExplicityBoat.DefaultConfig then
  750.         if ExplicityBoat.ConfigExists( cfg ) then
  751.             ExplicityBoat.DefaultConfig = cfg
  752.             G.file.Write( ExplicityBoat.DataFolder .. "/defaultconfig.txt", ExplicityBoat.DefaultConfig )
  753.             ExplicityBoat.Message( Color( 255, 255, 0 ), "Set '" .. cfg .. "' as the default config." )
  754.             ExplicityBoat.logEvent( "Config", "Set '" .. cfg .. "' as the default config" )
  755.         else
  756.             ExplicityBoat.Message( Color( 255, 0, 0 ), "'" .. cfg .. "' is not a valid config!" )
  757.             ExplicityBoat.logEvent( "Config", "Config '" .. cfg .. "' is not a valid config" )
  758.         end
  759.     else
  760.         ExplicityBoat.Message( Color( 255, 0, 0 ), "'" .. cfg .. "' is already the default config!" )
  761.         ExplicityBoat.logEvent( "Config", "Config '" .. cfg .."' is already the default config" )
  762.     end
  763. end
  764.  
  765. function ExplicityBoat.BindKey( Bind, Key )
  766.     if ExplicityBoat.Binds[Bind] then
  767.         for _, v in G.pairs( ExplicityBoat.Keys ) do
  768.             if Key == v.Name then
  769.                 ExplicityBoat.Binds[ Bind ] = v.Key
  770.                 ExplicityBoat.Message( ExplicityBoat.Colors["Green"], "Bound " .. Bind .. " to " .. Key .. "!" )
  771.                 ExplicityBoat.logEvent( "Config", "Bound '" .. Bind .. "' to '" .. Key .. "'" )
  772.             end
  773.         end  
  774.     end
  775. end
  776.  
  777. function ExplicityBoat.Unbind( Bind )
  778.     if ExplicityBoat.Binds[ Bind ] then
  779.         ExplicityBoat.Binds[ Bind ] = nil
  780.         ExplicityBoat.Message( ExplicityBoat.Colors["DarkRed"], "Unbound " .. Bind .. "!" )
  781.         ExplicityBoat.logEvent( "Config", "Unbound '" .. Bind .. "'" )
  782.     end
  783. end
  784.  
  785. function ExplicityBoat.GetConfigs()
  786.     local files = G.file.Find( ExplicityBoat.DataFolder .. "/configs/" .. ExplicityBoat.Info.Version .. "/*.txt", "DATA")
  787.     for k, v in G.pairs( files ) do
  788.         files[ k ] = G.string.Replace( v, ".txt", "" )
  789.     end  
  790.     return files
  791. end
  792. ExplicityBoat.Configs = ExplicityBoat.GetConfigs()
  793.  
  794. /*
  795.  
  796.     filesystem
  797.  
  798. */
  799.  
  800. ExplicityBoat.DataFiles = {
  801.     "defaultconfig.txt",
  802.     "logs/Main.txt",
  803.     "logs/AntiCheat.txt",
  804.     "logs/Detour.txt",
  805.     "logs/Debug.txt",
  806. }
  807. ExplicityBoat.DataFolders = {
  808.     "configs",
  809.     "configs/" .. ExplicityBoat.Info.Version,
  810.     "logs",
  811. }
  812.  
  813. function ExplicityBoat.FileSystem()
  814.    
  815.     if !G.file.IsDir( ExplicityBoat.DataFolder, "DATA" ) then
  816.         G.file.CreateDir( ExplicityBoat.DataFolder )
  817.         ExplicityBoat.Message( Color( 0, 255, 0 ), "Creating '" .. ExplicityBoat.DataFolder .. "' main data folder." )
  818.     end
  819.    
  820.     for k, v in G.next, ExplicityBoat.DataFolders do
  821.         if !G.file.IsDir( ExplicityBoat.DataFolder .. "/" ..  v, "DATA" ) then
  822.             G.file.CreateDir( ExplicityBoat.DataFolder .. "/" .. v )
  823.             ExplicityBoat.Message( Color( 0, 255, 0 ), "Creating '" .. ExplicityBoat.DataFolder .. "/" .. v .. "' data folder." )
  824.         end
  825.     end
  826.  
  827.     for k, v in G.next, ExplicityBoat.DataFiles do
  828.         if !G.file.Exists( ExplicityBoat.DataFolder .. "/" ..  v, "DATA" ) then
  829.             if v == "defaultconfig.txt" then   
  830.                 G.file.Write( ExplicityBoat.DataFolder .. "/" .. v, ExplicityBoat.DefaultConfig )
  831.             else
  832.                 G.file.Write( ExplicityBoat.DataFolder .. "/" .. v, "=== ExplicityBoat by 0xymoron ===\n\n" )
  833.             end
  834.             ExplicityBoat.Message( Color( 0, 255, 0 ), "Creating '" .. ExplicityBoat.DataFolder .. "/" .. v .. "' data file." )
  835.         end
  836.     end
  837.    
  838.     if !ExplicityBoat.ConfigExists( "default" ) then
  839.         ExplicityBoat.SaveConfig( "default" )
  840.     end
  841. end
  842. ExplicityBoat.Message( Color( 255, 255, 0 ), "Loading filesystem.." )
  843. ExplicityBoat.FileSystem()
  844.  
  845. /*
  846.     ESP functions
  847. */
  848.  
  849. -- borrowed from snipwnage2's cheat with permission
  850. function ExplicityBoat.GetBounds( v )
  851.  
  852.     local eyePos = v:EyeAngles()
  853.     local min = v:OBBMins()
  854.     local max = v:OBBMaxs()
  855.    
  856.     local corners = {
  857.         G.Vector( min.x, min.y, min.z ),
  858.         G.Vector( min.x, min.y, max.z ),
  859.         G.Vector( min.x, max.y, min.z ),
  860.         G.Vector( min.x, max.y, max.z ),
  861.         G.Vector( max.x, min.y, min.z ),
  862.         G.Vector( max.x, min.y, max.z ),
  863.         G.Vector( max.x, max.y, min.z ),
  864.         G.Vector( max.x, max.y, max.z ),
  865.     }
  866.    
  867.     local minx = G.math.huge
  868.     local miny = G.math.huge
  869.     local maxx = -G.math.huge
  870.     local maxy = -G.math.huge
  871.    
  872.     for _, corner in G.next, corners do
  873.         local screen = v:LocalToWorld( corner ):ToScreen()
  874.         minx = G.math.min( minx, screen.x )
  875.         miny = G.math.min( miny, screen.y )
  876.         maxx = G.math.max( maxx, screen.x )
  877.         maxy = G.math.max( maxy, screen.y )
  878.     end
  879.    
  880.     return minx, miny, maxx, maxy
  881. end
  882.  
  883. -- Thanks gmod wiki!
  884. function ExplicityBoat.DrawOutlinedBox( x, y, w, h, thickness, color )
  885.     G.surface.SetDrawColor( color )
  886.     for i = 0, thickness - 1 do
  887.         G.surface.DrawOutlinedRect( x + i, y + i, w - i * 2, h - i * 2 )
  888.     end
  889. end
  890.  
  891. function ExplicityBoat.IsAdmin( v )
  892.  
  893.     if v:IsAdmin() then
  894.         return true
  895.     end
  896.    
  897.     if ExplicityBoat.AdminGroups[v:GetUserGroup()] then
  898.         return true
  899.     end
  900.    
  901. end
  902.  
  903. function ExplicityBoat.ShouldDraw( v )
  904.  
  905.     // better fps maybe
  906.     local distance = v:GetPos():Distance( G.LocalPlayer():GetPos() )
  907.     if ExplicityBoat.Vars["esp_distance"] != 0 && distance >= ExplicityBoat.Vars["esp_distance"] then
  908.         return false
  909.     end
  910.  
  911.     if !v:IsPlayer() or !v:Alive() or v == G["LocalPlayer"]() then
  912.         return false
  913.     end
  914.        
  915.     if ( v:Team() == TEAM_SPECTATOR or G.string.find( G.team.GetName( v:Team() ), "spectator" ) ) then
  916.         return false
  917.     end
  918.    
  919.     if ExplicityBoat.Functions.IsDormant( v:EntIndex() ) then
  920.         return false
  921.     end
  922.    
  923.     return true
  924. end
  925.  
  926. /********************/
  927. /*                  */
  928. /* Aimbot functions */
  929. /*                  */
  930. /********************/
  931.  
  932.  
  933. function ExplicityBoat.IsValid( v )
  934.  
  935.     if !G.IsValid( v ) or v == G.LocalPlayer() or !v:IsPlayer() then
  936.         return false
  937.     end
  938.  
  939.     // visible check
  940.     if !ExplicityBoat.Bools["aim_ignorelos"] then
  941.         if !ExplicityBoat.IsVisible( v ) then
  942.             return false
  943.         end
  944.     end
  945.    
  946.     if ExplicityBoat.Bools["aim_checkfov"] then
  947.         if !ExplicityBoat.InFov( v ) then
  948.             return false
  949.         end
  950.     end
  951.    
  952.     if ExplicityBoat.Bools["aim_ignoreadmins"] then
  953.         if ExplicityBoat.IsAdmin( v ) then
  954.             return false
  955.         end
  956.     end
  957.    
  958.     if ExplicityBoat.Bools["aim_ignorefriends"] then
  959.         if ExplicityBoat.Friends[v:Nick()] then
  960.             return false
  961.         end
  962.     end
  963.    
  964.     if ExplicityBoat["IsDormant"]( v:EntIndex() ) then
  965.         return false
  966.     end
  967.    
  968.     if ExplicityBoat.Bools["aim_ignorebots"] && v:IsBot() then
  969.         return false
  970.     end
  971.    
  972.     if ( !v:Alive() || !v:IsPlayer() || v:InVehicle() ) then
  973.         return false
  974.     end
  975.    
  976.     if ( G.GetConVarNumber( "sbox_noclip" ) == 0 && v:GetMoveType() == MOVETYPE_NOCLIP ) then
  977.         return false
  978.     end
  979.    
  980.     -- Ignore Steam friends
  981.     if ExplicityBoat.Bools["aim_ignoresteam"] then
  982.         if v:GetFriendStatus() == "friend" then
  983.             return false
  984.         end
  985.     end
  986.    
  987.     -- Friendly Fire
  988.     if ExplicityBoat.Bools["aim_ignoreteam"] then
  989.         if ( v:Team() == G.LocalPlayer():Team() ) then
  990.             return false
  991.         end
  992.     end
  993.            
  994.     if ( v:GetMoveType() == MOVETYPE_OBSERVER || v:Team() == TEAM_SPECTATOR ) then
  995.         return false
  996.     end
  997.    
  998.     // ignore T buddies
  999.     if G.string.find( G.GAMEMODE.Name, "Trouble in Terror" ) then
  1000.         if ( G.LocalPlayer():IsTraitor() && v:IsTraitor() ) then
  1001.             return false
  1002.         end
  1003.     end
  1004.    
  1005.     // spawn protection (multiple server detection methods)
  1006.     local col = v:GetColor()
  1007.     if col.a < 255 then
  1008.         return false
  1009.     end
  1010.     if G.LocalPlayer():GetColor().a < 255 then
  1011.         return false
  1012.     end
  1013.    
  1014.     // gun game server
  1015.     if v:GetMaterial() == "models/props_combine/stasisshield_sheet" then
  1016.         return false
  1017.     end
  1018.  
  1019.     return true
  1020. end
  1021.  
  1022.  
  1023. ExplicityBoat.Cones = {
  1024.     ["HL2"] = {
  1025.         ["weapon_pistol"] = G.Vector( 0.01, 0.01, 0.01 ),
  1026.         ["weapon_smg1"] = G.Vector( 0.04362, 0.04362, 0.04362 ),
  1027.         ["weapon_ar2"] = G.Vector( 0.02618, 0.02618, 0.02618 ),
  1028.         ["weapon_shotgun"] = G.Vector( 0.08716, 0.08716, 0.08716 ),
  1029.     },
  1030.     ["Normal"] = {}
  1031. }
  1032.  
  1033. ExplicityBoat.SimpleSpread = {
  1034.     ["weapon_cs_base"] = true,
  1035.     ["weapon_zs_base"] = true,
  1036. }
  1037. local wepCone
  1038. function ExplicityBoat.GetCone( wep )
  1039.  
  1040.     if !G.IsValid( wep ) then
  1041.         return 0
  1042.     end
  1043.    
  1044.     if ExplicityBoat.Cones.Normal[wep:GetClass()] then
  1045.         return ExplicityBoat.Cones.Normal[wep:GetClass()]
  1046.        
  1047.     elseif ExplicityBoat.SimpleSpread[wep.Base] then
  1048.         return wep.Cone or wep.Primary.Cone or 0
  1049.        
  1050.     elseif ExplicityBoat.Cones.HL2[wep:GetClass()] then
  1051.         return ExplicityBoat.Cones.HL2[wep:GetClass()]
  1052.        
  1053.     else
  1054.         wepCone = wep.Cone
  1055.         if !wepCone then
  1056.             wepCone = wep.Primary && wep.Primary.Cone or 0
  1057.         end
  1058.     end
  1059.    
  1060.     return wepCone or 0
  1061.    
  1062. end
  1063.        
  1064. local spreadCone = G.Vector( 0, 0, 0 )
  1065. local getCone = G.Vector( 0, 0, 0 )
  1066. function ExplicityBoat.PredictSpread( cmd, ang )
  1067.     local wep = G.LocalPlayer():GetActiveWeapon() or NULL
  1068.    
  1069.     if !G.IsValid( wep ) then
  1070.         return ang
  1071.     end
  1072.    
  1073.     if G.type( wep.Initialize ) == "function" then
  1074.         getCone = ExplicityBoat.GetCone( wep )
  1075.            
  1076.         if G.type( getCone ) == "number" then
  1077.             spreadCone = G.Vector( -getCone, -getCone, -getCone )
  1078.         elseif G.type( getCone ) == "Vector" then
  1079.             spreadCone = getCone * -1
  1080.         end
  1081.     else
  1082.         if ExplicityBoat.Cones.HL2[wep:GetClass()] then
  1083.             spreadCone = ExplicityBoat.Cones.HL2[wep:GetClass()]
  1084.         end
  1085.     end
  1086.    
  1087.     return ExplicityBoat.Functions.PredictSpread( cmd, ang, spreadCone )
  1088. end
  1089.  
  1090. ExplicityBoat.PunchWeps = {
  1091.     ["weapon_pistol"] = true,
  1092.     ["weapon_smg1"] = true,
  1093.     ["weapon_ar2"] = true,
  1094.     ["weapon_shotgun"] = true,
  1095. }
  1096.  
  1097. local wep
  1098. local punchAngle
  1099. function ExplicityBoat.CorrectRecoil( ucmd )
  1100.     wep = G.LocalPlayer():GetActiveWeapon()
  1101.    
  1102.     if G.IsValid( wep ) then
  1103.         if ExplicityBoat.PunchWeps[wep:GetClass()] then
  1104.             punchAngle = ucmd:GetViewAngles() - G.LocalPlayer():GetPunchAngle()
  1105.             ExplicityBoat.Functions.SetViewAngles( ucmd, punchAngle )
  1106.         end
  1107.     end
  1108. end
  1109.  
  1110. ExplicityBoat.Bones = {
  1111.     ["Head"] = "ValveBiped.Bip01_Head1",
  1112.     ["Neck"] = "ValveBiped.Bip01_Neck1",
  1113.     ["Spine"] = "ValveBiped.Bip01_Spine",
  1114.     ["Spine2"] = "ValveBiped.Bip01_Spine2",
  1115.     ["Spine4"] =  "ValveBiped.Bip01_Spine4",
  1116.     ["Pelvis"] = "ValveBiped.Bip01_Pelvis",
  1117.     ["R Upperarm"] = "ValveBiped.Bip01_R_UpperArm",
  1118.     ["R Forearm"] = "ValveBiped.Bip01_R_Forearm",
  1119.     ["R Hand"] = "ValveBiped.Bip01_R_Hand",
  1120.     ["L Upperarm"] = "ValveBiped.Bip01_L_UpperArm",
  1121.     ["L Forearm"] = "ValveBiped.Bip01_L_Forearm",
  1122.     ["L Hand"] = "ValveBiped.Bip01_L_Hand",
  1123.     ["R Thigh"] = "ValveBiped.Bip01_R_Thigh",
  1124.     ["R Calf"] = "ValveBiped.Bip01_R_Calf",
  1125.     ["R Foot"] = "ValveBiped.Bip01_R_Foot",
  1126.     ["R Toes"] = "ValveBiped.Bip01_R_Toe0",
  1127.     ["L Thigh"] = "ValveBiped.Bip01_L_Thigh",
  1128.     ["L Calf"] = "ValveBiped.Bip01_L_Calf",
  1129.     ["L Foot"] = "ValveBiped.Bip01_L_Foot",
  1130.     ["L Toes"] = "ValveBiped.Bip01_L_Toe0",
  1131. }
  1132.  
  1133. ExplicityBoat.Hitboxes = {
  1134.     ["Head"] = 0,  
  1135.     ["L Upperarm"] = 1,
  1136.     ["L Forearm"] = 2,
  1137.     ["L Hand"] = 3,
  1138.     ["R Upperarm"] = 4,
  1139.     ["R Forearm"] = 5,
  1140.     ["R Hand"] = 6,
  1141.     ["L Thigh"] = 7,
  1142.     ["L Calf"] = 8,
  1143.     ["F Foot"] = 9,
  1144.     ["L Toe"] = 10,
  1145.     ["R Thigh"] = 11,
  1146.     ["R Calf"] = 12,
  1147.     ["R Foot"] = 13,
  1148.     ["R Toe"] = 14,
  1149.     ["Pelvis"] = 15,
  1150.     ["Spine"] = 16,
  1151. }
  1152.  
  1153. ExplicityBoat.Hitgroups = {
  1154.     [HITGROUP_HEAD] = "Head",
  1155.     [HITGROUP_CHEST] = "Chest",
  1156.     [HITGROUP_STOMACH] = "Stomach",
  1157.     [HITGROUP_LEFTARM] = "Left Arm",
  1158.     [HITGROUP_RIGHTARM] = "Right Arm",
  1159.     [HITGROUP_LEFTLEG] = "Left Leg",
  1160.     [HITGROUP_RIGHTLEG] = "Right Leg",
  1161. }
  1162.  
  1163. function ExplicityBoat.GetPos( v ) 
  1164.     if ExplicityBoat.Vars["aim_method"] == "Hitbox" then
  1165.    
  1166.         local Hitbox = v:GetHitBoxBone( ExplicityBoat.Hitboxes[ExplicityBoat.Vars["aim_hitbox"]], 0 )  
  1167.         local HitboxPos = v:GetBonePosition( Hitbox )
  1168.    
  1169.         local min, max = v:GetHitBoxBounds( ExplicityBoat.Hitboxes[ExplicityBoat.Vars["aim_hitbox"]], 0 )
  1170.        
  1171.         return HitboxPos + ( min + max ) / 2
  1172.        
  1173.     elseif ExplicityBoat.Vars["aim_method"] == "Bone" then
  1174.         local Bone = ExplicityBoat.Bones[ExplicityBoat.Vars["aim_bone"]]
  1175.         local BonePos = v:LookupBone( Bone )
  1176.         if BonePos then
  1177.             local pos, ang = v:GetBonePosition( BonePos )
  1178.             return pos, ang
  1179.         end
  1180.     end
  1181.     return v:LocalToWorld( v:OBBCenter() )
  1182. end
  1183.  
  1184. function ExplicityBoat.InFov( v )
  1185.     -- wip
  1186.     return true
  1187. end
  1188.  
  1189. -- thanks asutorea
  1190. function ExplicityBoat.CanFire()
  1191.     local wep = G.LocalPlayer():GetActiveWeapon()
  1192.     if ExplicityBoat.properCurTime == nil then return false end
  1193.     return G.IsValid( wep ) && !ExplicityBoat.BadWeapons[wep:GetClass()] && wep:GetActivity() != ACT_RELOAD && wep:GetNextPrimaryFire() < ExplicityBoat.properCurTime && G.LocalPlayer():Alive()
  1194. end
  1195.  
  1196. -- pAntiAnti Aim
  1197. function ExplicityBoat.FixAngle( v )
  1198.     local eyeAngles = _R.Entity.EyeAngles( v )
  1199.    
  1200.     if eyeAngles.p < -89 then
  1201.         _R.Entity.SetPoseParameter( v, "aim_pitch", eyeAngles.p + 180 )
  1202.         _R.Entity.InvalidateBoneCache( v )
  1203.     elseif eyeAngles.p > 89 then
  1204.         _R.Entity.SetPoseParameter( v, "aim_pitch", eyeAngles.p - 180 )
  1205.         _R.Entity.InvalidateBoneCache( v )
  1206.     end
  1207.    
  1208. end
  1209.  
  1210. function ExplicityBoat.IsVisible( v )
  1211.     if ExplicityBoat.Bools["aim_antiantiaim"] then
  1212.         ExplicityBoat.FixAngle( v )
  1213.     end
  1214.     return ExplicityBoat.Functions.IsVisible( G.LocalPlayer():GetShootPos(), ExplicityBoat.GetPos( v ), v:EntIndex() )
  1215. end
  1216.  
  1217. function ExplicityBoat.OnScreen( v )
  1218.     local a, f = _R.Player.GetAimVector( G.LocalPlayer() ):Angle() - ( v:GetPos() - G.LocalPlayer():GetShootPos() ):Angle(), _R.Player.GetFOV( G.LocalPlayer() )    
  1219.     return ( G.math.NormalizeAngle( a.y ) < f + 2 && G.math.NormalizeAngle( a.p ) < f + 2 )
  1220. end
  1221.  
  1222. function ExplicityBoat.IsDormant( index )
  1223.     return ExplicityBoat.Functions.IsDormant( index )
  1224. end
  1225.  
  1226. function ExplicityBoat.FixMove( ucmd, aa )
  1227.     local fixAngle = G.Vector( ucmd:GetForwardMove(), ucmd:GetSideMove(), 0 )
  1228.     fixAngle = (( fixAngle:GetNormal() ):Angle() + ( ucmd:GetViewAngles() - G.Angle( 0, ExplicityBoat.Silent.y, 0 ) ) ):Forward() * fixAngle:Length()
  1229.    
  1230.     if aa then
  1231.         ucmd:SetForwardMove( fixAngle.x )
  1232.         ucmd:SetSideMove( fixAngle.y * -1 )
  1233.         return
  1234.     end
  1235.    
  1236.     ucmd:SetForwardMove( fixAngle.x )
  1237.     ucmd:SetSideMove( fixAngle.y )
  1238. end
  1239.  
  1240. function ExplicityBoat.NormalizeAngles( ang )
  1241.     ang.p = G.math.NormalizeAngle( ang.p )
  1242.     ang.y = G.math.NormalizeAngle( ang.y )
  1243.     ang.r = 0
  1244.     return ang
  1245. end
  1246.  
  1247. ExplicityBoat.PredPositions = {}
  1248. local tbl = ExplicityBoat.PredPositions[v] or {}
  1249.  
  1250. function ExplicityBoat.GetPredictionPos( v, pos )
  1251.     tbl.pos = tbl.pos or pos or _R.Entity.GetPos( v )
  1252.    
  1253.     local realTime = G.RealTime()
  1254.     if tbl.realTime != realTime then
  1255.         tbl.realTime = realTime
  1256.         tbl.pos = pos or _R.Entity.GetPos( v )
  1257.     end
  1258.    
  1259.     tbl.velocity = v:GetVelocity() 
  1260.     ExplicityBoat.PredPositions = tbl  
  1261.    
  1262.     return tbl.pos
  1263. end
  1264.  
  1265. ExplicityBoat.PredictionMethods = { "Velocity 0.0075", "Engine Velocity", "Classic", "Herpes", "ColdFire", "FapHack" }
  1266. ExplicityBoat.PredWeapons = {
  1267.     ["weapon_crossbow"] = 3110,
  1268.     ["weapon_frag"] = 3110,
  1269. }
  1270. local tPos, lVelocity, tVelocity, tDistance, predTime
  1271. -- Some methods are BASED on other cheat's methods, I suck at prediction.
  1272. function ExplicityBoat.Prediction( Pos, v )
  1273.  
  1274.     local wep = G.LocalPlayer():GetActiveWeapon()
  1275.     lVelocity = _R.Entity.GetVelocity( G.LocalPlayer() )
  1276.     tVelocity = _R.Entity.GetVelocity( v )
  1277.     tPos = _R.Entity.GetPos( v )
  1278.     lPos = _R.Entity.GetPos( G.LocalPlayer() )
  1279.     tDistance = lPos:Distance( tPos )
  1280.    
  1281.     if G.IsValid( v ) && G.type( tVelocity ) == "Vector" && G.type( tPos ) == "Vector" then    
  1282.  
  1283.         if wep && G.IsValid( wep ) && ExplicityBoat.PredWeapons[wep:GetClass()] then       
  1284.             predTime = distance / ExplicityBoat.PredWeapons[wep:GetClass()]
  1285.             Pos = Pos + tVelocity * predTime           
  1286.         else       
  1287.        
  1288.             if ExplicityBoat.Vars["aim_prediction_method"] == "Velocity 0.0075" then
  1289.                 Pos = Pos + lVelocity * 0.0075 + tVelocity * 0.0075
  1290.                    
  1291.             elseif ExplicityBoat.Vars["aim_prediction_method"] == "Engine Velocity" then
  1292.                 Pos = Pos + tVelocity * G.engine.TickInterval() - lVelocity * G.engine.TickInterval()
  1293.                
  1294.             elseif ExplicityBoat.Vars["aim_prediction_method"] == "Classic" then
  1295.                 Pos = Pos + tVelocity / 45 - lVelocity / 45
  1296.            
  1297.             elseif ExplicityBoat.Vars["aim_prediction_method"] == "Herpes" then
  1298.                 tPos = ExplicityBoat.GetPredictionPos( v, Pos ) - Pos
  1299.                 Pos = Pos + ( tPos * 2 ) - ( lVelocity / 50 )
  1300.            
  1301.             elseif ExplicityBoat.Vars["aim_prediction_method"] == "ColdFire" then
  1302.                 Pos = Pos - tVelocity:GetNormal() / 5.8 + lVelocity:GetNormal() / 3
  1303.                
  1304.             elseif ExplicityBoat.Vars["aim_prediction_method"] == "FapHack" then
  1305.                 Pos = Pos + tVelocity * 0.02 - lVelocity * 0.05
  1306.                
  1307.             end        
  1308.         end
  1309.    
  1310.     else
  1311.         Pos = Pos
  1312.     end
  1313.    
  1314.     return Pos
  1315. end
  1316.  
  1317. function ExplicityBoat.GetTarget()
  1318.    
  1319.     local x, y = G.ScrW(), G.ScrH()
  1320.     local vPos
  1321.     local oldPos = G.LocalPlayer():EyePos():ToScreen()
  1322.     local distance = G.math.huge
  1323.     local AngA
  1324.     local AngB
  1325.    
  1326.     for k, v in G.next, G.player.GetAll() do
  1327.  
  1328.         vPos = v:GetPos():ToScreen()
  1329.         distance2 = v:GetPos():DistToSqr( G.LocalPlayer():GetPos() )
  1330.         AngA = G.math.Dist( x / 2, y / 2, oldPos.x, oldPos.y )
  1331.         AngB = G.math.Dist( x / 2, y / 2, vPos.x, vPos.y )
  1332.        
  1333.         if ExplicityBoat.IsValid( v ) then
  1334.        
  1335.             if ExplicityBoat.Vars["aim_target_method"] == "Distance" then
  1336.                 if distance2 < distance then
  1337.                     distance = distance2
  1338.                     ExplicityBoat["Target"] = v
  1339.                 end
  1340.                
  1341.             elseif ExplicityBoat.Vars["aim_target_method"] == "Crosshair" then
  1342.                 if AngB <= AngA then
  1343.                     ExplicityBoat.Target = v
  1344.                 end
  1345.                
  1346.             end        
  1347.         else
  1348.             continue
  1349.         end
  1350.     end
  1351.     return ExplicityBoat["Target"]     
  1352. end
  1353.  
  1354. ExplicityBoat.Firing = false
  1355. function ExplicityBoat.Fire( ucmd )
  1356.     if ExplicityBoat.Firing then
  1357.         ucmd:RemoveKey( G.IN_ATTACK )
  1358.         ExplicityBoat.Firing = false
  1359.     else
  1360.         ucmd:SetButtons( G.bit.bor( ucmd:GetButtons(), G.IN_ATTACK ) )
  1361.         ExplicityBoat.Firing = true
  1362.     end
  1363. end
  1364.  
  1365. ExplicityBoat.FakeSwitch = false
  1366. ExplicityBoat.FakeAngle = G.Angle()
  1367. ExplicityBoat.AntiAimMethods = { "Classic", "Classic Inverted", "Static", "Jitter", "Random Pitch", "Fake Angles", "Fake Jitter", "Spin", "Fake Spin" }
  1368. function ExplicityBoat.AntiAim( ucmd )
  1369.     local pitches = { -181, 541, 262 }
  1370.     local yaws = { 262, -262, 181, -181, 541, -541 }
  1371.    
  1372.     -- OG anti-aim
  1373.     if ExplicityBoat.Vars["aim_anti_method"] == "Classic" then
  1374.         ExplicityBoat.Functions.SetViewAngles( ucmd, G.Angle( 181, ucmd:GetViewAngles().y, 180 ) )
  1375.         ExplicityBoat.FixMove( ucmd )
  1376.        
  1377.     -- Looking down instead of up
  1378.     elseif ExplicityBoat.Vars["aim_anti_method"] == "Classic Inverted" then
  1379.         ExplicityBoat.Functions.SetViewAngles( ucmd, G.Angle( -181, ucmd:GetViewAngles().y, 180 ) )
  1380.         ExplicityBoat.FixMove( ucmd )
  1381.        
  1382.     -- Static
  1383.     elseif ExplicityBoat.Vars["aim_anti_method"] == "Static" then
  1384.         ExplicityBoat.Functions.SetViewAngles( ucmd, G.Angle( -ExplicityBoat.Angles.p + 900, ExplicityBoat.Angles.y + 180, 0 ) )
  1385.         ExplicityBoat.FixMove( ucmd, true )
  1386.        
  1387.     -- Jitter - credits to cdriza
  1388.     elseif ExplicityBoat.Vars["aim_anti_method"] == "Jitter" then
  1389.         ExplicityBoat.Functions.SetViewAngles( ucmd, G.Angle( G.table.Random( pitches ), G.table.Random( yaws ), 0 ) )
  1390.         ExplicityBoat.FixMove( ucmd, true )
  1391.        
  1392.     -- Randomized pitch
  1393.     elseif ExplicityBoat.Vars["aim_anti_method"] == "Random Pitch" then
  1394.         ExplicityBoat.Functions.SetViewAngles( ucmd, G.Angle( G.math.random( -180, -186.49999 ), ucmd:GetViewAngles().y, 180 ) )
  1395.         ExplicityBoat.FixMove( ucmd, true )
  1396.        
  1397.     -- bSendPacket Fake Angles
  1398.     elseif ExplicityBoat.Vars["aim_anti_method"] == "Fake Angles" then
  1399.         ExplicityBoat.FakeAngle = ucmd:GetViewAngles()
  1400.         if ExplicityBoat.FakeSwitch then
  1401.             bSendPacket = true
  1402.             ExplicityBoat.Functions.SetViewAngles( ucmd, G.Angle( -192, ExplicityBoat.FakeAngle.y + 90, 0 ) )
  1403.         else
  1404.             bSendPacket = false        
  1405.             ExplicityBoat.Functions.SetViewAngles( ucmd, G.Angle( -192, ExplicityBoat.FakeAngle.y - 90, 0 ) )
  1406.         end
  1407.         ExplicityBoat.FixMove( ucmd, true )
  1408.         ExplicityBoat.FakeSwitch = !ExplicityBoat.FakeSwitch
  1409.    
  1410.     -- bSendPacket Fake Jitter
  1411.     elseif ExplicityBoat.Vars["aim_anti_method"] == "Fake Jitter" then
  1412.         ExplicityBoat.FakeAngle = ucmd:GetViewAngles()
  1413.         if ExplicityBoat.FakeSwitch then
  1414.             bSendPacket = true
  1415.             ExplicityBoat.Functions.SetViewAngles( ucmd, G.Angle( G.math.random( -180, -186.49999 ), ExplicityBoat.FakeAngle.y + 90, 0 ) )
  1416.         else
  1417.             bSendPacket = false        
  1418.             ExplicityBoat.Functions.SetViewAngles( ucmd, G.Angle( G.math.random( -180, -186.49999 ), ExplicityBoat.FakeAngle.y - 90, 0 ) )
  1419.         end
  1420.         ExplicityBoat.FixMove( ucmd, true )
  1421.         ExplicityBoat.FakeSwitch = !ExplicityBoat.FakeSwitch
  1422.        
  1423.     -- Simple spinbot with -192 pitch
  1424.     elseif ExplicityBoat.Vars["aim_anti_method"] == "Spin" then
  1425.         ExplicityBoat.Functions.SetViewAngles( ucmd, ucmd:GetViewAngles() + G.Angle( 0, G.math.fmod( G.CurTime() / .1 * 2 * ExplicityBoat.Vars["aim_anti_spin_speed"], 360 ), 0 ) )
  1426.         ExplicityBoat.FixMove( ucmd, false )
  1427.    
  1428.     -- bSendPacket Spinbot
  1429.     elseif ExplicityBoat.Vars["aim_anti_method"] == "Fake Spin" then
  1430.         ExplicityBoat.FakeAngle = ucmd:GetViewAngles()
  1431.         if FakeSwitch then
  1432.             bSendPacket = true         
  1433.             ExplicityBoat.Functions.SetViewAngles( ucmd, ucmd:GetViewAngles() + G.Angle( 0, G.math.fmod( G.CurTime() / .1 * 2 * ExplicityBoat.Vars["aim_anti_spin_speed"], 360 ), 0 ) )
  1434.         else
  1435.             bSendPacket = false
  1436.             ExplicityBoat.Functions.SetViewAngles( ucmd, ucmd:GetViewAngles() + G.Angle( 0, -G.math.fmod( G.CurTime() / .1 * 2 * ExplicityBoat.Vars["aim_anti_spin_speed"], 360 ), 0 ) )
  1437.         end
  1438.         ExplicityBoat.FixMove( ucmd, false )
  1439.     end
  1440.    
  1441. end
  1442.  
  1443. -- To shorten up my aimbot checks a bit.
  1444. function ExplicityBoat.ShouldAim( ucmd, isToggled )
  1445.     return ExplicityBoat.Target && ExplicityBoat.IsValid( ExplicityBoat.Target ) && ucmd:CommandNumber() != 0  
  1446. end
  1447.  
  1448. /*=======================
  1449.  
  1450.  
  1451. Hooked functions below
  1452.  
  1453.  
  1454. =========================*/
  1455. ExplicityBoat.Status = "Waiting..."
  1456. ExplicityBoat.StatusColor = Color( 255, 255, 0, 150 )
  1457. ExplicityBoat.Silent = G.Angle()
  1458. ExplicityBoat.BulletTime = true
  1459. ExplicityBoat.pDelay = 0
  1460. //ExplicityBoat.SpreadPos = G.Vector( 0, 0, 0 )
  1461.  
  1462. function ExplicityBoat.CreateMove( ucmd )
  1463.  
  1464.     ExplicityBoat.Target = ExplicityBoat.GetTarget()
  1465.     ExplicityBoat.Offset = G.Vector( 0, 0, ExplicityBoat.Vars["aim_offset"] )
  1466.  
  1467.     // Silent aim
  1468.     if ExplicityBoat.Bools["aim_silent"] then
  1469.         ExplicityBoat.Silent = ExplicityBoat.Silent + G.Angle( ucmd:GetMouseY() * 0.023, -ucmd:GetMouseX() * 0.023, 0 )
  1470.         ExplicityBoat.Silent.p = G.math.Clamp( ExplicityBoat.Silent.p, -89, 89 )
  1471.         if ucmd:CommandNumber() == 0 then
  1472.             ucmd:SetViewAngles( ExplicityBoat.Silent )
  1473.             return
  1474.         end    
  1475.         ExplicityBoat.Angles = ExplicityBoat.Silent
  1476.     else
  1477.         ExplicityBoat.Angles = ucmd:GetViewAngles()
  1478.     end
  1479.    
  1480.     // Aimbot core
  1481.     if ( G.input.IsKeyDown( ExplicityBoat.Binds["+aimbot"] ) && !ExplicityBoat.Typing && ExplicityBoat.ShouldAim( ucmd ) or ExplicityBoat.Bools["aim_toggle"] ) && ExplicityBoat.ShouldAim( ucmd ) then
  1482.        
  1483.         if ExplicityBoat.Bools["aim_prediction"] then
  1484.             ExplicityBoat.Angles = ExplicityBoat.Prediction( ExplicityBoat.GetPos( ExplicityBoat.Target ) - ExplicityBoat.Offset, ExplicityBoat.Target )
  1485.         else
  1486.             ExplicityBoat.Angles = ExplicityBoat.GetPos( ExplicityBoat.Target ) - ExplicityBoat.Offset
  1487.         end
  1488.            
  1489.         ExplicityBoat.Angles = ( ExplicityBoat.Angles - G.LocalPlayer():GetShootPos() ):GetNormal():Angle()
  1490.    
  1491.         -- Normalize that shit
  1492.         ExplicityBoat["NormalizeAngles"]( ExplicityBoat["Angles"] )
  1493.        
  1494.         -- View punch fix
  1495.         if ExplicityBoat.Bools["aim_norecoil"] then
  1496.             ExplicityBoat.CorrectRecoil( ucmd )
  1497.         end
  1498.            
  1499.         -- Spread Prediction
  1500.         if ExplicityBoat.Bools["aim_nospread"] then
  1501.             ExplicityBoat.SetAngle = ExplicityBoat.PredictSpread( ucmd, G.Angle( ExplicityBoat.Angles.p, ExplicityBoat.Angles.y, 0 ) )
  1502.         else
  1503.             ExplicityBoat.SetAngle = ExplicityBoat.Angles
  1504.         end
  1505.  
  1506.         if ExplicityBoat.Bools["aim_psilent"] then
  1507.        
  1508.             if G.LocalPlayer():Alive() && G.IsValid( G.LocalPlayer():GetActiveWeapon() ) then
  1509.            
  1510.                 if G.LocalPlayer():GetActiveWeapon():GetNextPrimaryFire() >= ExplicityBoat.properCurTime then
  1511.                     ExplicityBoat.BulletTime = false
  1512.                 else
  1513.                     ExplicityBoat.BulletTime = true
  1514.                 end
  1515.                
  1516.                 if ucmd:CommandNumber() == 0 then
  1517.                     if ExplicityBoat.Vars["aim_psilent_method"] == "bSendPacket" then
  1518.                         bSendPacket = true
  1519.                     end
  1520.                 else
  1521.                     if ExplicityBoat.Vars["aim_psilent_method"] == "bSendPacket" then
  1522.                         bSendPacket = false
  1523.                     end
  1524.                     ExplicityBoat.pDelay = ExplicityBoat.pDelay + 1
  1525.                 end
  1526.             end
  1527.            
  1528.             if ExplicityBoat.BulletTime && !bSendPacket then
  1529.                 if ExplicityBoat.pDelay >= 4 then
  1530.                     ExplicityBoat.Functions.SetViewAngles( ucmd, ExplicityBoat.SetAngle )
  1531.                     ExplicityBoat.pDelay = 0
  1532.                 end
  1533.             end            
  1534.         else       
  1535.             ExplicityBoat.Functions.SetViewAngles( ucmd, ExplicityBoat.SetAngle )          
  1536.         end
  1537.  
  1538.         if ExplicityBoat.Bools["aim_autoshoot"] && ExplicityBoat.CanFire( ucmd ) then
  1539.             ExplicityBoat.Fire( ucmd )     
  1540.         end
  1541.        
  1542.         -- Silent aim view correction
  1543.         if ExplicityBoat.Bools["aim_silent"] then
  1544.             ExplicityBoat.FixMove( ucmd )
  1545.         end
  1546.            
  1547.         -- status bullshit
  1548.         ExplicityBoat.Status = "Locked! (" .. ExplicityBoat.Target:Nick() .. ")"
  1549.         ExplicityBoat.StatusColor = Color( 255, 0, 0, 150 )
  1550.         ExplicityBoat["Locked"] = true
  1551.                            
  1552.     else
  1553.         -- More status bullshit, aimbot not active.
  1554.         ExplicityBoat.Status = "Searching..."
  1555.         ExplicityBoat.StatusColor = Color( 0, 255, 0, 150 )
  1556.         ExplicityBoat.Locked = false       
  1557.     end
  1558.    
  1559.     -- Triggerbot
  1560.     if ExplicityBoat.Bools["misc_triggerbot"] or G.input.IsKeyDown( ExplicityBoat.Binds["+triggerbot"] ) then
  1561.         ExplicityBoat.StatusColor = Color( 255, 255, 0, 150 )
  1562.         ExplicityBoat.Status = "Triggerbot Searching.."
  1563.         local hitgroup = G.LocalPlayer():GetEyeTrace().HitGroup
  1564.         local entity = G.LocalPlayer():GetEyeTrace().Entity
  1565.         ExplicityBoat.SpreadPos = G.LocalPlayer():GetEyeTrace().HitPos
  1566.  
  1567.         if ExplicityBoat.Vars["misc_triggerbot_method"] == "Body" then
  1568.             if ExplicityBoat.IsValid( entity ) then
  1569.                                
  1570.                 if ExplicityBoat.Bools["misc_triggerbot_nospread"] then
  1571.                     ExplicityBoat.NoSpreadAng = ( ExplicityBoat.SpreadPos - G.LocalPlayer():GetShootPos() ):GetNormal():Angle()
  1572.                     ExplicityBoat.NoSpreadAng = ExplicityBoat.PredictSpread( ucmd, ExplicityBoat.NoSpreadAng )
  1573.                     ExplicityBoat.Functions.SetViewAngles( ucmd, ExplicityBoat.NoSpreadAng )
  1574.                 end
  1575.                
  1576.                 ExplicityBoat.StatusColor = Color( 255, 0, 0, 150 )
  1577.                 ExplicityBoat.Status = "Firing! (" .. entity:Nick() .. ")"
  1578.                 if ExplicityBoat.CanFire() then
  1579.                     ExplicityBoat.Fire( ucmd )
  1580.                 end
  1581.             end
  1582.            
  1583.         elseif ExplicityBoat.Vars["misc_triggerbot_method"] == "Hitbox" then
  1584.             if ExplicityBoat.Hitgroups[hitgroup] != nil && ExplicityBoat.IsValid( entity ) then
  1585.                                
  1586.                 if ExplicityBoat.Bools["misc_triggerbot_nospread"] then
  1587.                     ExplicityBoat.NoSpreadAng = ( ExplicityBoat.SpreadPos - G.LocalPlayer():GetShootPos() ):GetNormal():Angle()
  1588.                     ExplicityBoat.NoSpreadAng = ExplicityBoat.PredictSpread( ucmd, ExplicityBoat.NoSpreadAng )
  1589.                     ExplicityBoat.Functions.SetViewAngles( ucmd, ExplicityBoat.NoSpreadAng )
  1590.                 end
  1591.                
  1592.                 ExplicityBoat.StatusColor = Color( 255, 0, 0, 150 )
  1593.                 ExplicityBoat.Status = "Firing! (" .. entity:Nick() or hitbox .. ")"
  1594.                 if ExplicityBoat.CanFire() then
  1595.                     ExplicityBoat.Fire( ucmd )
  1596.                 end
  1597.             end
  1598.         end
  1599.     end
  1600.        
  1601.     -- Anti-Aim
  1602.     if ExplicityBoat.Bools["aim_anti"] && !ExplicityBoat.Locked && !G.LocalPlayer():KeyDown( G.IN_ATTACK ) && G.LocalPlayer():GetMoveType() != G.MOVETYPE_LADDER then
  1603.         ExplicityBoat.AntiAim( ucmd )
  1604.     end
  1605.    
  1606.     if ExplicityBoat.Bools["misc_fakelag"] then
  1607.         ExplicityBoat.LagTicks = ExplicityBoat.LagTicks + 1
  1608.        
  1609.         if ExplicityBoat.LagTicks >= ExplicityBoat.Vars["misc_fakelag_rate"] then
  1610.             ExplicityBoat.ForceCvar( "host_timescale", 0 )
  1611.             ExplicityBoat.LagTicks = 0     
  1612.         else
  1613.             ExplicityBoat.ForceCvar( "host_timescale", 1 )
  1614.         end
  1615.        
  1616.     end
  1617.    
  1618.     // Bunnyhop & autostrafe
  1619.     if ExplicityBoat.Bools["misc_bhop"] then
  1620.         if !G.LocalPlayer():GetMoveType() != G.MOVETYPE_NOCLIP && G.LocalPlayer():GetMoveType() != MOVETYPE_LADDER && !ExplicityBoat.Typing then       
  1621.             if !G.LocalPlayer():IsOnGround() then              
  1622.                 ucmd:SetButtons( G.bit.band( ucmd:GetButtons(), G.bit.bnot( G.IN_JUMP ) ) )
  1623.             end        
  1624.             if ExplicityBoat.Bools["misc_bhop_autostrafe"] then        
  1625.                 if ucmd:GetMouseX() < 0 then
  1626.                     ucmd:SetSideMove( -10000 )
  1627.                 elseif ucmd:GetMouseX() > 0 then
  1628.                     ucmd:SetSideMove( 10000 )
  1629.                 end
  1630.             end    
  1631.         end    
  1632.     end
  1633.    
  1634.     -- SpeedHack (pSpeed method)
  1635.     if G.input.IsKeyDown( ExplicityBoat.Binds["+speedhack"] ) && !ExplicityBoat.Typing then
  1636.         if ExplicityBoat.Vars["speedhack_type"] == "pSpeed" then
  1637.             ExplicityBoat.Functions.SetSpeed( ExplicityBoat.Vars["speedhack_speed"] )
  1638.         elseif ExplicityBoat.Vars["speedhack_type"] == "Cvar" then
  1639.             ExplicityBoat.ForceCvar( "sv_cheats", 1 )
  1640.             ExplicityBoat.ForceCvar( "host_timescale", ExplicityBoat.Vars["speedhack_speed"] )
  1641.         end
  1642.     else
  1643.         if ExplicityBoat.Vars["speedhack_type"] == "pSpeed" then
  1644.             ExplicityBoat.Functions.SetSpeed( 0 )
  1645.         elseif ExplicityBoat.Vars["speedhack_type"] == "Cvar" then
  1646.             ExplicityBoat.ForceCvar( "sv_cheats", 0 )
  1647.             ExplicityBoat.ForceCvar( "host_timescale", 1 )
  1648.         end
  1649.     end
  1650.    
  1651.     // No hands
  1652.     if ExplicityBoat.Bools["esp_nohands"] then
  1653.         ExplicityBoat.Functions.NoDraw( G.Material( "models/weapons/v_models/hands/v_hands" ), true )
  1654.     else
  1655.         ExplicityBoat.Functions.NoDraw( G.Material( "models/weapons/v_models/hands/v_hands" ), false )
  1656.     end
  1657.    
  1658. end
  1659.  
  1660. function ExplicityBoat.CalcView( ply, origin, angles, fov )
  1661.  
  1662.     local ply = G.LocalPlayer()
  1663.     local wep = ply:GetActiveWeapon()
  1664.     local view = { ply = ply, origin = pos, angles = angles, fov = fov }
  1665.        
  1666.     // Advanced NoRecoil. TODO: Recoil Control System
  1667.     if ExplicityBoat.Bools["aim_norecoil"] then
  1668.         if wep.Primary then
  1669.             if !ExplicityBoat.RecoilBackup[wep:GetClass()] then
  1670.                 ExplicityBoat.RecoilBackup[wep:GetClass()] = wep.Primary.Recoil
  1671.             end
  1672.             wep.Primary.Recoil = 0
  1673.         elseif wep.Secondary then
  1674.             if !ExplicityBoat.RecoilBackup then
  1675.                 ExplicityBoat.RecoilBackup[wep:GetClass()] = wep.Secondary.Recoil
  1676.             end
  1677.             wep.Secondary.Recoil = 0
  1678.         end
  1679.     else
  1680.         if wep.Primary then
  1681.             if wep.Primary.Recoil == 0 then
  1682.                 wep.Primary.Recoil = ExplicityBoat.RecoilBackup[wep:GetClass()]
  1683.             end
  1684.         else
  1685.             if wep.Secondary then
  1686.                 if wep.Secondary.Recoil == 0 then
  1687.                     wep.Secondary.Recoil = ExplicityBoat.RecoilBackup[wep:GetClass()]
  1688.                 end
  1689.             end
  1690.         end
  1691.     end
  1692.    
  1693.     // Silent aim
  1694.     if ExplicityBoat.Bools["aim_silent"] then
  1695.         view.angles = ExplicityBoat.Silent
  1696.         view.vm_angles = ExplicityBoat.Silent
  1697.     else
  1698.         view.angles = G.LocalPlayer():EyeAngles()
  1699.         view.angles.r = 0
  1700.     end
  1701.    
  1702.     view.fov = ExplicityBoat.Vars["esp_fov"]
  1703.    
  1704.     if ExplicityBoat.Bools["misc_thirdperson"] then
  1705.         view.origin = G.LocalPlayer():GetShootPos() - ExplicityBoat.Silent:Forward() * ExplicityBoat.Vars["misc_thirdperson_distance"]
  1706.     else
  1707.         view.origin = origin
  1708.     end
  1709.  
  1710.     return view
  1711. end
  1712.  
  1713. ExplicityBoat.LaserAttachments = { -- WIP
  1714.     ["Barrel"] = "muzzle",
  1715.     ["Iron Sights"] = "2",
  1716.     ["fuk"] = "1",
  1717. }
  1718. function ExplicityBoat.HUDPaint()
  1719.  
  1720.     local vwep;
  1721.     local textpos;
  1722.     local x1, y1, x2, y2;
  1723.     local diff;
  1724.     local diff2;
  1725.     local color;
  1726.     local boxcolor;
  1727.     local startx;
  1728.     local starty;
  1729.     local endpos;
  1730.     local pos;
  1731.     local wep = G.LocalPlayer():GetActiveWeapon()
  1732.     local viewmodel = G.LocalPlayer():GetViewModel()       
  1733.     local weapon
  1734.     local dynLight
  1735.    
  1736.     -- Menu header
  1737.     if ExplicityBoat.MenuOpen then
  1738.         G.surface.SetDrawColor( ExplicityBoat.Vars["misc_menucolor2"] )
  1739.         G.surface.DrawRect( 20, 50, 420, 60 )
  1740.        
  1741.         G.surface.SetDrawColor( Color( 0, 0, 0, 255 ) )
  1742.         G.surface.DrawOutlinedRect( 20, 50, 420, 60, 2 )       
  1743.  
  1744.         G.draw.SimpleTextOutlined( "ExplicityBoat", "ExplicityBoat_logo", 25, 55, ExplicityBoat.Colors.White, TEXT_ALIGN_LEFT,TEXT_ALIGN_LEFT, 1.5, Color( 0, 0, 0 ) )
  1745.         G.draw.SimpleTextOutlined( "by 0xymoron", "ExplicityBoat_logo_small", 95, 65, ExplicityBoat.Colors.White, TEXT_ALIGN_LEFT,TEXT_ALIGN_LEFT, 1, Color( 0, 0, 0 ) )
  1746.        
  1747.         -- Big ass shit
  1748.         G.draw.SimpleTextOutlined(
  1749.             ExplicityBoat.Info.Version .. "   Last Updated: " .. ExplicityBoat.Info.Updated,
  1750.             "ExplicityBoat_logo_small",
  1751.             ExplicityBoat.Frame:GetWide() + 15, 65,
  1752.             ExplicityBoat.Colors.White, TEXT_ALIGN_RIGHT, TEXT_ALIGN_BOTTOM, 1, Color( 30, 30, 30, 255 )
  1753.         )
  1754.        
  1755.     end
  1756.    
  1757.     if !ExplicityBoat.Bools["esp_enabled"] then return end
  1758.    
  1759.     -- Laser Sight
  1760.     if ExplicityBoat.Bools["esp_laser"] then
  1761.                    
  1762.         if viewmodel && G.IsValid( wep ) && G.IsValid( viewmodel ) then
  1763.             if wep:GetClass() != "weapon_physgun" then
  1764.                        
  1765.                 local muzzle = viewmodel:LookupAttachment( "muzzle" )
  1766.                 if muzzle == 0 then
  1767.                     muzzle = viewmodel:LookupAttachment( "1" )
  1768.                 end
  1769.                            
  1770.                 local trace = G.LocalPlayer():GetEyeTrace().HitPos
  1771.                            
  1772.                 if viewmodel:GetAttachment( muzzle ) then                      
  1773.                     G.cam.Start3D( G.EyePos(), G.EyeAngles() )
  1774.                                    
  1775.                         local startpos = viewmodel:GetAttachment( muzzle ).Pos                     
  1776.                         local endpos = trace   
  1777.                                    
  1778.                         if ExplicityBoat.Bools["aim_silent"] && ExplicityBoat.Locked && G.IsValid( ExplicityBoat.Target ) then
  1779.                             endpos = ExplicityBoat.GetPos( ExplicityBoat.Target )
  1780.                         else
  1781.                             endpos = trace
  1782.                         end
  1783.                                    
  1784.                         -- Laser
  1785.                         G.render.SetMaterial( G.Material( "trails/laser" ) )                                                   
  1786.                         G.render.DrawBeam( startpos, endpos, 4, 0, 0, ExplicityBoat.Vars["misc_lasercolor"] )
  1787.                                
  1788.                         -- HitPos Dot
  1789.                         G.render.SetMaterial( G.Material( "Sprites/light_glow02_add_noz" ) )
  1790.                             G.render.DrawQuadEasy(
  1791.                             endpos, -- trace
  1792.                             ( G.EyePos() - trace ):GetNormal(),
  1793.                             25, 25,
  1794.                             Color( 255, 255, 255, 255 ), 0
  1795.                         )
  1796.                                
  1797.                     G.cam.End3D()
  1798.                 end
  1799.             end
  1800.         end
  1801.     end
  1802.    
  1803.     -- Dynamic Light around player
  1804.     if ExplicityBoat.Bools["esp_dynamiclight"] then
  1805.         dynLight = G.DynamicLight( G.LocalPlayer():EntIndex() )
  1806.         dynLight.pos = G.LocalPlayer():GetShootPos()
  1807.         dynLight.r = 255
  1808.         dynLight.g = 255
  1809.         dynLight.b = 255
  1810.         dynLight.brightness = 1.75
  1811.         dynLight.Decay = 850
  1812.         dynLight.Size = 250
  1813.         dynLight.DieTime = G.CurTime() + 1
  1814.     end
  1815.    
  1816.     if ExplicityBoat.Bools["esp_wireweapon"] then
  1817.         _R.Entity.SetMaterial( viewmodel, "models/wireframe" )
  1818.         _R.Entity.SetColor( viewmodel, ExplicityBoat.Vars["misc_lasercolor"] )
  1819.     else
  1820.         _R.Entity.SetMaterial( viewmodel, "" )
  1821.         _R.Entity.SetColor( viewmodel, Color( 255, 255, 255 ) )
  1822.     end
  1823.            
  1824.     for k, v in G.next, G.player.GetAll() do
  1825.    
  1826.         textpos = 0 -- -2
  1827.         x1, y1, x2, y2 = ExplicityBoat.GetBounds( v )
  1828.         diff = G.math.abs( x2 - x1 )
  1829.         diff2 = G.math.abs( y2 - y1 )
  1830.         if G.IsValid( v:GetActiveWeapon() ) then
  1831.             weapon = v:GetActiveWeapon():GetPrintName()
  1832.         else
  1833.             weapon = "Unknown"
  1834.         end
  1835.        
  1836.         // Player esp  
  1837.         if ExplicityBoat.ShouldDraw( v ) then                  
  1838.             color = G.team.GetColor( v:Team() )            
  1839.                
  1840.             // ESP text
  1841.             if ExplicityBoat.Bools["esp_name"] then
  1842.                 G.draw.SimpleText( v:Nick(), "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
  1843.                 textpos = textpos + 12
  1844.             end
  1845.                
  1846.             -- health text
  1847.             if ExplicityBoat.Bools["esp_health_text"] then
  1848.                 G.draw.SimpleText( "HP: " .. v:Health(), "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
  1849.                 textpos = textpos + 12
  1850.             end
  1851.                
  1852.             -- ESP weapon
  1853.             if ExplicityBoat.Bools["esp_weapon"] then
  1854.                 G.draw.SimpleText( weapon, "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
  1855.                 textpos = textpos + 12
  1856.             end
  1857.            
  1858.             -- Distance ESP
  1859.             if ExplicityBoat.Bools["esp_distance"] then
  1860.                 G.draw.SimpleText( "D: " .. G.math.Round( v:GetPos():Distance( G.LocalPlayer():GetPos() ) ), "ESPFont", x2 + 2, y1 + textpos, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT )
  1861.                 textpos = textpos + 12
  1862.             end
  1863.                
  1864.             // Box ESP
  1865.             if ExplicityBoat.Bools["esp_box"] then
  1866.                 ExplicityBoat.DrawOutlinedBox( x1, y1, diff, diff2, ExplicityBoat.Vars["esp_box_width"], color )
  1867.             end
  1868.                            
  1869.             -- Health Bar
  1870.             if ExplicityBoat.Bools["esp_health_bar"] then
  1871.                
  1872.                 G.surface.SetDrawColor( Color( 0, 0, 0 ) )
  1873.                 G.surface.DrawRect( x1 -6, y1, 3, diff2 )
  1874.                 G.surface.SetDrawColor( Color( 0, 255, 0 ) )
  1875.                 G.surface.DrawRect( x1 - 6, y2 - diff2 / 100 * v:Health(), 3, diff2 / 100 * v:Health() )
  1876.  
  1877.             end
  1878.        
  1879.             -- Snaplines
  1880.             if ExplicityBoat.Bools["esp_snaplines"] then
  1881.                
  1882.                 startx = G.ScrW() / 2
  1883.                 starty = G.ScrH() / 2
  1884.                 endpos = ExplicityBoat.GetPos( v ):ToScreen()
  1885.                    
  1886.                 G.surface.SetDrawColor( color )
  1887.                 G.surface.DrawLine( startx, starty, endpos.x, endpos.y )
  1888.             end
  1889.                
  1890.             -- Chams! Much faster than RenderScreenSpaceEffects
  1891.             if ExplicityBoat.Bools["esp_chams"] then
  1892.                 G.cam.Start3D()
  1893.                    
  1894.                     v:SetColor( color )
  1895.                        
  1896.                     if ExplicityBoat.Vars["esp_chams_material"] == "Solid" then
  1897.                         v:SetMaterial( "models/debug/debugwhite" )
  1898.                     elseif ExplicityBoat.Vars["esp_chams_material"] == "Wireframe" then
  1899.                         v:SetMaterial( "models/wireframe" )
  1900.                     elseif ExplicityBoat.Vars["esp_chams_material"] == "XQZ" then
  1901.                         v:SetMaterial( "" )
  1902.                     end
  1903.                        
  1904.                     -- Weapon Chams
  1905.                     if G.IsValid( v:GetActiveWeapon() ) then
  1906.                         v:GetActiveWeapon():DrawModel()
  1907.                     end
  1908.                        
  1909.                     -- Player chams
  1910.                     if ExplicityBoat.Vars["esp_chams_material"] != "XQZ" then
  1911.                         G.render.SetColorModulation( color.r / 255, color.g / 255, color.b / 255 )
  1912.                     end
  1913.                     v:DrawModel()  
  1914.                     v:SetColor( Color( 255, 255, 255 ) )   
  1915.                     v:SetMaterial( "" )
  1916.  
  1917.                 G.cam.End3D()
  1918.             end
  1919.                                    
  1920.             -- For prediction testing & shit
  1921.             if ExplicityBoat.Bools["esp_aimpos"] then
  1922.                 local predictedPos = ExplicityBoat.Prediction( ExplicityBoat.GetPos( v ), v ):ToScreen()
  1923.                 G.draw.RoundedBox( 4, predictedPos.x, predictedPos.y, 7, 7, Color( 255, 0, 0, 255 ) )
  1924.             end
  1925.            
  1926.         else
  1927.             continue;
  1928.         end
  1929.    
  1930.     end
  1931.  
  1932.     // Aim status & shit
  1933.     if ExplicityBoat.Bools["esp_status"] then
  1934.         G.draw.DrawText( ExplicityBoat.Status, "ExplicityBoat_status", G.ScrW() / 2, G.ScrH() * 0.5 + 50, ExplicityBoat.StatusColor, TEXT_ALIGN_CENTER )
  1935.     end
  1936.    
  1937.     // Crosshair
  1938.     local x = ScrW() / 2
  1939.     local y = ScrH() / 2
  1940.    
  1941.     local crosscolor = Color( 0, 0, 0, 255 )
  1942.     local crosslength = 50
  1943.     local gap = 2
  1944.    
  1945.     local boxsize = 5
  1946.        
  1947.     -- Box
  1948.     if ExplicityBoat.Bools["esp_crosshair_box"] then
  1949.         G.surface.SetDrawColor( Color( 255, 255, 255 ) )
  1950.         G.surface.DrawOutlinedRect( x - boxsize - 2, y - boxsize - 2, ( boxsize + 2 ) * 2 + 1, ( boxsize + 2 ) * 2 + 1 )
  1951.     end
  1952.    
  1953.     -- Crosshair
  1954.     if ExplicityBoat.Bools["esp_crosshair"] then
  1955.         G.surface.SetDrawColor( 0, 0, 0, 255 )
  1956.         G.surface.DrawLine( x - crosslength, y, x - gap, y )
  1957.         G.surface.DrawLine( x + crosslength, y, x + gap, y )
  1958.        
  1959.         G.surface.DrawLine( x, y - crosslength, x, y - gap )
  1960.         G.surface.DrawLine( x, y + crosslength, x, y + gap )
  1961.     end
  1962. end
  1963.  
  1964. ExplicityBoat.properCurTime = 0
  1965. ExplicityBoat.LagVar = 12
  1966. ExplicityBoat.LagTicks = 0
  1967. local dynLight
  1968. function ExplicityBoat.Move()
  1969.  
  1970.     if G.IsFirstTimePredicted() then return end
  1971.     ExplicityBoat.properCurTime = G.CurTime() + G.engine.TickInterval()
  1972.    
  1973.     -- Menu opening
  1974.     if ( G.input.IsKeyDown( ExplicityBoat.Binds["+menu"] ) && !ExplicityBoat.Typing && !ExplicityBoat.MenuOpen && !gui.IsConsoleVisible() ) then
  1975.         ExplicityBoat.Menu()
  1976.         ExplicityBoat.MenuOpen = true
  1977.     end
  1978.            
  1979. end
  1980.  
  1981. function ExplicityBoat.Namechanger()
  1982.     if ExplicityBoat.Bools["misc_namechanger"] then
  1983.         ExplicityBoat.NextName = G.table.Random( G.player.GetAll() ):Nick()
  1984.         G.chat.AddText( Color( 0, 255, 255 ), "[ExplicityBoat] Changed your name to " .. ExplicityBoat.NextName )
  1985.         if G.string.find( G.string.lower( G.GAMEMODE.Name ), "rp" ) or G.string.find( G.string.lower( GAMEMODE.Name ), "purge" ) then
  1986.             -- Overly comlpicated Steam name stealer & RP name stealer. Accuse 2 different people at once.
  1987.             ExplicityBoat.NextName = G.table.Random( G.player.GetAll() ):Nick()
  1988.             ExplicityBoat.Functions.ConCommand( "name " .. ExplicityBoat.NextName .. " %" )
  1989.             G.timer.Simple( 0.5, function()
  1990.                 ExplicityBoat.NextName = G.table.Random( G.player.GetAll() ):Nick()
  1991.                 ExplicityBoat.Functions.ConCommand( "darkrp rpname " .. ExplicityBoat.NextName .. "q" ) -- ** TODO: CHANGE q TO SOMETHING ELSE.
  1992.             end )
  1993.         else
  1994.             ExplicityBoat.NextName = G.table.Random( G.player.GetAll() ):Nick()
  1995.             ExplicityBoat.Functions.ConCommand( "name " .. ExplicityBoat.NextName .. " %" )
  1996.         end
  1997.     end
  1998. end
  1999. if G.string.find( G.string.lower( G.GAMEMODE.Name ), "rp" ) or G.string.find( G.string.lower( G.GAMEMODE.Name ), "purge" ) then
  2000.     ExplicityBoat.RegisterTimer( 10, 0, ExplicityBoat.Namechanger )
  2001. else
  2002.     ExplicityBoat.RegisterTimer( G.GetConVarNumber( "sv_namechange_cooldown_seconds" ), 0, ExplicityBoat.Namechanger )
  2003. end
  2004.  
  2005. /*
  2006.     DETOURS
  2007. */
  2008.  
  2009. _R.Entity.FireBullets = ExplicityBoat.Detour( _R.Entity.FireBullets, function( e, bullet )
  2010.     ExplicityBoat.Cones.Normal[ G.LocalPlayer():GetActiveWeapon():GetClass() ] = bullet["Spread"]
  2011.     return ExplicityBoat.Detours[ _R.Entity.FireBullets ]( e, bullet )
  2012. end )
  2013.  
  2014. _R.Player.IPAddress = ExplicityBoat.Detour( _R.Player.IPAddress, function()
  2015.     ExplicityBoat.FakeIP = G.tostring( G.math.random( 1, 99 ), G.math.random( 1, 99 ), G.math.random( 1, 99 ), G.math.random( 1, 99 ), ":27005" )
  2016.     ExplicityBoat.ACNotify( "Server tried to get _R.Player.IPAddress, returning '" .. ExplicityBoat.FakeIP .. "'" )
  2017.     ExplicityBoat.logEvent( "anticheat", "Tried getting player:IPAddress(), returnin fake IP '" .. ExplicityBoat.FakeIP .. "'" )
  2018.     return ExplicityBoat.FakeIP
  2019. end )
  2020.  
  2021. _R.Entity.SetHands = ExplicityBoat.Detour( _R.Entity.SetHands, function( ent )
  2022.     if ExplicityBoat.Bools["esp_nohands"] then
  2023.         return
  2024.     else
  2025.         return ent
  2026.     end
  2027. end )
  2028.  
  2029. _R.Player.GetHands = ExplicityBoat.Detour( _R.Player.GetHands, function()
  2030.     if ExplicityBoat.Bools["esp_nohands"] then
  2031.         return false
  2032.     else
  2033.         return true
  2034.     end
  2035. end )
  2036.  
  2037. render.Capture = ExplicityBoat.Detour( render.Capture, function( data )
  2038.     ExplicityBoat.ACNotify( "An anti-cheat attempted to capture your screen." )
  2039.     return -- no.
  2040. end )
  2041.  
  2042. file.Exists = ExplicityBoat.Detour( file.Exists, function( filename, dir )
  2043.     ExplicityBoat.LogDetour( "file.Exists( '" .. filename .. "', '" .. dir .. "' )" )
  2044.     if G.string.find( filename, "ExplicityBoat" ) then
  2045.         ExplicityBoat.ACNotify( "An anti-cheat attempted to search for ExplicityBoat" )
  2046.         return false
  2047.     else
  2048.         return ExplicityBoat.Detours[ file.Exists ]( filename, dir )
  2049.     end
  2050. end )
  2051.  
  2052. file.Read = ExplicityBoat.Detour( file.Read, function( filename, dir )
  2053.     ExplicityBoat.LogDetour( "file.Read( '" .. filename .. "', '" .. dir .. "' )" )
  2054.     if G.string.find( filename, "ExplicityBoat" ) then
  2055.         ExplicityBoat.ACNotify( "An anti-cheat attempted to search for ExplicityBoat" )
  2056.         return "print( 'Hello World' )"
  2057.     else
  2058.         return ExplicityBoat.Detours[ file.Read ]( filename, dir )
  2059.     end
  2060. end )
  2061.  
  2062. ExplicityBoat.FakeFiles = {
  2063.     "demo_recording.lua",
  2064.     "vgui/dbutton.lua",
  2065.     "vgui/dgrid.lua",
  2066.     "menu/menu.lua",
  2067.     "menu/mainmenu.lua",
  2068.     "menu/loading.lua",
  2069.     "menu/video.lua",
  2070.     "menu/errors.lua",
  2071. }
  2072.  
  2073. file.Find = ExplicityBoat.Detour( file.Find, function( filename, dir )
  2074.     ExplicityBoat.LogDetour( "file.Find( '" .. filename .. "', '" .. dir .. "' )" )
  2075.     if G.string.find( filename, "ExplicityBoat" ) then
  2076.         return G.table.Random( ExplicityBoat.FakeFiles ) -- lol fuck you
  2077.     else
  2078.         return ExplicityBoat.Detours[ file.Find ]( filename, dir )
  2079.     end
  2080. end )  
  2081.  
  2082. net.Receive = ExplicityBoat.Detour( net.Receive, function( name, func )
  2083.     ExplicityBoat.LogDetour( "net.Receive( '" .. name .. "' )" )
  2084.     return ExplicityBoat.Detours[ net.Receive ]( name, func )
  2085. end )
  2086.  
  2087. net.Start = ExplicityBoat.Detour( net.Start, function( name )
  2088.     if ExplicityBoat.Detours["net.Start"][name] then
  2089.         ExplicityBoat.ACNotify( "Blocked net.Start ( '" .. name .. "' )" )
  2090.         return
  2091.     else
  2092.         ExplicityBoat.LogDetour( "net.Start( '" .. name .. "' )" )
  2093.         return ExplicityBoat.Detours[ net.Start ]( name )
  2094.     end
  2095. end )
  2096.  
  2097. net.WriteString = ExplicityBoat.Detour( net.WriteString, function( str )
  2098.     if G.string.find( str, "ExplicityBoat" ) then
  2099.         ExplicityBoat.ACNotify( "Blocked net.WriteString ( '" .. str .. "' )" )
  2100.         return "nil"
  2101.     else
  2102.         ExplicityBoat.LogDetour( "net.WriteString( " .. str .. " )" )
  2103.         return ExplicityBoat.Detours[ net.WriteString ]( str )
  2104.     end
  2105. end )
  2106.  
  2107. _R.Player.ConCommand = ExplicityBoat.Detour( _R.Player.ConCommand, function( ply, args )
  2108.     ExplicityBoat.LogDetour( ply:Nick() .. " - _R.Player.ConCommand( '" .. args .. "' ) " )
  2109.     return ExplicityBoat.Detours[ _R.Player.ConCommand ]( ply, args )
  2110. end )
  2111.  
  2112. /*
  2113. _R.ConVar.GetBool = ExplicityBoat.Detour( _R.Convar.GetBool, function( cvar )
  2114.     ExplicityBoat.LogDetour( "_R.ConVar.GetBool( '" .. cvar:GetName() .. "'" )
  2115.     for k, v in G.pairs( ExplicityBoat.Spoof ) do
  2116.         if cvar:GetName() == k then
  2117.             ExplicityBoat.ACNotify( "_R.ConVar.GetBool( '" .. cvar:GetName() .. "' ) returning " .. G.tostring( v ) )
  2118.             return v
  2119.         else
  2120.             return ExplicityBoat.Detours[_R.ConVar.GetBool]( cvar )
  2121.         end
  2122.     end
  2123. end )*/
  2124.  
  2125. GetConVarNumber = ExplicityBoat.Detour( GetConVarNumber, function( cvar )
  2126.     if ExplicityBoat.Spoof[cvar] != nil then
  2127.         return ExplicityBoat.Spoof[cvar]
  2128.     else
  2129.         return ExplicityBoat.Detours[GetConVarNumber]( cvar )
  2130.     end
  2131. end )
  2132.  
  2133. ExplicityBoat.IgnoreCMDs = {
  2134.     ["hvh_playheadshotsound"] = true,
  2135.     ["hvh_hitsound"] = true,
  2136.     ["r_cleardecals"] = true,
  2137.     ["ulx_showmotd"] = true,
  2138. }
  2139. RunConsoleCommand = ExplicityBoat.Detour( RunConsoleCommand, function( cmd, ... )
  2140.     local str = cmd
  2141.     if !ExplicityBoat.IgnoreCMDs[cmd] then 
  2142.         if ... then
  2143.             local args = { ... }
  2144.             str = str .. ", " .. ( ... )
  2145.            
  2146.             ExplicityBoat.LogDetour( "RunConsoleCommand( '" .. cmd .. "' {" .. G.table.concat( args, ", " ) .. "} )" )
  2147.         else       
  2148.             ExplicityBoat.LogDetour( "RunConsoleCommand( '" .. cmd .. "' )")
  2149.         end
  2150.     end
  2151.     return ExplicityBoat.Detours[ RunConsoleCommand ]( cmd, ... )
  2152. end )
  2153.  
  2154. ExplicityBoat.FakeHooks = {
  2155.     ["HUDPaint"] = "Bypassing my own anti-cheat", -- idk
  2156. }
  2157.  
  2158. hook.GetTable = ExplicityBoat.Detour( hook.GetTable, function()
  2159.     ExplicityBoat.LogDetour( "hook.GetTable() was checked, returning bullshit." )
  2160.     return ExplicityBoat.FakeHooks
  2161. end )
  2162.  
  2163. /*
  2164.    
  2165.     Menu Core
  2166.    
  2167. */
  2168.  
  2169. ExplicityBoat.UpdateLog = "Loading.."
  2170.  
  2171. function ExplicityBoat.UpdateChangelog()
  2172.     G.http.Fetch( "http://162.248.94.135/ExplicityBoat_changelog.txt", -- dirscan me please
  2173.         function( body, len, headers, code )
  2174.             ExplicityBoat.UpdateLog = body
  2175.             ExplicityBoat.logEvent( "Main", "Updated Changelog" )
  2176.         end,
  2177.         function( error )
  2178.             ExplicityBoat.UpdateLog = error
  2179.             ExplicityBoat.logEvent( "Main", "Failed to update changelog '" .. error .. "'" )
  2180.         end
  2181.     )
  2182. end
  2183.  
  2184. ExplicityBoat.UpdateChangelog()
  2185.  
  2186. function ExplicityBoat.CMenu()
  2187.  
  2188.     ExplicityBoat.CFrame = G.vgui.Create( "DFrame" )
  2189.     ExplicityBoat.CFrame:SetParent( CFrame )
  2190.     ExplicityBoat.CFrame:SetPos( 20, 80 )
  2191.     ExplicityBoat.CFrame:SetSize( 430, 420 )
  2192.     ExplicityBoat.CFrame:SetTitle( "ExplicityBoat " .. ExplicityBoat.Info.Version .. " Changelog" )
  2193.     ExplicityBoat.CFrame:SetVisible( true )
  2194.     ExplicityBoat.CFrame:SetDraggable( true )
  2195.     ExplicityBoat.CFrame:ShowCloseButton( true )
  2196.     ExplicityBoat.CFrame:MakePopup()
  2197.     ExplicityBoat.CFrame.Paint = function()
  2198.         G.draw.RoundedBox( 0, 0, 0, ExplicityBoat.CFrame:GetWide(), ExplicityBoat.CFrame:GetTall(), ExplicityBoat.Vars["misc_menucolor"] ) -- 30
  2199.         G.surface.SetDrawColor( Color( 0, 0, 0 ) )
  2200.         G.surface.DrawOutlinedRect( 0, 0, ExplicityBoat.CFrame:GetWide(), ExplicityBoat.CFrame:GetTall() )
  2201.     end
  2202.    
  2203.     local ChangelogText = G.vgui.Create( "DTextEntry", ExplicityBoat.CFrame )
  2204.     ChangelogText:SetPos( 5, 35 )
  2205.     ChangelogText:SetSize( ExplicityBoat.CFrame:GetWide() - 10, ExplicityBoat.CFrame:GetTall() - 40 )
  2206.     ChangelogText:SetText( ExplicityBoat.UpdateLog )
  2207.     ChangelogText:SetEditable( false )
  2208.     ChangelogText:SetMultiline( true )
  2209.    
  2210. end
  2211.    
  2212.  
  2213. ExplicityBoat.MenuToggle = false
  2214.  
  2215. function ExplicityBoat.DoMenuToggle()
  2216.     ExplicityBoat.MenuOpen = true
  2217.     ExplicityBoat.Frame:SetVisible( true )
  2218. end
  2219.  
  2220. function ExplicityBoat.Menu()
  2221.     local tabs, menuheight, menuwidth, w, h = {}, 430, 420, ScrW() / 2, ScrH() / 2
  2222.    
  2223.     ExplicityBoat.Frame = G.vgui.Create( "DPropertySheet" )
  2224.     ExplicityBoat.Frame:SetParent( ExplicityBoat.Frame )
  2225.     ExplicityBoat.Frame:SetPos( 20, 80 )
  2226.     ExplicityBoat.Frame:SetSize( menuwidth, menuheight )
  2227.     ExplicityBoat.Frame:SetVisible( true )
  2228.     ExplicityBoat.Frame:MakePopup()
  2229.     ExplicityBoat.Frame.Think = function()
  2230.         if !G.input.IsKeyDown( ExplicityBoat.Binds["+menu"] ) && !ExplicityBoat.MenuToggle then
  2231.             ExplicityBoat.MenuOpen = false
  2232.             ExplicityBoat.Changelog:SetVisible( false )
  2233.             ExplicityBoat.Frame:SetVisible( false )
  2234.         end
  2235.     end
  2236.     ExplicityBoat.Frame.Paint = function()
  2237.         G.draw.RoundedBox( 0, 0, 30, ExplicityBoat.Frame:GetWide(), ExplicityBoat.Frame:GetTall(), ExplicityBoat.Vars["misc_menucolor"] )
  2238.         G.surface.SetDrawColor( Color( 0, 0, 0 ) )
  2239.         G.surface.DrawOutlinedRect( 0, 0, ExplicityBoat.Frame:GetWide(), ExplicityBoat.Frame:GetTall() )
  2240.     end
  2241.    
  2242.     -- Menu Toggle button
  2243.     local Toggle = G.vgui.Create( "DButton" )
  2244.     Toggle:SetParent( ExplicityBoat.Frame )
  2245.     Toggle:SetText( "Hold Open" )
  2246.     Toggle:SetTextColor( ExplicityBoat.Colors.Green )
  2247.     Toggle:SetPos( 0, 0 )
  2248.     Toggle:SetPos( ExplicityBoat.Frame:GetWide() - 60, 0 )
  2249.     Toggle:SetSize( 60, 30 )
  2250.     Toggle.DoClick = function()
  2251.         ExplicityBoat.MenuToggle = !ExplicityBoat.MenuToggle
  2252.         ExplicityBoat.DoMenuToggle()
  2253.         if ExplicityBoat.MenuToggle == true then
  2254.             Toggle:SetText( "Close" )
  2255.             Toggle:SetTextColor( Color( 255, 255, 0 ) )
  2256.             ExplicityBoat.Sound()
  2257.         else
  2258.             Toggle:SetText( "Hold Open" )
  2259.             Toggle:SetTextColor( ExplicityBoat.Colors.Green )
  2260.             ExplicityBoat.Sound()
  2261.         end
  2262.     end
  2263.     Toggle.Paint = function()
  2264.         G.surface.SetDrawColor( Color( 0, 0, 0 ) )
  2265.         G.surface.DrawOutlinedRect( 0, 0, Toggle:GetWide(), Toggle:GetTall() )
  2266.     end
  2267.    
  2268.     ExplicityBoat.Changelog = G.vgui.Create( "DButton" )
  2269.     --Changelog:SetParent( ExplicityBoat.Frame )
  2270.     ExplicityBoat.Changelog:SetText( "Changelog" )
  2271.     ExplicityBoat.Changelog:SetTextColor( color_white )
  2272.     ExplicityBoat.Changelog:SetPos( ExplicityBoat.Frame:GetWide() - 240, 60 )
  2273.     --ExplicityBoat.Changelog:SetPos( ExplicityBoat.Frame:GetWide() - 60, 0 )
  2274.     ExplicityBoat.Changelog:SetSize( 70, 18 )
  2275.     ExplicityBoat.Changelog:SetFont( "ExplicityBoat_logo_small" )
  2276.     ExplicityBoat.Changelog.DoClick = function()
  2277.         ExplicityBoat.Sound()
  2278.         ExplicityBoat.UpdateChangelog()
  2279.         ExplicityBoat.CMenu()
  2280.     end
  2281.     ExplicityBoat.Changelog.Paint = function()
  2282.         G.surface.SetDrawColor( Color( 0, 0, 0 ) )
  2283.         G.surface.DrawOutlinedRect( 0, 0, ExplicityBoat.Changelog:GetWide(), ExplicityBoat.Changelog:GetTall() )
  2284.     end
  2285.  
  2286.     -- Parents for the tabs
  2287.     tabs.aimbot = G.vgui.Create( "DLabel", ExplicityBoat.Frame )
  2288.     tabs.aimbot:SetPos( 0, 0 )
  2289.     tabs.aimbot:SetText( "" )
  2290.  
  2291.     tabs.esp = G.vgui.Create( "DLabel", ExplicityBoat.Frame )
  2292.     tabs.esp:SetPos( 0, 0 )
  2293.     tabs.esp:SetText( "" )
  2294.  
  2295.     tabs.misc = G.vgui.Create( "DLabel", ExplicityBoat.Frame )
  2296.     tabs.misc:SetPos( 0, 0 )
  2297.     tabs.misc:SetText( "" )
  2298.    
  2299.     tabs.lists = G.vgui.Create( "DLabel", ExplicityBoat.Frame )
  2300.     tabs.lists:SetPos( 0, 0 )
  2301.     tabs.lists:SetText( "" )
  2302.  
  2303.     tabs.console = G.vgui.Create( "DLabel", ExplicityBoat.Frame )
  2304.     tabs.console:SetPos( 0, 0 )
  2305.     tabs.console:SetText( "" )
  2306.  
  2307.     tabs.config = G.vgui.Create( "DLabel", ExplicityBoat.Frame )
  2308.     tabs.config:SetPos( 0, 0 )
  2309.     tabs.config:SetText( "" )
  2310.    
  2311.     ExplicityBoat.Frame:AddSheet( "Aimbot", tabs.aimbot, "icon16/lightning.png", false, false )
  2312.     ExplicityBoat.Frame:AddSheet( "Visual", tabs.esp, "icon16/eye.png", false, false )
  2313.     ExplicityBoat.Frame:AddSheet( "Misc", tabs.misc, "icon16/plugin.png", false, false )
  2314.     ExplicityBoat.Frame:AddSheet( "Lists", tabs.lists, "icon16/user_add.png", false, false )
  2315.     ExplicityBoat.Frame:AddSheet( "Console", tabs.console, "icon16/application_xp_terminal.png", false, false )
  2316.     ExplicityBoat.Frame:AddSheet( "Config", tabs.config, "icon16/wrench.png", false, false )
  2317.  
  2318.     -- Aimbot Settings
  2319.     ExplicityBoat.CreateOption( "Checkbox", tabs.aimbot, "Aimbot Toggle", "aim_toggle", 5, 5 )
  2320.     ExplicityBoat.CreateOption( "Checkbox", tabs.aimbot, "Autoshoot", "aim_autoshoot", 5, 25 )
  2321.     ExplicityBoat.CreateOption( "Checkbox", tabs.aimbot, "Silent Aim", "aim_silent", 5, 45 )
  2322.     ExplicityBoat.CreateOption( "Checkbox", tabs.aimbot, "pSilent [Beta]", "aim_psilent", 5, 65 )
  2323.     ExplicityBoat.CreateOption( "Checkbox", tabs.aimbot, "Spread Prediction", "aim_nospread", 5, 85 )
  2324.     ExplicityBoat.CreateOption( "Checkbox", tabs.aimbot, "Aim Prediction", "aim_prediction", 5, 105 )
  2325.     ExplicityBoat.CreateOption( "Checkbox", tabs.aimbot, "Remove Recoil", "aim_norecoil", 5, 125 )
  2326.     ExplicityBoat.CreateOption( "Checkbox", tabs.aimbot, "Check FOV", "aim_checkfov", 5, 145 ) 
  2327.    
  2328.     ExplicityBoat.CreateOption( "Checkbox", tabs.aimbot, "Ignore Team", "aim_ignoreteam", 130, 5 )
  2329.     ExplicityBoat.CreateOption( "Checkbox", tabs.aimbot, "Ignore Admins", "aim_ignoreadmins", 130, 25 )
  2330.     ExplicityBoat.CreateOption( "Checkbox", tabs.aimbot, "Ignore Steam Friends", "aim_ignoresteam", 130, 45 )
  2331.     ExplicityBoat.CreateOption( "Checkbox", tabs.aimbot, "Ignore Bots", "aim_ignorebots", 130, 65 )
  2332.     ExplicityBoat.CreateOption( "Checkbox", tabs.aimbot, "Ignore LOS", "aim_ignorelos", 130, 85 )
  2333.     ExplicityBoat.CreateOption( "Checkbox", tabs.aimbot, "Ignore Friends", "aim_ignorefriends", 130, 105 )
  2334.    
  2335.     ExplicityBoat.CreateOption( "Checkbox", tabs.aimbot, "Anti Anti-Aim", "aim_antiantiaim", 275, 5 )
  2336.     ExplicityBoat.CreateOption( "Checkbox", tabs.aimbot, "Anti-Aim", "aim_anti", 275, 25 )
  2337.  
  2338.     ExplicityBoat.CreateOption( "Slider", tabs.aimbot, "Spinbot Speed", "aim_anti_spin_speed", 10, 50, 420, 5, 325, 0 )
  2339.     ExplicityBoat.CreateOption( "Slider", tabs.aimbot, "Field of View", "aim_fov", 1, 180, 420, 5, 345, 0 )
  2340.     ExplicityBoat.CreateOption( "Slider", tabs.aimbot, "Aimspot Offset", "aim_offset", -20, 20, 425, 5, 365, 0 )
  2341.    
  2342.    
  2343.     ExplicityBoat.CreateOption( "Label", tabs.aimbot, "Prediction Method", 115, 250 )
  2344.     local PredictionMethod = G.vgui.Create( "DComboBox", tabs.aimbot )
  2345.     PredictionMethod:SetPos( 115, 265 )
  2346.     PredictionMethod:SetSize( 105, 20 )
  2347.     PredictionMethod:SetText( ExplicityBoat.Vars["aim_prediction_method"] )
  2348.     PredictionMethod:SetTextColor( color_white )
  2349.     for k, v in G.next, ExplicityBoat.PredictionMethods do
  2350.         PredictionMethod:AddChoice( v )
  2351.     end
  2352.     PredictionMethod.OnSelect = function( self )
  2353.         ExplicityBoat.Vars["aim_prediction_method"] = self:GetValue()
  2354.         ExplicityBoat.Message( Color( 0, 255, 255 ), "Set prediction method to '" .. self:GetValue() .. "'" )
  2355.         ExplicityBoat.logEvent( "Setting", "Set prediction method to '" .. self:GetValue() .. "'" )
  2356.         ExplicityBoat.Sound()
  2357.     end
  2358.     PredictionMethod.Paint = function()
  2359.         G.surface.SetDrawColor( Color( 0, 0, 0 ) )
  2360.         G.surface.DrawOutlinedRect( 0, 0, PredictionMethod:GetWide(), PredictionMethod:GetTall() )
  2361.     end
  2362.    
  2363.     // AntiAim Method
  2364.     ExplicityBoat.CreateOption( "Label", tabs.aimbot, "Anti-Aim Method", 5, 250 )
  2365.     local AntiAimMethod = G.vgui.Create( "DComboBox", tabs.aimbot )
  2366.     AntiAimMethod:SetPos( 5, 265 )
  2367.     AntiAimMethod:SetSize( 105, 20 )
  2368.     AntiAimMethod:SetText( ExplicityBoat.Vars["aim_anti_method"] )
  2369.     AntiAimMethod:SetTextColor( color_white )
  2370.     for k, v in G.next, ExplicityBoat.AntiAimMethods do
  2371.         AntiAimMethod:AddChoice( v )
  2372.     end
  2373.     AntiAimMethod.OnSelect = function( self )
  2374.         ExplicityBoat.Vars["aim_anti_method"] = self:GetValue()
  2375.         ExplicityBoat.Message( Color( 0, 255, 255 ), "Set anti-aim method to '" .. self:GetValue() .. "'" )
  2376.         ExplicityBoat.logEvent( "Setting", "Set anti-aim method to '" .. self:GetValue() .. "'" )
  2377.         ExplicityBoat.Sound()
  2378.     end    
  2379.     AntiAimMethod.Paint = function()
  2380.         G.surface.SetDrawColor( Color( 0, 0, 0 ) )
  2381.         G.surface.DrawOutlinedRect( 0, 0, AntiAimMethod:GetWide(), AntiAimMethod:GetTall() )
  2382.     end
  2383.  
  2384.     -- Aimbot hitbox/bone method & spot selection
  2385.     ExplicityBoat.CreateOption( "Label", tabs.aimbot, "Aimbot Method", 5, 290 )
  2386.     local AimbotMethod = G.vgui.Create( "DComboBox", tabs.aimbot )
  2387.     AimbotMethod:SetPos( 5, 305 )
  2388.     AimbotMethod:SetSize( 105, 20 )
  2389.     AimbotMethod:SetText( ExplicityBoat.Vars["aim_method"] )
  2390.     AimbotMethod:AddChoice( "Hitbox" )
  2391.     AimbotMethod:AddChoice( "Bone" )
  2392.     AimbotMethod:SetTextColor( color_white )
  2393.     AimbotMethod.OnSelect = function( self )
  2394.         ExplicityBoat.Vars["aim_method"] = self:GetValue()
  2395.         ExplicityBoat.Message( Color( 0, 255, 255 ), "Set aimbot method to '" .. self:GetValue() .. "'" )
  2396.         ExplicityBoat.logEvent( "Setting", "Set aimbot method to '" .. self:GetValue() .. "'" )
  2397.         ExplicityBoat.Sound()
  2398.          -- Close to menu to avoid bugs.
  2399.         ExplicityBoat.Frame:SetVisible( false )
  2400.         ExplicityBoat.Changelog:SetVisible( false )
  2401.         ExplicityBoat.MenuOpen = false
  2402.         ExplicityBoat.MenuToggle = false
  2403.     end
  2404.     AimbotMethod.Paint = function()
  2405.         G.surface.SetDrawColor( Color( 0, 0, 0 ) )
  2406.         G.surface.DrawOutlinedRect( 0, 0, AimbotMethod:GetWide(), AimbotMethod:GetTall() )
  2407.     end
  2408.    
  2409.     -- SPOT SELECTION. I AM PROUD OF THIS!
  2410.     ExplicityBoat.CreateOption( "Label", tabs.aimbot, "Aim Spot", 115, 290 )
  2411.     local Aimspot = G.vgui.Create( "DComboBox", tabs.aimbot )
  2412.     Aimspot:SetPos( 115, 305 )
  2413.     Aimspot:SetSize( 105, 20 )
  2414.     Aimspot:SetTextColor( color_white )
  2415.     if ExplicityBoat.Vars["aim_method"] == "Hitbox" then
  2416.         Aimspot:SetText( ExplicityBoat.Vars["aim_hitbox"] )
  2417.     elseif ExplicityBoat.Vars["aim_method"] == "Bone" then
  2418.         Aimspot:SetText( ExplicityBoat.Vars["aim_bone"] )
  2419.     end
  2420.     if ExplicityBoat.Vars["aim_method"] == "Hitbox" then
  2421.         for k, v in G.next, ExplicityBoat.Hitboxes do
  2422.             Aimspot:AddChoice( k )
  2423.         end
  2424.     elseif ExplicityBoat.Vars["aim_method"] == "Bone" then
  2425.         for k, v in G.next, ExplicityBoat.Bones do
  2426.             Aimspot:AddChoice( k )
  2427.         end
  2428.     end
  2429.     Aimspot.OnSelect = function( self )
  2430.         if ExplicityBoat.Vars["aim_method"] == "Hitbox" then
  2431.             ExplicityBoat.Vars["aim_hitbox"] = self:GetValue()
  2432.             ExplicityBoat.Message( Color( 0, 255, 255 ), "Set aimbot hitbox to '" .. self:GetValue() .. "'" )
  2433.             ExplicityBoat.logEvent( "Setting", "Set aimbot hitbox to '" .. self:GetValue() .. "'" )
  2434.         elseif ExplicityBoat.Vars["aim_method"] == "Bone" then
  2435.             ExplicityBoat.Vars["aim_bone"] = self:GetValue()
  2436.             ExplicityBoat.Message( Color( 0, 255, 255 ), "Set aimbot bone to '" .. self:GetValue() .. "'" )
  2437.             ExplicityBoat.logEvent( "Setting", "Set aimbot bone to '" .. self:GetValue() .. "'" )
  2438.         end
  2439.         ExplicityBoat.Sound()
  2440.     end
  2441.     Aimspot.Paint = function()
  2442.         G.surface.SetDrawColor( Color( 0, 0, 0 ) )
  2443.         G.surface.DrawOutlinedRect( 0, 0, Aimspot:GetWide(), Aimspot:GetTall() )
  2444.     end
  2445.    
  2446.     // Target method
  2447.     ExplicityBoat.CreateOption( "Label", tabs.aimbot, "Target Method", 225, 290 )
  2448.     local TargetMethod = G.vgui.Create( "DComboBox", tabs.aimbot )
  2449.     TargetMethod:SetPos( 225, 305 )
  2450.     TargetMethod:SetSize( 105, 20 )
  2451.     TargetMethod:SetText( ExplicityBoat.Vars["aim_target_method"] )
  2452.     TargetMethod:SetTextColor( color_white )
  2453.     TargetMethod:AddChoice( "Distance" )
  2454.     TargetMethod:AddChoice( "Crosshair" )
  2455.     TargetMethod.OnSelect = function( self )
  2456.         ExplicityBoat.Vars["aim_target_method"] = self:GetValue()
  2457.         ExplicityBoat.Message( Color( 0, 255, 255 ), "Set target method to '" .. self:GetValue() .. "'" )
  2458.         ExplicityBoat.logEvent( "Setting", "Set target method to '" .. self:GetValue() .. "'" )
  2459.         ExplicityBoat.Sound()
  2460.     end
  2461.     TargetMethod.Paint = function()
  2462.         G.surface.SetDrawColor( Color( 0, 0, 0 ) )
  2463.         G.surface.DrawOutlinedRect( 0, 0, TargetMethod:GetWide(), TargetMethod:GetTall() )
  2464.     end
  2465.  
  2466.     -- Visual Settings
  2467.     ExplicityBoat.CreateOption( "Checkbox", tabs.esp, "Enable Visuals", "esp_enabled", 5, 5 )
  2468.     ExplicityBoat.CreateOption( "Checkbox", tabs.esp, "Player Name", "esp_name", 5, 45 )
  2469.     ExplicityBoat.CreateOption( "Checkbox", tabs.esp, "Player Health", "esp_health_text", 5, 65 )
  2470.     ExplicityBoat.CreateOption( "Checkbox", tabs.esp, "Player Weapon", "esp_weapon", 5, 85 )
  2471.     ExplicityBoat.CreateOption( "Checkbox", tabs.esp, "Player Distance", "esp_distance", 5, 105 )
  2472.     ExplicityBoat.CreateOption( "Checkbox", tabs.esp, "Player Box", "esp_box", 5, 125 )
  2473.     ExplicityBoat.CreateOption( "Checkbox", tabs.esp, "Player Chams", "esp_chams", 5, 145 )
  2474.     ExplicityBoat.CreateOption( "Checkbox", tabs.esp, "Health Bar", "esp_health_bar", 5, 165 )
  2475.  
  2476.     ExplicityBoat.CreateOption( "Checkbox", tabs.esp, "Crosshair", "esp_crosshair", 130, 5 )
  2477.     ExplicityBoat.CreateOption( "Checkbox", tabs.esp, "Crosshair Box", "esp_crosshair_box", 130, 25 )
  2478.     ExplicityBoat.CreateOption( "Checkbox", tabs.esp, "Remove Hands", "esp_nohands", 130, 45 )
  2479.     ExplicityBoat.CreateOption( "Checkbox", tabs.esp, "Aimbot Status", "esp_status", 130, 65 )
  2480.     ExplicityBoat.CreateOption( "Checkbox", tabs.esp, "Laser Sights", "esp_laser", 130, 85 )
  2481.     ExplicityBoat.CreateOption( "Checkbox", tabs.esp, "Aim Snaplines", "esp_snaplines", 130, 105 )
  2482.     ExplicityBoat.CreateOption( "Checkbox", tabs.esp, "Dynamic Light", "esp_dynamiclight", 130, 125 )
  2483.     ExplicityBoat.CreateOption( "Checkbox", tabs.esp, "Wireframe Weapon", "esp_wireweapon", 130, 145 )
  2484.     ExplicityBoat.CreateOption( "Checkbox", tabs.esp, "Draw Aimbot Position", "esp_aimpos", 130, 165 ) 
  2485.  
  2486.     ExplicityBoat.CreateOption( "Slider", tabs.esp, "Field of View", "esp_fov", 90, 140, 420, 5, 325, 1 )
  2487.     ExplicityBoat.CreateOption( "Slider", tabs.esp, "Box Width", "esp_box_width", 1, 2.5, 420, 5, 345, 1 )
  2488.     ExplicityBoat.CreateOption( "Slider", tabs.esp, "Render Distance", "esp_distance", 0, 7500, 415, 5, 365, 0 )
  2489.  
  2490.    
  2491.     ExplicityBoat.CreateOption( "Label", tabs.esp, "Chams Material", 5, 290 )
  2492.     local ChamsType = G.vgui.Create( "DComboBox", tabs.esp )
  2493.     ChamsType:SetPos( 5, 305 )
  2494.     ChamsType:SetSize( 105, 20 )
  2495.     ChamsType:SetText( ExplicityBoat.Vars["esp_chams_material"] )
  2496.     ChamsType:AddChoice( "Solid" )
  2497.     ChamsType:AddChoice( "Wireframe" )
  2498.     ChamsType:AddChoice( "XQZ" )
  2499.     ChamsType:SetTextColor( color_white )
  2500.     ChamsType.OnSelect = function( self )
  2501.         ExplicityBoat.Vars["esp_chams_material"] = self:GetValue()
  2502.         ExplicityBoat.Message( Color( 0, 255, 255 ), "Set chams material to '" .. self:GetValue() .. "'" )
  2503.         ExplicityBoat.logEvent( "Setting", "Set chams material to '" .. self:GetValue() .. "'" )
  2504.         ExplicityBoat.Sound()
  2505.     end
  2506.     ChamsType.Paint = function()
  2507.         G.surface.SetDrawColor( Color( 0, 0, 0 ) )
  2508.         G.surface.DrawOutlinedRect( 0, 0, ChamsType:GetWide(), ChamsType:GetTall() )
  2509.     end
  2510.    
  2511.     --------------
  2512.     -- Misc tab --
  2513.     --------------
  2514.     ExplicityBoat.CreateOption( "Checkbox", tabs.misc, "Bunnyhop", "misc_bhop", 5, 5 )
  2515.     ExplicityBoat.CreateOption( "Checkbox", tabs.misc, "Bunnyhop AutoStrafe [Beta]", "misc_bhop_autostrafe", 5, 25 )
  2516.     ExplicityBoat.CreateOption( "Checkbox", tabs.misc, "Name Stealer", "misc_namechanger", 5, 45 )
  2517.     ExplicityBoat.CreateOption( "Checkbox", tabs.misc, "Debug Messages", "misc_debug", 5, 65 )
  2518.     ExplicityBoat.CreateOption( "Checkbox", tabs.misc, "Triggerbot", "misc_triggerbot", 5, 85 )
  2519.     ExplicityBoat.CreateOption( "Checkbox", tabs.misc, "Triggerbot NoSpread", "misc_triggerbot_nospread", 5, 105 )
  2520.     ExplicityBoat.CreateOption( "Checkbox", tabs.misc, "Fake Lag", "misc_fakelag", 5, 125 )
  2521.     ExplicityBoat.CreateOption( "Checkbox", tabs.misc, "Thirdperson", "misc_thirdperson", 5, 145 )
  2522.     ExplicityBoat.CreateOption( "Slider", tabs.misc, "Fake Lag Delay (Ticks)", "misc_fakelag_rate", 2, 25, 415, 5, 325, 0 )
  2523.     ExplicityBoat.CreateOption( "Slider", tabs.misc, "Thirdperson Distance", "misc_thirdperson_distance", 50, 180, 415, 5, 345, 1 )
  2524.     ExplicityBoat.CreateOption( "Slider", tabs.misc, "Speedhack Speed", "speedhack_speed", 1.5, 5, 420, 5, 365, 1 )
  2525.    
  2526.     ExplicityBoat.CreateOption( "Label", tabs.misc, "Triggerbot Method", 5, 290 )
  2527.     local Trigmethod = G.vgui.Create( "DComboBox", tabs.misc )
  2528.     Trigmethod:SetPos( 5, 305 )
  2529.     Trigmethod:SetSize( 105, 20 )
  2530.     Trigmethod:SetText( ExplicityBoat.Vars["misc_triggerbot_method"] )
  2531.     Trigmethod:AddChoice( "Body" )
  2532.     Trigmethod:AddChoice( "Hitbox" )
  2533.     Trigmethod:SetTextColor( color_white )
  2534.     Trigmethod.OnSelect = function( self )
  2535.         ExplicityBoat.Vars["misc_triggerbot_method"] = self:GetValue()
  2536.         ExplicityBoat.Message( Color( 0, 255, 255 ), "Set triggerbot method to '" .. self:GetValue() .. "'" )
  2537.         ExplicityBoat.logEvent( "Setting", "Set triggerbot method to '" .. self:GetValue() .. "'" )
  2538.         ExplicityBoat.Sound()
  2539.     end
  2540.     Trigmethod.Paint = function()
  2541.         G.surface.SetDrawColor( Color( 0, 0, 0 ) )
  2542.         G.surface.DrawOutlinedRect( 0, 0, Trigmethod:GetWide(), Trigmethod:GetTall() )
  2543.     end
  2544.    
  2545.     ExplicityBoat.CreateOption( "Label", tabs.misc, "Speedhack Method", 115, 290 )
  2546.     local SpeedMethod = G.vgui.Create( "DComboBox", tabs.misc )
  2547.     SpeedMethod:SetPos( 115, 305 )
  2548.     SpeedMethod:SetSize( 105, 20 )
  2549.     SpeedMethod:SetText( ExplicityBoat.Vars["speedhack_type"] )
  2550.     SpeedMethod:AddChoice( "pSpeed" )
  2551.     SpeedMethod:AddChoice( "Cvar" )
  2552.     SpeedMethod:SetTextColor( color_white )
  2553.     SpeedMethod.OnSelect = function( self )
  2554.         ExplicityBoat.Vars["speedhack_type"] = self:GetValue()
  2555.         ExplicityBoat.Message( Color( 0, 255, 255 ), "Set speedhack method to '" .. self:GetValue() .. "'" )
  2556.         ExplicityBoat.logEvent( "Setting", "Set speedhack method to '" .. self:GetValue() .. "'" )
  2557.         ExplicityBoat.Sound()
  2558.     end
  2559.     SpeedMethod.Paint = function()
  2560.         G.surface.SetDrawColor( Color( 0, 0, 0 ) )
  2561.         G.surface.DrawOutlinedRect( 0, 0, SpeedMethod:GetWide(), SpeedMethod:GetTall() )
  2562.     end
  2563.    
  2564.     ---------------
  2565.     -- Lists Tab --
  2566.     ---------------
  2567.    
  2568.     -- Friends/enemies
  2569.    
  2570.     local Enemies = G.vgui.Create( "DListView", tabs.lists )
  2571.     Enemies:SetPos( 5, 5 ) -- 200
  2572.     Enemies:SetSize( 170, 190 )
  2573.     Enemies:AddColumn( "Enemies" )
  2574.     for k, v in G.next, G.player.GetAll() do
  2575.         if !ExplicityBoat.Friends[v:Nick()] && v != G.LocalPlayer() then
  2576.             Enemies:AddLine( v:Nick() )
  2577.         end
  2578.     end
  2579.    
  2580.     local Friends = G.vgui.Create( "DListView", tabs.lists )
  2581.     Friends:SetPos( 230, 5 )
  2582.     Friends:SetSize( 170, 190 )
  2583.     Friends:AddColumn( "Friends" )
  2584.     for k, v in G.next, ExplicityBoat.Friends do
  2585.         Friends:AddLine( k )
  2586.     end
  2587.    
  2588.     local AddFriend = G.vgui.Create( "DButton", tabs.lists )
  2589.     AddFriend:SetText( "-->" )
  2590.     AddFriend:SetSize( 30, 20 )
  2591.     AddFriend:SetPos( 187.5, 10 )
  2592.     AddFriend:SetTextColor( color_white )
  2593.     AddFriend.DoClick = function()
  2594.     local line = Enemies:GetSelectedLine()
  2595.         if line != nil then
  2596.             local ply = Enemies:GetLine( line ):GetValue(1)  
  2597.             if !ExplicityBoat.Friends[ply] then
  2598.                 ExplicityBoat.Friends[ply] = true
  2599.                 ExplicityBoat.Message( ExplicityBoat.Colors.Green, "Added '" .. ply .. "' to friends list." )
  2600.                 ExplicityBoat.logEvent( "Config", "Added '" .. ply .. "' to friends list." )
  2601.                 Friends:AddLine( ply )
  2602.                 Enemies:RemoveLine( line )
  2603.                 ExplicityBoat.Sound()
  2604.             end
  2605.         end
  2606.     end
  2607.     AddFriend.Paint = function()
  2608.         G.surface.SetDrawColor( Color( 0, 0, 0 ) )
  2609.         G.surface.DrawOutlinedRect( 0, 0, AddFriend:GetWide(), AddFriend:GetTall() )
  2610.     end
  2611.    
  2612.     local RemoveFriend = G.vgui.Create( "DButton", tabs.lists )
  2613.     RemoveFriend:SetText("<--")
  2614.     RemoveFriend:SetSize( 30, 20 )
  2615.     RemoveFriend:SetPos( 187.5, 45 )
  2616.     RemoveFriend:SetTextColor( color_white )
  2617.     RemoveFriend.DoClick = function()
  2618.         local line = Friends:GetSelectedLine()
  2619.         if line != nil then
  2620.             local ply = Friends:GetLine( line ):GetValue(1)
  2621.             if ExplicityBoat.Friends[ply] then
  2622.                 for k, v in G.next, ExplicityBoat.Friends do
  2623.                     if k == ply then
  2624.                         ExplicityBoat.Friends[k] = nil
  2625.                         ExplicityBoat.Message( ExplicityBoat.Colors.Red, "Removed '" .. ply .. "' from the friends list." )
  2626.                         ExplicityBoat.logEvent( "Config", "Removed '" .. ply .. "' from the friends list." )
  2627.                         ExplicityBoat.Sound()
  2628.                     end
  2629.                 end
  2630.                 Enemies:AddLine( ply )
  2631.                 Friends:RemoveLine( line )
  2632.             end
  2633.         end
  2634.     end
  2635.     RemoveFriend.Paint = function()
  2636.         G.surface.SetDrawColor( Color( 0, 0, 0 ) )
  2637.         G.surface.DrawOutlinedRect( 0, 0, RemoveFriend:GetWide(), RemoveFriend:GetTall() )
  2638.     end
  2639.    
  2640.     -----------------
  2641.     -- Console Tab --
  2642.     -----------------
  2643.    
  2644.     ExplicityBoat.Console = G.vgui.Create( "DListView", tabs.console )
  2645.     ExplicityBoat.Console:SetPos( 5, 5 )
  2646.     ExplicityBoat.Console:SetSize( ExplicityBoat.Frame:GetWide() - 25, ExplicityBoat.Frame:GetTall() - 70 )
  2647.     ExplicityBoat.Console:AddColumn( "ExplicityBoat Console" )
  2648.     for k, v in G.next, ExplicityBoat.Lines do
  2649.         ExplicityBoat.Console:AddLine( v )
  2650.     end
  2651.     ExplicityBoat.Console.OnClickLine = function( parent, line, isselected )
  2652.         G.SetClipboardText( line:GetValue( 1 ) )
  2653.     end
  2654.    
  2655.     local ConsoleEntry = vgui.Create( "DTextEntry", tabs.console )
  2656.     ConsoleEntry:SetPos( 5, 370 )
  2657.     ConsoleEntry:SetSize( ExplicityBoat.Frame:GetWide() - 115, 20 )
  2658.     ConsoleEntry:SetText( "Work in progress..." )
  2659.     ConsoleEntry:SetDisabled( true )
  2660.     ConsoleEntry.OnEnter = function( self )
  2661.         ExplicityBoat.Functions.ClientCMD( self:GetValue() )
  2662.         ExplicityBoat.logEvent( "Main", "Running console command '" .. self:GetValue() .. "'" )
  2663.     end
  2664.    
  2665.     local ConsoleClear = G.vgui.Create( "DButton", tabs.console )
  2666.     ConsoleClear:SetText( "Clear Console" )
  2667.     ConsoleClear:SetSize( 85, 20 )
  2668.     ConsoleClear:SetPos( ExplicityBoat.Frame:GetWide() - 105, 370 )
  2669.     ConsoleClear:SetTextColor( color_white )
  2670.     ConsoleClear.DoClick = function()
  2671.         ExplicityBoat.Lines = {}
  2672.         ExplicityBoat.Console:Clear()
  2673.         ExplicityBoat.logEvent( "Main", "Cleared console" )
  2674.     end
  2675.     ConsoleClear.Paint = function()
  2676.         G.surface.SetDrawColor( Color( 0, 0, 0 ) )
  2677.         G.surface.DrawOutlinedRect( 0, 0, ConsoleClear:GetWide(), ConsoleClear:GetTall() )
  2678.     end
  2679.    
  2680.     ----------------
  2681.     -- Config Tab --
  2682.     ----------------
  2683.     --Menu Settings
  2684.     ExplicityBoat.CreateOption( "Label", tabs.config, "Menu Color", 230, 5 )
  2685.     local MenuColor = G.vgui.Create( "DColorMixer", tabs.config )
  2686.     MenuColor:SetPos( 230, 20 )
  2687.     MenuColor:SetSize( 170, 100 )
  2688.     MenuColor:SetPalette( false )
  2689.     MenuColor:SetAlphaBar( true )
  2690.     MenuColor:SetWangs( false )
  2691.     MenuColor:SetColor( ExplicityBoat.Vars["misc_menucolor"] )
  2692.     MenuColor.ValueChanged = function()
  2693.         ExplicityBoat.Vars["misc_menucolor"] = MenuColor:GetColor()
  2694.     end
  2695.    
  2696.     ExplicityBoat.CreateOption( "Label", tabs.config, "Secondary Menu Color", 230, 125 )
  2697.     local MenuColor2 = G.vgui.Create( "DColorMixer", tabs.config )
  2698.     MenuColor2:SetPos( 230, 140 )
  2699.     MenuColor2:SetSize( 170, 100 )
  2700.     MenuColor2:SetPalette( false )
  2701.     MenuColor2:SetAlphaBar( true )
  2702.     MenuColor2:SetWangs( false )
  2703.     MenuColor2:SetColor( ExplicityBoat.Vars["misc_menucolor2"] )
  2704.     MenuColor2.ValueChanged = function()
  2705.         ExplicityBoat.Vars["misc_menucolor2"] = MenuColor2:GetColor()
  2706.     end
  2707.    
  2708.     ExplicityBoat.CreateOption( "Label", tabs.config, "Laser Color", 230, 245 )
  2709.     local LaserCol = G.vgui.Create( "DColorMixer", tabs.config )
  2710.     LaserCol:SetPos( 230, 260 )
  2711.     LaserCol:SetSize( 170, 100 )
  2712.     LaserCol:SetPalette( false )
  2713.     LaserCol:SetAlphaBar( false )
  2714.     LaserCol:SetWangs( false )
  2715.     LaserCol:SetColor( ExplicityBoat.Vars["misc_lasercolor"] )
  2716.     LaserCol.ValueChanged = function()
  2717.         ExplicityBoat.Vars["misc_lasercolor"] = LaserCol:GetColor()
  2718.     end
  2719.    
  2720.     local CfgList = G.vgui.Create( "DListView", tabs.config )
  2721.     CfgList:SetPos( 5, 5 )
  2722.     CfgList:SetMultiSelect( false )
  2723.     CfgList:SetSize( 220, 80 )
  2724.     CfgList:AddColumn( "Config" )
  2725.     for k, v in G.next, ExplicityBoat.Configs do
  2726.         CfgList:AddLine( v )
  2727.     end
  2728.     CfgList.DoDoubleClick = function()
  2729.         local line = CfgList:GetSelectedLine()
  2730.         if line != nil then
  2731.             local config = CfgList:GetLine( line ):GetValue( 1 )
  2732.             ExplicityBoat.LoadConfig( config )
  2733.             ExplicityBoat.Sound()
  2734.         end
  2735.     end
  2736.        
  2737.     -- Right from gInject. Im lazy with menus. I'll re-write it later
  2738.     local CreateConfig = G.vgui.Create( "DButton", tabs.config )
  2739.     CreateConfig:SetText( "Create New" )
  2740.     CreateConfig:SetSize( 105, 30 )
  2741.     CreateConfig:SetPos( 5, 90 )
  2742.     CreateConfig:SetTextColor( color_white )
  2743.     CreateConfig.DoClick = function()
  2744.         G.Derma_StringRequest( "New Config", "Name of the new config", "", function( txt )
  2745.             ExplicityBoat.SaveConfig( txt )
  2746.             ExplicityBoat.Sound()
  2747.         end )
  2748.     end
  2749.     CreateConfig.Paint = function()
  2750.         G.surface.SetDrawColor( Color( 0, 0, 0 ) )
  2751.         G.surface.DrawOutlinedRect( 0, 0, CreateConfig:GetWide(), CreateConfig:GetTall() )
  2752.     end
  2753.    
  2754.     local RenameConfig = G.vgui.Create( "DButton", tabs.config )
  2755.     RenameConfig:SetText( "Rename" )
  2756.     RenameConfig:SetSize( 105, 30 )
  2757.     RenameConfig:SetPos( 5, 125 )
  2758.     RenameConfig:SetTextColor( color_white )
  2759.     RenameConfig.DoClick = function()
  2760.         G.Derma_StringRequest( "Rename Config", "Name of the new config", "", function( NewConfig )
  2761.             local line = CfgList:GetSelectedLine()
  2762.             if line != nil then
  2763.                 local OldConfig = CfgList:GetLine( line ):GetValue( 1 )
  2764.                 if OldConfig != "default" then
  2765.                     ExplicityBoat.RenameConfig( OldConfig, NewConfig )
  2766.                     G.table.remove( ExplicityBoat.Configs, CfgList:GetSelectedLine() )
  2767.                     G.table.insert( ExplicityBoat.Configs, NewConfig )
  2768.                     ExplicityBoat.Sound()
  2769.                 end
  2770.             end
  2771.         end )
  2772.     end
  2773.     RenameConfig.Paint = function()
  2774.         G.surface.SetDrawColor( Color( 0, 0, 0 ) )
  2775.         G.surface.DrawOutlinedRect( 0, 0, RenameConfig:GetWide(), RenameConfig:GetTall() )
  2776.     end
  2777.    
  2778.     local DeleteConfig = G.vgui.Create( "DButton", tabs.config )
  2779.     DeleteConfig:SetText( "Delete" )
  2780.     DeleteConfig:SetSize( 105, 30 )
  2781.     DeleteConfig:SetPos( 118, 90 )
  2782.     DeleteConfig:SetTextColor( color_white )
  2783.     DeleteConfig.DoClick = function()
  2784.         local line = CfgList:GetSelectedLine()
  2785.         if line != nil then
  2786.             local config = CfgList:GetLine( line ):GetValue( 1 )
  2787.             if config != "default" then
  2788.                 for k, v in G.next, ExplicityBoat.Configs do
  2789.                     if v == config then
  2790.                         ExplicityBoat.DeleteConfig( config )
  2791.                         G.table.remove( ExplicityBoat.Configs, k )
  2792.                         ExplicityBoat.Sound()
  2793.                     end
  2794.                 end
  2795.             end
  2796.         end
  2797.     end
  2798.     DeleteConfig.Paint = function()
  2799.         G.surface.SetDrawColor( Color( 0, 0, 0 ) )
  2800.         G.surface.DrawOutlinedRect( 0, 0, DeleteConfig:GetWide(), DeleteConfig:GetTall() )
  2801.     end
  2802.    
  2803.     local LoadConfig = G.vgui.Create( "DButton", tabs.config )
  2804.     LoadConfig:SetText( "Load" )
  2805.     LoadConfig:SetSize( 105, 30 )
  2806.     LoadConfig:SetPos( 118, 125 )
  2807.     LoadConfig:SetTextColor( color_white )
  2808.     LoadConfig.DoClick = function()
  2809.         local line = CfgList:GetSelectedLine()
  2810.         if line != nil then
  2811.             local config = CfgList:GetLine( line ):GetValue( 1 )
  2812.             ExplicityBoat.LoadConfig( config )
  2813.             ExplicityBoat.Frame:SetVisible( false )
  2814.             ExplicityBoat.Changelog:SetVisible( false )
  2815.             ExplicityBoat.MenuOpen = false
  2816.             ExplicityBoat.MenuToggle = false
  2817.             ExplicityBoat.Sound()
  2818.         end
  2819.     end
  2820.     LoadConfig.Paint = function()
  2821.         G.surface.SetDrawColor( Color( 0, 0, 0 ) )
  2822.         G.surface.DrawOutlinedRect( 0, 0, LoadConfig:GetWide(), LoadConfig:GetTall() )
  2823.     end
  2824.    
  2825.     local SetDefaultCfg = G.vgui.Create( "DButton", tabs.config )
  2826.     SetDefaultCfg:SetText( "Set Default" )
  2827.     SetDefaultCfg:SetSize( 105, 30 )
  2828.     SetDefaultCfg:SetPos( 118, 160 )
  2829.     SetDefaultCfg:SetTextColor( color_white )
  2830.     SetDefaultCfg.DoClick = function()
  2831.         local line = CfgList:GetSelectedLine()
  2832.         if line != nil then
  2833.             local config = CfgList:GetLine( line ):GetValue( 1 )
  2834.             ExplicityBoat.SetDefaultConfig( config )
  2835.             ExplicityBoat.LoadConfig( config )
  2836.             ExplicityBoat.Sound()
  2837.         end
  2838.     end
  2839.     SetDefaultCfg.Paint = function()
  2840.         G.surface.SetDrawColor( Color( 0, 0, 0 ) )
  2841.         G.surface.DrawOutlinedRect( 0, 0, SetDefaultCfg:GetWide(), SetDefaultCfg:GetTall() )
  2842.     end
  2843.        
  2844.     local UpdateConfig = G.vgui.Create( "DButton", tabs.config )
  2845.     UpdateConfig:SetText( "Save Changes" )
  2846.     UpdateConfig:SetSize( 105, 30 )
  2847.     UpdateConfig:SetPos( 118, 195 )
  2848.     UpdateConfig:SetTextColor( color_white )
  2849.     UpdateConfig.DoClick = function()
  2850.         ExplicityBoat.Sound()
  2851.         ExplicityBoat.UpdateConfig()
  2852.     end
  2853.     UpdateConfig.Paint = function()
  2854.         G.surface.SetDrawColor( Color( 0, 0, 0 ) )
  2855.         G.surface.DrawOutlinedRect( 0, 0, UpdateConfig:GetWide(), UpdateConfig:GetTall() )
  2856.     end
  2857.    
  2858.     // Binds
  2859.     local BindCommands = G.vgui.Create( "DComboBox", tabs.config )
  2860.     BindCommands:SetPos( 5, 160 )
  2861.     BindCommands:SetSize( 105, 20 )
  2862.     BindCommands:SetTextColor( color_white )
  2863.     for k, v in G.next, ExplicityBoat.Binds do
  2864.         BindCommands:AddChoice( k )
  2865.     end
  2866.     BindCommands.Paint = function()
  2867.         G.surface.SetDrawColor( Color( 0, 0, 0 ) )
  2868.         G.surface.DrawOutlinedRect( 0, 0, BindCommands:GetWide(), BindCommands:GetTall() )
  2869.     end
  2870.    
  2871.     local BindKeys = G.vgui.Create( "DComboBox", tabs.config )
  2872.     BindKeys:SetPos( 5, 185 )
  2873.     BindKeys:SetSize( 105, 20 )
  2874.     BindKeys:SetTextColor( color_white )
  2875.     for k, v in G.next, ExplicityBoat.Keys do
  2876.         BindKeys:AddChoice( v.Name )
  2877.     end
  2878.     BindKeys.Paint = function()
  2879.         G.surface.SetDrawColor( Color( 0, 0, 0 ) )
  2880.         G.surface.DrawOutlinedRect( 0, 0, BindKeys:GetWide(), BindKeys:GetTall() )
  2881.     end
  2882.    
  2883.     local RebindKey = G.vgui.Create( "DButton", tabs.config )
  2884.     RebindKey:SetText( "Bind" )
  2885.     RebindKey:SetSize( 105, 20 )
  2886.     RebindKey:SetPos( 5, 210 )
  2887.     RebindKey:SetTextColor( color_white )
  2888.     RebindKey.DoClick = function()
  2889.         local Key = BindKeys:GetValue()
  2890.         local Command = BindCommands:GetValue()
  2891.         if ( BindKeys:GetValue() != "" && BindCommands:GetValue() != "" ) then
  2892.             ExplicityBoat.Frame:SetVisible( false )
  2893.             ExplicityBoat.Changelog:SetVisible( false )
  2894.             ExplicityBoat.MenuOpen = false
  2895.             ExplicityBoat.MenuToggle = false
  2896.             ExplicityBoat.BindKey( Command, Key )
  2897.             ExplicityBoat.Sound()
  2898.         end
  2899.     end
  2900.     RebindKey.Paint = function()
  2901.         G.surface.SetDrawColor( Color( 0, 0, 0 ) )
  2902.         G.surface.DrawOutlinedRect( 0, 0, RebindKey:GetWide(), RebindKey:GetTall() )
  2903.     end
  2904.    
  2905.     ExplicityBoat.CreateOption( "Checkbox", tabs.config, "Load with GAMEMODE hooks (Buggy, may break parts of gamemode)", "load_unhooked", 5, 375 )
  2906.  
  2907.    
  2908. end
  2909.  
  2910. /*
  2911.  
  2912.     Hooking & loading.
  2913.    
  2914. */
  2915.  
  2916. ExplicityBoat.GMHooks = { -- Return the server's original hooks for selected types
  2917.     ["CreateMove"] = GAMEMODE.CreateMove,
  2918.     ["HUDPaint"] = GAMEMODE.HUDPaint,
  2919.     ["StartChat"] = GAMEMODE.StartChat,
  2920.     ["FinishChat"] = GAMEMODE.FinishChat,
  2921. }
  2922.  
  2923. function GAMEMODE:StartChat()
  2924.     ExplicityBoat.Typing = true
  2925.     return ExplicityBoat.GMHooks.StartChat()
  2926. end
  2927.  
  2928. function GAMEMODE:FinishChat()
  2929.     ExplicityBoat.Typing = false
  2930.     return ExplicityBoat.GMHooks.FinishChat()
  2931. end
  2932.  
  2933. function GAMEMODE:ShouldDrawLocalPlayer( ply )
  2934.     return ExplicityBoat.Bools["misc_thirdperson"]
  2935. end
  2936.  
  2937. if ExplicityBoat.Bools["load_unhooked"] then
  2938.  
  2939.     function GAMEMODE:CreateMove( ucmd )
  2940.         ExplicityBoat.CreateMove( ucmd )
  2941.         return ExplicityBoat.GMHooks.CreateMove( ucmd )
  2942.     end
  2943.  
  2944.     function GAMEMODE:HUDPaint( self )
  2945.         ExplicityBoat.HUDPaint()
  2946.         return ExplicityBoat.GMHooks.HUDPaint( self )
  2947.     end
  2948.  
  2949.     function GAMEMODE:CalcView( ply, origin, angles, fov )
  2950.         return ExplicityBoat.CalcView( ply, origin, angles, fov )
  2951.     end
  2952.  
  2953.     function GAMEMODE:Move()
  2954.         return ExplicityBoat.Move()
  2955.     end
  2956.    
  2957.     ExplicityBoat.Message( Color( 255, 0, 134 ), "Hooking functions into the gamemode's hook system." )
  2958.    
  2959. else
  2960.  
  2961.     ExplicityBoat.AddHook( "CreateMove", ExplicityBoat.CreateMove )
  2962.     ExplicityBoat.AddHook( "HUDPaint", ExplicityBoat.HUDPaint )
  2963.     ExplicityBoat.AddHook( "CalcView", ExplicityBoat.CalcView )
  2964.     ExplicityBoat.AddHook( "Move", ExplicityBoat.Move )
  2965.    
  2966.     ExplicityBoat.Message( Color( 255, 150, 0 ), "Loading unsecured hooks. More detectable but more reliable." )
  2967.    
  2968. end
  2969.  
  2970. ExplicityBoat.LoadConfig( ExplicityBoat.DefaultConfig )
  2971. ExplicityBoat.logEvent( "Load", "Playing " .. GAMEMODE.Name .. " on " .. GetHostName() )
  2972.  
  2973. G.chat.AddText(
  2974. ExplicityBoat.Colors.DarkRed, "[ExplicityBoat] ",
  2975. ExplicityBoat.Colors.Cyan, "Loaded lua. ",
  2976. ExplicityBoat.Colors.Purple, ExplicityBoat.Info.Version .. ", ",
  2977. ExplicityBoat.Colors.White, "Last updated ",
  2978. ExplicityBoat.Colors.Green, ExplicityBoat.Info.Updated .. ", ",
  2979. Color( 255, 255, 0 ), ExplicityBoat.Info.Size .. ", ",
  2980. Color( 0, 100, 240 ), ExplicityBoat.Info.Lines .. " ",
  2981. ExplicityBoat.Colors.White, "lines long." )
  2982. ExplicityBoat.Sound()
Advertisement
Add Comment
Please, Sign In to add comment