Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- [[ ]] --
- -- -- GAYBO Revision 3 -- --
- -- ]] [[ --
- // 9/23/2014: Fixed typo "Mouse Keys" > "Mouse Buttons"
- // 9/23/2014: Omitted HideScreen variable, cleaned up DrawMisc library
- // 9/23/2014: Cleaned up various code
- // 12/2/2014: Fixed player validity when the player is a number, fixed panels not opening correctly
- // 1/2/2015: Fixed incorrect usage of "or" operator
- // 1/2/2015: Fixed aim_priority angle not working correctly
- // Change both of the change_me_please's to something else
- local CHANGE_ME1 = "change_me_please"
- local CHANGE_ME2 = "change_me_please"
- // Localize libraries for speed
- local achievements = achievements
- local cam = cam
- local chat = chat
- local cleanup = cleanup
- local concommand = concommand
- local constraint = constraint
- local controlpanel = controlpanel
- local cookie = cookie
- local coroutine = coroutine
- local cvars = cvars
- local debugoverlay = debugoverlay
- local debug = debug
- local duplicator = duplicator
- local ents = ents
- local file = file
- local gamemode = gamemode
- local game = game
- local gmod = gmod
- local gui = gui
- local hook = hook
- local http = http
- local input = input
- local killicon = killicon
- local language = language
- local list = list
- local markup = markup
- local mesh = mesh
- local net = net
- local notification = notification
- local os = os
- local package = package
- local physenv = physenv
- local player_manager = player_manager
- local player = player
- local presets = presets
- local render = render
- local resource = resource
- local saverestore = saverestore
- local scripted_ents = scripted_ents
- local spawnmenu = spawnmenu
- local sql = sql
- local string = string
- local surface = surface
- local table = table
- local team = team
- local timer = timer
- local undo = undo
- local usermessage = usermessage
- local util = util
- local vgui = vgui
- local weapons = weapons
- // Localize some global functions (not all of them obviously)
- local Angle = Angle
- local Color = Color
- local EyeAngles = EyeAngles
- local EyePos = EyePos
- local ipairs = ipairs
- local pairs = pairs
- local tobool = tobool
- local tonumber = tonumber
- local tostring = tostring
- local type = type
- local unpack = unpack
- local Vector = Vector
- local Msg = Msg
- local MsgN = MsgN
- local IsValid = IsValid
- local RealFrameTime = RealFrameTime
- local CreateClientConVar = CreateClientConVar
- local CreateMaterial = CreateMaterial
- local AddConsoleCommand = AddConsoleCommand
- local next = next
- local Entity = Entity
- local rawget = rawget
- local pcall = pcall
- local FindMetaTable = FindMetaTable
- local HSVToColor = HSVToColor
- local ScrW = ScrW
- local ScrH = ScrH
- local RealTime = RealTime
- local LocalPlayer = LocalPlayer
- local LerpAngle = LerpAngle
- local GetConVarNumber = GetConVarNumber
- local collectgarbage = collectgarbage
- // Localize masks
- local MASK_SHOT = MASK_SHOT
- local MASK_SHOT_PORTAL = MASK_SHOT_PORTAL
- local MASK_SOLID = MASK_SOLID
- local MASK_PLAYERSOLID = MASK_PLAYERSOLID
- local MASK_ALL = MASK_ALL
- local MASK_OPAQUE = MASK_OPAQUE
- local MASK_OPAQUE_AND_NPCS = MASK_OPAQUE_AND_NPCS
- local MASK_SPLITAREAPORTAL = MASK_SPLITAREAPORTAL
- local MASK_BLOCKLOS_AND_NPCS = MASK_BLOCKLOS_AND_NPCS
- local MASK_VISIBLE = MASK_VISIBLE
- local MASK_NPCSOLID = MASK_NPCSOLID
- local MASK_BLOCKLOS = MASK_BLOCKLOS
- local MASK_NPCSOLID_BRUSHONLY = MASK_NPCSOLID_BRUSHONLY
- local MASK_VISIBLE_AND_NPCS = MASK_VISIBLE_AND_NPCS
- local MASK_NPCWORLDSTATIC = MASK_NPCWORLDSTATIC
- local MASK_CURRENT = MASK_CURRENT
- local MASK_DEADSOLID = MASK_DEADSOLID
- local MASK_SOLID_BRUSHONLY = MASK_SOLID_BRUSHONLY
- local MASK_SHOT_HULL = MASK_SHOT_HULL
- local MASK_WATER = MASK_WATER
- local MASK_PLAYERSOLID_BRUSHONLY = MASK_PLAYERSOLID_BRUSHONLY
- // Localize meta stuff (cause we can)
- local __eq = __eq
- local __tostring = __tostring
- local __gc = __mul
- local __index = __index
- local __concat = __concat
- local __newindex = __newindex
- local __add = __add
- local __sub = __sub
- local __div = __div
- local __call = __call
- local __pow = __pow
- local __unm = __unm
- local __lt = __lt
- local __le = __le
- local __mode = __mode
- local __metatable = __metatable
- // IN Locals
- local IN_JUMP = IN_JUMP
- // Old copies at the top for convenience
- local old_render = render
- local old_debug = debug
- local old_hook = hook
- local old_entmeta = FindMetaTable( "Entity" )
- local old_plymeta = FindMetaTable( "Player" )
- local old_cusercmd = FindMetaTable( "CUserCmd" )
- // Random locals
- local loop = next
- local abs = math.abs
- local gsub = string.gsub
- local insert = table.insert
- local gmatch = string.gmatch
- local GetAll = player.GetAll
- local TraceLine = util.TraceLine
- local RoundedBox = draw.RoundedBox
- local SetFont = surface.SetFont
- local DrawText = surface.DrawText
- local SetTextPos = surface.SetTextPos
- local SetMaterial = surface.SetMaterial
- local SetTextColor = surface.SetTextColor
- local SetDrawColor = surface.SetDrawColor
- local AngleDifference = math.AngleDifference
- local MaterialOverride = render.MaterialOverride
- local DrawTexturedRect = surface.DrawTexturedRect
- local DrawOutlinedRect = surface.DrawOutlinedRect
- local SetColorModulation = render.SetColorModulation
- local G = {
- [ "HookFuncs" ] = {},
- [ "Hooks" ] = {},
- //[ "Detours" ] = {},
- [ "FAV" ] = {},
- [ "AimbotWaste" ] = {},
- [ "BindSystem" ] = {},
- [ "Keys" ] = {},
- [ "Menu" ] = {},
- [ "Console" ] = {},
- [ "Library" ] = {},
- [ "DrawConsole" ] = {},
- [ "Panels" ] = {},
- [ "Theme" ] = {},
- //[ "HitboxFix" ] = {}
- }
- local __G = table.Copy( _G ) // Yay for copies I will never use
- local __R = table.Copy( debug.getregistry() )
- // Theme tables
- G.Theme.Panel = {}
- // Panels
- G.Panels[ "SettingsMenu" ] = {
- Panel = {},
- Frame = {},
- Settings = {}
- }
- G.Panels[ "Console" ] = {
- Panel = {},
- Frame = {},
- TextBox = {}
- }
- G.HookFuncs = {
- [ "HUDPaint" ] = {},
- [ "CreateMove" ] = {},
- [ "Think" ] = {},
- [ "PrePlayerDraw" ] = {}
- }
- // Fast access variables
- G.FAV[1] = "ValveBiped.Bip01_Head1" // HeadBoneString
- G.FAV[2] = RealTime() // GlobalWaitTime
- G.FAV[3] = "" // FontName
- G.FAV[4] = false // MenuOpen
- G.FAV[5] = nil // OldConsoleText ** UNUSED **
- G.FAV[6] = nil // Old ** UNUSED **
- G.FAV[7] = false // Once
- G.FAV[8] = nil // HideScreen ** UNUSED **
- G.FAV[9] = {} // HookStringPool
- G.FAV[10] = 0 // AimWaitTime
- G.FAV[11] = __R.CUserCmd.SetViewAngles // SetViewAngles
- G.FAV[12] = false // ShouldResetTarget
- G.FAV[13] = false // SettingsLoaded
- G.FAV[14] = CreateMaterial( "Gun Dealer", 'UnlitGeneric', { [ "$basetexture" ] = "white", [ "$model" ] = 1, [ "$ignorez" ] = 1, [ "$nofog" ] = 1 } ) // ChamsMat
- G.FAV[15] = false // ShouldCham
- G.AimbotWaste = {
- [ "StopLoop" ] = false,
- [ "Target" ] = 0,
- [ "AimKeyDown" ] = false,
- [ "Aimbotting" ] = false
- }
- G.FAV.Keys = {} // I could have used GetKeyName but whatever
- // Keyboard Keys
- G.FAV.Keys[1] = KEY_0
- G.FAV.Keys[2] = KEY_1
- G.FAV.Keys[3] = KEY_2
- G.FAV.Keys[4] = KEY_3
- G.FAV.Keys[5] = KEY_4
- G.FAV.Keys[6] = KEY_5
- G.FAV.Keys[7] = KEY_6
- G.FAV.Keys[8] = KEY_7
- G.FAV.Keys[9] = KEY_8
- G.FAV.Keys[10] = KEY_9
- G.FAV.Keys[11] = KEY_A
- G.FAV.Keys[12] = KEY_APOSTROPHE
- G.FAV.Keys[13] = KEY_APP
- G.FAV.Keys[14] = KEY_B
- G.FAV.Keys[15] = KEY_BACKQUOTE
- G.FAV.Keys[16] = KEY_BACKSLASH
- G.FAV.Keys[17] = KEY_BACKSPACE
- G.FAV.Keys[18] = KEY_BREAK
- G.FAV.Keys[19] = KEY_C
- G.FAV.Keys[20] = KEY_CAPSLOCK
- G.FAV.Keys[21] = KEY_CAPSLOCKTOGGLE
- G.FAV.Keys[22] = KEY_COMMA
- G.FAV.Keys[23] = KEY_COUNT
- G.FAV.Keys[24] = KEY_D
- G.FAV.Keys[25] = KEY_DELETE
- G.FAV.Keys[26] = KEY_DOWN
- G.FAV.Keys[27] = KEY_E
- G.FAV.Keys[28] = KEY_END
- G.FAV.Keys[29] = KEY_ENTER
- G.FAV.Keys[30] = KEY_EQUAL
- G.FAV.Keys[31] = KEY_ESCAPE
- G.FAV.Keys[32] = KEY_F
- G.FAV.Keys[33] = KEY_F1
- G.FAV.Keys[34] = KEY_F10
- G.FAV.Keys[35] = KEY_F11
- G.FAV.Keys[36] = KEY_F12
- G.FAV.Keys[37] = KEY_F2
- G.FAV.Keys[38] = KEY_F3
- G.FAV.Keys[39] = KEY_F4
- G.FAV.Keys[40] = KEY_F5
- G.FAV.Keys[41] = KEY_F6
- G.FAV.Keys[42] = KEY_F7
- G.FAV.Keys[43] = KEY_F8
- G.FAV.Keys[44] = KEY_F9
- G.FAV.Keys[45] = KEY_FIRST
- G.FAV.Keys[46] = KEY_G
- G.FAV.Keys[47] = KEY_H
- G.FAV.Keys[48] = KEY_HOME
- G.FAV.Keys[49] = KEY_I
- G.FAV.Keys[50] = KEY_INSERT
- G.FAV.Keys[51] = KEY_J
- G.FAV.Keys[52] = KEY_K
- G.FAV.Keys[53] = KEY_L
- G.FAV.Keys[54] = KEY_LALT
- G.FAV.Keys[55] = KEY_LAST
- G.FAV.Keys[56] = KEY_LBRACKET
- G.FAV.Keys[57] = KEY_LCONTROL
- G.FAV.Keys[58] = KEY_LEFT
- G.FAV.Keys[59] = KEY_LSHIFT
- G.FAV.Keys[60] = KEY_LWIN
- G.FAV.Keys[61] = KEY_M
- G.FAV.Keys[62] = KEY_MINUS
- G.FAV.Keys[63] = KEY_N
- G.FAV.Keys[64] = KEY_NONE
- G.FAV.Keys[65] = KEY_NUMLOCK
- G.FAV.Keys[66] = KEY_NUMLOCKTOGGLE
- G.FAV.Keys[67] = KEY_O
- G.FAV.Keys[68] = KEY_P
- G.FAV.Keys[69] = KEY_PAD_0
- G.FAV.Keys[70] = KEY_PAD_1
- G.FAV.Keys[71] = KEY_PAD_2
- G.FAV.Keys[72] = KEY_PAD_3
- G.FAV.Keys[73] = KEY_PAD_4
- G.FAV.Keys[74] = KEY_PAD_5
- G.FAV.Keys[75] = KEY_PAD_6
- G.FAV.Keys[76] = KEY_PAD_7
- G.FAV.Keys[77] = KEY_PAD_8
- G.FAV.Keys[78] = KEY_PAD_9
- G.FAV.Keys[79] = KEY_PAD_DECIMAL
- G.FAV.Keys[80] = KEY_PAD_DIVIDE
- G.FAV.Keys[81] = KEY_PAD_ENTER
- G.FAV.Keys[82] = KEY_PAD_MINUS
- G.FAV.Keys[83] = KEY_PAD_MULTIPLY
- G.FAV.Keys[84] = KEY_PAD_PLUS
- G.FAV.Keys[85] = KEY_PAGEDOWN
- G.FAV.Keys[86] = KEY_PAGEUP
- G.FAV.Keys[87] = KEY_PERIOD
- G.FAV.Keys[88] = KEY_Q
- G.FAV.Keys[89] = KEY_R
- G.FAV.Keys[90] = KEY_RALT
- G.FAV.Keys[91] = KEY_RBRACKET
- G.FAV.Keys[92] = KEY_RCONTROL
- G.FAV.Keys[93] = KEY_RIGHT
- G.FAV.Keys[94] = KEY_RSHIFT
- G.FAV.Keys[95] = KEY_RWIN
- G.FAV.Keys[96] = KEY_S
- G.FAV.Keys[97] = KEY_SCROLLLOCK
- G.FAV.Keys[98] = KEY_SCROLLLOCKTOGGLE
- G.FAV.Keys[99] = KEY_SEMICOLON
- G.FAV.Keys[100] = KEY_SLASH
- G.FAV.Keys[101] = KEY_SPACE
- G.FAV.Keys[102] = KEY_T
- G.FAV.Keys[103] = KEY_TAB
- G.FAV.Keys[104] = KEY_U
- G.FAV.Keys[105] = KEY_UP
- G.FAV.Keys[106] = KEY_V
- G.FAV.Keys[107] = KEY_W
- G.FAV.Keys[108] = KEY_X
- G.FAV.Keys[109] = KEY_XBUTTON_A
- G.FAV.Keys[110] = KEY_XBUTTON_B
- G.FAV.Keys[111] = KEY_XBUTTON_BACK
- G.FAV.Keys[112] = KEY_XBUTTON_DOWN
- G.FAV.Keys[113] = KEY_XBUTTON_LEFT
- G.FAV.Keys[114] = KEY_XBUTTON_LEFT_SHOULDER
- G.FAV.Keys[115] = KEY_XBUTTON_LTRIGGER
- G.FAV.Keys[116] = KEY_XBUTTON_RIGHT
- G.FAV.Keys[117] = KEY_XBUTTON_RIGHT_SHOULDER
- G.FAV.Keys[118] = KEY_XBUTTON_RTRIGGER
- G.FAV.Keys[119] = KEY_XBUTTON_START
- G.FAV.Keys[120] = KEY_XBUTTON_STICK1
- G.FAV.Keys[121] = KEY_XBUTTON_STICK2
- G.FAV.Keys[122] = KEY_XBUTTON_UP
- G.FAV.Keys[123] = KEY_XBUTTON_X
- G.FAV.Keys[124] = KEY_XBUTTON_Y
- G.FAV.Keys[125] = KEY_XSTICK1_DOWN
- G.FAV.Keys[126] = KEY_XSTICK1_LEFT
- G.FAV.Keys[127] = KEY_XSTICK1_RIGHT
- G.FAV.Keys[128] = KEY_XSTICK1_UP
- G.FAV.Keys[129] = KEY_XSTICK2_DOWN
- G.FAV.Keys[130] = KEY_XSTICK2_LEFT
- G.FAV.Keys[131] = KEY_XSTICK2_RIGHT
- G.FAV.Keys[132] = KEY_XSTICK2_UP
- G.FAV.Keys[133] = KEY_XSTICK2_DOWN
- G.FAV.Keys[134] = KEY_XSTICK2_LEFT
- G.FAV.Keys[135] = KEY_XSTICK2_RIGHT
- G.FAV.Keys[136] = KEY_XSTICK2_UP
- G.FAV.Keys[137] = KEY_Y
- G.FAV.Keys[138] = KEY_Z
- // Mouse Buttons
- G.FAV.Keys[139] = MOUSE_LEFT
- G.FAV.Keys[140] = MOUSE_RIGHT
- G.FAV.Keys[141] = MOUSE_MIDDLE
- G.FAV.Keys[142] = MOUSE_4
- G.FAV.Keys[143] = MOUSE_5
- G.FAV.Keys[144] = MOUSE_WHEEL_UP
- G.FAV.Keys[145] = MOUSE_WHEEL_DOWN
- G.FAV.Keys[146] = MOUSE_COUNT
- G.FAV.Keys[147] = MOUSE_FIRST
- G.FAV.Keys[148] = MOUSE_LAST
- /*
- // Bind System Layout
- BindType = "Keyboard" or "Mouse"
- Button = G.NumberToKey( 137 ) or KEY_END
- WaitTime = 0.02
- BeingHeld = false
- OnPressed = function()
- Do_Stuff
- end
- OnReleased = function()
- Do_Stuff
- end
- */
- function G.Library.CreateBinds()
- local MouseTypes = {
- [ 139 ] = true,
- [ 140 ] = true,
- [ 141 ] = true,
- [ 142 ] = true,
- [ 143 ] = true,
- [ 144 ] = true,
- [ 145 ] = true,
- [ 146 ] = true,
- [ 147 ] = true,
- [ 148 ] = true
- }
- G.BindSystem.Binds = {
- [ "Aimbot" ] = {
- [ "BindType" ] = MouseTypes[ G.GetSetting( "aim_key" ) ] and "Mouse" or "Keyboard",
- [ "Button" ] = G.GetSetting( "aim_key" ) ~= 0 and G.NumberToKey( G.GetSetting( "aim_key" ) ) or KEY_XBUTTON_A,
- [ "WaitTime" ] = 0.00,
- [ "BeingHeld" ] = false,
- [ "OnPressed" ] = function()
- G.AimbotWaste.AimKeyDown = true
- end,
- [ "OnReleased" ] = function()
- G.AimbotWaste.AimKeyDown = false
- end
- },
- [ "Unload" ] = {
- [ "BindType" ] = "Keyboard",
- [ "Button" ] = KEY_END,
- [ "WaitTime" ] = 0.00,
- [ "BeingHeld" ] = false,
- [ "OnPressed" ] = function()
- G.Unload()
- end,
- [ "OnReleased" ] = function()
- end
- },
- [ "Menu" ] = {
- [ "BindType" ] = "Keyboard",
- [ "Button" ] = KEY_INSERT,
- [ "WaitTime" ] = 0.25,
- [ "BeingHeld" ] = false,
- [ "OnPressed" ] = function()
- G.TogglePanelVisiblity()
- end,
- [ "OnReleased" ] = function()
- end
- }
- }
- end
- /*
- // Console Commands Layout
- Naame = "SetSetting"
- Arguments = { 3, [ first, second, third ] }
- HelpEx = Changes a setting
- OnActivated = function()
- Do_Stuff
- end
- */
- function G.Console.CreateCommands()
- G.Console.Commands = {
- [ "setsetting" ] = {
- [ "Name" ] = "SetSetting",
- [ "Arguments" ] = { 2, "[ setting, value ]" },
- [ "HelpEx" ] = "Changes a setting",
- [ "OnActivated" ] = function( args )
- local command = args[1]
- local setting = args[2]
- local num = args[3]
- G.SetSetting( setting, tonumber( num ) )
- end
- },
- [ "help" ] = {
- [ "Name" ] = "Help",
- [ "Arguments" ] = { 1, "[ command ]" },
- [ "HelpEx" ] = "Shows help for a command",
- [ "OnActivated" ] = function( args )
- local command = string.lower( args[2] )
- local help = G.Console.Commands[ command ][ "HelpEx" ]
- local arguments = G.Console.Commands[ command ][ "Arguments" ][ 2 ]
- local name = G.Console.Commands[ command ][ "Name" ]
- G.LogConsole( name .. ": " .. help .. " " .. arguments )
- end
- },
- [ "commands" ] = {
- [ "Name" ] = "Commands",
- [ "Arguments" ] = { 0, "" },
- [ "HelpEx" ] = "Lists all the commands",
- [ "OnActivated" ] = function( args )
- for k, v in loop, G.Console.Commands do
- MsgN( " " ) // Spacer
- G.LogConsole( "Name: " .. v[ "Name" ] )
- G.LogConsole( "Description: " .. v[ "HelpEx" ] )
- G.LogConsole( "Arguments: " .. v[ "Arguments" ][ 2 ] )
- end
- end
- }
- }
- end
- /*
- // Settings Callbacks Layout
- OnCalled = function()
- Do_Stuff
- end
- */
- function G.Library.CreateSettingsCallbacks()
- G.SettingsCallbacks = {
- [ "aim_key" ] = {
- [ "OnCalled" ] = function( setting, num )
- G.LogConsole( "[ SettingsCallbacks ] [ OnCalled ] [ " .. setting .. " " .. num .. " ] Refreshing binds since aim_key was changed" )
- G.Library.CreateBinds()
- end
- },
- [ "aim_priority" ] = {
- [ "OnCalled" ] = function( setting, num )
- G.LogConsole( "[ SettingsCallbacks ] [ OnCalled ] [ " .. setting .. " " .. num .. " ] Resetting target since aim_priority was changed" )
- G.FAV[12] = true
- end
- },
- [ "aim_lock" ] = {
- [ "OnCalled" ] = function( setting, num )
- G.LogConsole( "[ SettingsCallbacks ] [ OnCalled ] [ " .. setting .. " " .. num .. " ] Resetting target since aim_lock was changed" )
- G.FAV[12] = true
- end
- }
- }
- end
- // Log stuff to the console
- function G.LogConsole( txt )
- MsgC( Color( 155, 155, 155, 255 ), "[GAYBO] " .. tostring( txt ) .. "\n" )
- end
- // Log stuff to chat
- function G.LogChat( txt, bool )
- if ( bool ) then
- chat.AddText( Color( 0, 0, 0, 0 ), " " ) // Spacer
- else
- chat.AddText( Color( 41, 128, 185 ), "[GAYBO] " .. txt )
- end
- end
- // Log stuff to a text file
- function G.LogFile( txt, bool )
- local file_name = ( CHANGE_ME1 .. ".txt" )
- if not ( file.Exists( file_name, "DATA" ) ) then
- file.Write( file_name, "Log file created " .. os.date() .. "\n" )
- file.Append( file_name, "[" .. os.date() .. "] " .. txt .. "\n" )
- else
- file.Append( file_name, "[" .. os.date() .. "] " .. txt .. "\n" )
- end
- if not ( bool ) then
- G.LogConsole( 'Logged text "' .. txt .. '" to: ' .. CHANGE_ME1 .. '.txt' )
- end
- end
- // Log settings to a text file
- function G.LogSettings( settings, typ )
- local file_name = typ == 1 and ( CHANGE_ME2 .. ".txt" ) or ( "cs_italy.txt" ) // cs_italy was for HitboxFix, which is now removed
- local tab = util.TableToJSON( settings )
- file.Write( file_name, tab )
- end
- // Random String
- function G.RandomString( amt )
- local str = ""
- for i = 1, amt do
- str = str .. string.char( math.random( 97, 122 ) )
- end
- return str
- end
- // Normalize a angle (???)
- function G.Normalize( ang )
- return ( ang + 180 ) % 360 - 180
- end
- // Unload function
- function G.Unload()
- local MenuOpen = G.FAV[4]
- for k, v in loop, G.Hooks do
- hook.Remove( v[ "type" ], v[ "name" ], v[ "function" ] ) // Necessary because of the names (function, type)
- end
- G.LogChat( "Cheat unloaded" )
- if ( MenuOpen ) then
- G.TogglePanelVisiblity()
- end
- G = nil
- collectgarbage()
- end
- // Strings to a table
- function G.StringToTable( str )
- local tab = {}
- for v in gmatch( str, "([^ ]+)" ) do
- insert( tab, v )
- end
- return tab
- end
- // Font
- function G.Library.DrawMisc()
- local str = G.RandomString( math.Rand( 1, 15 ) )
- local ftab = {
- [ "font" ] = "Arial",
- [ "size" ] = 15,
- [ "weight" ] = 500,
- [ "antialias" ] = false,
- [ "shadow" ] = true,
- [ "outline" ] = false,
- }
- G.FAV[3] = str
- surface.CreateFont( str, ftab )
- end
- // Setting Prefixes
- G.SettingsPrefixs = {
- [ "aim" ] = "Aimbot",
- [ "esp" ] = "ESP",
- [ "mis" ] = "Miscellaneous" // Misc
- }
- // Settings system
- G.Settings = {
- [ "aim_enabled" ] = { [1] = "Enable the aimbot", [2] = 0 },
- [ "aim_team" ] = { [1] = "Aimbot wont target teammates", [2] = 0 },
- [ "aim_steam" ] = { [1] = "Aimbot wont target steam friends", [2] = 0 },
- [ "aim_fov" ] = { [1] = "The field of view the aimbot will only target in", [2] = 0 },
- [ "aim_key" ] = { [1] = "The key that enables/disables the aimbot", [2] = 0 },
- [ "aim_nospread" ] = { [1] = "Aimbot will compensate for weapon spread", [2] = 0 }, //
- [ "aim_prediction" ] = { [1] = "Aimbot will predict one tick into the future", [2] = 0 },
- [ "aim_norecoil" ] = { [1] = "Aimbot will compensate for weapon recoil", [2] = 0 },
- [ "aim_smooth" ] = { [1] = "Aimbot will aim smooth instead of snap", [2] = 0 },
- [ "aim_smooth_value" ] = { [1] = "Amount aimbot will be smoothed by", [2] = 0 },
- [ "aim_humanize" ] = { [1] = "Aimbot will look a lot more human", [2] = 0 }, //
- [ "aim_autofire" ] = { [1] = "Aimbot will shoot once it's locked onto a target", [2] = 0 },
- [ "aim_rapidfire" ] = { [1] = "Aimbot will shoot pistols and other guns rapidly", [2] = 0 },
- [ "aim_priority" ] = { [1] = "Aimbot target selection will be prioritized (Distance, Angle)", [2] = 0 },
- [ "aim_lock" ] = { [1] = "Aimbot will lock until the target is invalid or aimkey lifted", [2] = 0 },
- [ "esp_enabled" ] = { [1] = "Enable the ESP", [2] = 0 },
- [ "esp_name" ] = { [1] = "Players names will be drawn on them", [2] = 0 },
- [ "esp_rank" ] = { [1] = "Players rank will be draw on them", [2] = 0 },
- [ "esp_health" ] = { [1] = "Players health will be drawn on them", [2] = 0 },
- [ "esp_weapon" ] = { [1] = "Players weapon will be drawn on them", [2] = 0 },
- [ "esp_box" ] = { [1] = "A box will be drawn around players", [2] = 0 },
- [ "esp_distance" ] = { [1] = "Maximum distance the ESP will be drawn at", [2] = 0 }, //
- [ "esp_traitors" ] = { [1] = "Show traitors on the ESP (TTT)", [2] = 0 }, //
- [ "esp_weapons" ] = { [1] = "Show weapons on the ESP (TTT, DarkRP)", [2] = 0 }, //
- [ "esp_murderer" ] = { [1] = "Show the murderer on the ESP (Murder)", [2] = 0 }, //
- [ "esp_loot" ] = { [1] = "Show loot on the ESP (Murder)", [2] = 0 }, //
- [ "esp_shipments" ] = { [1] = "Show shipments on the ESP (DarkRP)", [2] = 0 }, //
- [ "esp_chams" ] = { [1] = "Players will be masked with a material visible through walls", [2] = 0 },
- [ "misc_bhop" ] = { [1] = "If space is being pressed you will jump auto", [2] = 0 },
- [ "misc_bhop_autostrafer" ] = { [1] = "You will strafe in the direction you are facing", [2] = 0 },
- [ "misc_spectators" ] = { [1] = "Players spectating you will be shown", [2] = 0 }, //
- [ "misc_crosshair" ] = { [1] = "A crosshair will be drawn on your screen", [2] = 0 }
- }
- function G.GetSetting( setting )
- return( G.Settings[ setting ][ 2 ] )
- end
- function G.SetSetting( setting, num )
- G.Settings[ setting ][ 2 ] = num
- G.LogSettings( G.Settings, 1 )
- if ( G.SettingsCallbacks[ setting ] ) then
- G.SettingsCallbacks[ setting ][ "OnCalled" ]( setting, num )
- end
- G.LogConsole( "[ SetSetting ] Set setting " .. setting .. " to " .. num )
- end
- function G.Library.SettingsInit()
- local file_name = ( CHANGE_ME2 .. ".txt" )
- local file_json = {}
- local file_settings = {}
- local count = 0
- if ( file.Exists( file_name, "DATA" ) and file.Read( file_name, "DATA" ) ~= "" ) then
- file_json = file.Read( file_name )
- file_settings = util.JSONToTable( file_json )
- if ( table.Count( file_settings ) ~= table.Count( G.Settings ) ) then
- file.Write( CHANGE_ME2 .. "_custom.txt", file.Read( file_name ) )
- for k, v in loop, G.Settings do
- if not ( file_settings[ k ] ) then
- file_settings[ k ] = v
- count = count + 1
- end
- end
- if ( count == 1 ) then // This wasn't unnecessary okay
- G.LogConsole( "1 feature has been added to the cheat" )
- else
- G.LogConsole( count .. " features have been added to the cheat" )
- end
- end
- for k, v in loop, G.Settings do
- v[ 2 ] = file_settings[ k ][ 2 ]
- end
- else
- G.LogSettings( G.Settings, 1 )
- end
- MsgN( " " ) // Spacer
- for k, v in loop, G.Settings do
- G.LogConsole( "[ SettingsInit ] " .. "[ " .. k .. " " .. v[ 2 ] .. " ] Setting Loaded!" )
- end
- MsgN( " " ) // Spacer
- G.FAV[13] = true
- end
- // Hook System
- function G.HookFunc( typ, name, func )
- local str = ( G.RandomString( math.Rand( 1, 25 ) ) )
- insert( G.FAV[9], str )
- hook.Add( typ, str, func )
- G.Hooks[ str ] = {
- [ "type" ] = typ,
- [ "name" ] = str,
- [ "function" ] = func
- }
- G.LogConsole( "[ HookFunc ] [ " .. name .. " ] has been hooked with [ " .. typ .. " ]" )
- end
- function G.HUDPaint()
- for k, func in loop, G.HookFuncs.HUDPaint do
- func()
- end
- end
- function G.CreateMove( cmd )
- for k, func in loop, G.HookFuncs.CreateMove do
- func( cmd )
- end
- end
- function G.Think()
- for k, func in loop, G.HookFuncs.Think do
- func()
- end
- end
- function G.PrePlayerDraw( ply )
- for k, func in loop, G.HookFuncs.PrePlayerDraw do
- func( ply )
- end
- end
- function G.Library.HookGFuncs()
- G.HookFunc( "HUDPaint", "HUDPaint", G.HUDPaint )
- G.HookFunc( "CreateMove", "CreateMove", G.CreateMove )
- G.HookFunc( "Think", "Think", G.Think )
- G.HookFunc( "PrePlayerDraw", "PrePlayerDraw", G.PrePlayerDraw )
- end
- local __trace = {}
- function G.IsVisible( pos, v )
- local ply = LocalPlayer()
- local gsp = ply:GetShootPos()
- local _trace = {
- [ "start" ] = gsp,
- [ "endpos" ] = pos,
- [ "filter" ] = ply,
- [ "mask" ] = MASK_SHOT
- }
- local trace = TraceLine( _trace, __trace )
- if ( trace.Fraction == 1 ) or ( trace.Entity == v ) then
- return true
- end
- return false
- end
- function G.InFov( ang, typ )
- local ply = LocalPlayer()
- local fov = G.GetSetting( "aim_fov" )
- local diff = abs( AngleDifference( ang.p, ply:EyeAngles().p ) ) + abs( AngleDifference( ang.y, ply:EyeAngles().y ) )
- if ( fov == 0 or fov == 360 ) then
- if ( typ == 1 ) then
- return true
- else
- return diff
- end
- end
- if ( diff >= fov ) then
- if ( typ == 1 ) then
- return false
- else
- return 0
- end
- end
- if ( typ == 1 ) then
- return true
- else
- return diff
- end
- end
- function G.IsValidPlayer( v, typ )
- local ply = LocalPlayer()
- local pos = Vector()
- local ang = Angle()
- if ( type( v ) == "number" ) then
- return
- end
- if ( typ == 1 ) then // ESP
- if ( v == ply ) or ( not ( v:Alive() ) or ( v:IsDormant() ) ) then
- return false
- end
- return true
- elseif ( typ == 2 ) then // Aimbot
- if ( v == ply ) or ( not ( v:Alive() ) or ( v:GetColor().a < 255 ) or ( v:IsDormant() ) ) then
- return false
- end
- pos = G.GetAimPosition( v )
- if not ( G.IsVisible( pos, v ) ) then
- return false
- end
- if ( v:Team() == ply:Team() ) and ( G.GetSetting( "aim_team" ) ~= 1 ) then
- return false
- end
- if ( v:GetFriendStatus() == "friend" ) and ( G.GetSetting( "aim_steam" ) == 1 ) then
- return false
- end
- ang = ( pos - ply:GetShootPos() ):Angle()
- if not ( G.InFov( ang, 1 ) ) then
- return false
- end
- return ang
- end
- end
- // ESP
- function G.GetNiceWeaponName( v )
- local weapon = v:GetActiveWeapon()
- if ( weapon == NULL ) then
- return ""
- end
- local class = weapon:GetClass()
- local nice_class = gsub( class, "weapon_", "" )
- return nice_class
- end
- function G.BoxESP( v, color ) // TODO: Upgrade to OBBMaxs and OBBMins
- local col = Color( color.r, color.g, color.b, color.a - 100 )
- local top = ( G.GetAimPosition( v ) + Vector( 0, 0, 5 ) )
- local bot = ( top - Vector( 0, 0, 65 ) )
- local out1, out2 = top:ToScreen(), bot:ToScreen()
- if not ( out1.visible ) then
- return
- end
- local h = ( out2.y - out1.y )
- local w = ( h / 4 )
- SetDrawColor( col ) // Player's health
- DrawOutlinedRect( out1.x - w, out1.y, w * 2, h ) // First box
- SetDrawColor( 0, 0, 0, 255 ) // Make the outline dark
- DrawOutlinedRect( out1.x - w - 1, out1.y - 1, w * 2 + 2, h + 2 ) // Outline 1
- DrawOutlinedRect( out1.x - w + 1, out1.y + 1, w * 2 - 2, h - 2 ) // Outline 2
- end
- function G.TextESP( v, col )
- local _top = ( ( v:GetPos() + v:OBBCenter() ) )
- local _bot = ( _top - Vector( 0, 0, 65 ) )
- local top, bot = _top:ToScreen(), _bot:ToScreen()
- if not ( top.visible ) then
- return
- end
- local FontName = G.FAV[3]
- local pone_enabled = true
- local pone = ""
- local ptwo = ""
- local health = ""
- local health_enabled = false
- local rank = ""
- local rank_enabled = false
- local name = ""
- local name_enabled = false
- local weapon = ""
- local weapon_enabled = false
- if ( G.GetSetting( "esp_name" ) == 1 ) then
- name = v:Nick()
- name_enabled = true
- else
- name = ""
- name_enabled = false
- end
- if ( G.GetSetting( "esp_rank" ) == 1 ) then
- rank = v:GetUserGroup()
- rank_enabled = true
- else
- rank = ""
- rank_enabled = false
- end
- if ( G.GetSetting( "esp_health" ) == 1 ) then
- health = v:Health()
- health_enabled = true
- else
- health = ""
- health_enabled = false
- end
- if ( G.GetSetting( "esp_weapon" ) == 1 ) and ( v:GetActiveWeapon() ~= NULL ) then
- weapon = G.GetNiceWeaponName( v )
- weapon_enabled = true
- else
- weapon = ""
- weapon_enabled = false
- end
- if ( name_enabled ) and ( rank_enabled ) then
- pone = ( name .. " | " .. rank )
- elseif ( name_enabled ) and not ( rank_enabled ) then
- pone = ( name )
- elseif not ( name_enabled ) and ( rank_enabled ) then
- pone = ( rank )
- elseif not ( name_enabled ) and not ( rank_enabled ) then
- pone = ""
- end
- if ( health_enabled ) and ( weapon_enabled ) then
- ptwo = ( health .. " | " .. weapon )
- elseif ( health_enabled ) and not ( weapon_enabled ) then
- ptwo = ( health )
- elseif not ( health_enabled ) and ( weapon_enabled ) then
- ptwo = ( weapon )
- elseif not ( health_enabled ) and not ( weapon_enabled ) then
- ptwo = ""
- end
- SetFont( FontName )
- SetTextColor( col )
- SetTextPos( top.x, top.y )
- DrawText( pone )
- SetTextPos( top.x, top.y + ( ( ( name_enabled ) or ( rank_enabled ) ) and 15 or 0 ) )
- DrawText( ptwo )
- end
- function G.FixModulation( col )
- local newcol = { [ "r" ] = col.r / 255, [ "g" ] = col.g / 255, [ "b" ] = col.b / 255 }
- return newcol
- end
- function G.HookFuncs.PrePlayerDraw.Chams( ply )
- local health = 0
- local smooth = 0
- local col_hp = {}
- local fixcol = {}
- local ShouldCam = G.FAV[15]
- local ChamsMat = G.FAV[14]
- local ChamsEnabled = G.GetSetting( "esp_chams" )
- if ( ShouldCam ) or ( ChamsEnabled ~= 1 ) then
- return
- end
- health = math.Clamp( ply:Health(), 0, ply:GetMaxHealth() )
- smooth = math.Approach( smooth, health, 50 * RealTime() )
- col_hp = HSVToColor( smooth / 100 * 120, 1, 1 )
- fixcol = G.FixModulation( col_hp )
- MaterialOverride( ChamsMat )
- SetColorModulation( fixcol.r, fixcol.g, fixcol.b )
- G.FAV[15] = true
- ply:DrawModel()
- SetColorModulation( 1, 1, 1 )
- MaterialOverride()
- ply:DrawModel()
- G.FAV[15] = false
- end
- function G.Crosshair( col )
- local x = ScrW() / 2
- local y = ScrH() / 2
- local i = 0
- SetDrawColor( col )
- for i = 0, 1 do
- surface.DrawLine( x + 10 + i, y, x, y )
- surface.DrawLine( x - 10 - i, y, x, y )
- surface.DrawLine( x, y + 10 + i, x, y )
- surface.DrawLine( x, y - 10 - i, x, y )
- end
- end
- function G.HookFuncs.HUDPaint.ESPMain()
- local ply = LocalPlayer()
- local col_hp = {}
- local col_team = {}
- local health = 0
- local smooth = 0
- local valid = false
- health = math.Clamp( ply:Health(), 0, ply:GetMaxHealth() )
- smooth = math.Approach( smooth, health, 50 * RealTime() )
- col_hp = HSVToColor( smooth / 100 * 120, 1, 1 )
- if ( G.GetSetting( "misc_crosshair" ) == 1 ) then
- G.Crosshair( col_hp )
- end
- if ( G.GetSetting( "esp_enabled" ) == 1 ) then
- for k, v in loop, GetAll() do
- valid = ( G.IsValidPlayer( v, 1 ) )
- if not ( valid ) then
- continue
- end
- col_team = team.GetColor( v:Team() )
- health = math.Clamp( v:Health(), 0, v:GetMaxHealth() )
- col_hp = HSVToColor( health / 100 * 120, 1, 1 )
- if ( G.GetSetting( "esp_box" ) == 1 ) then
- G.BoxESP( v, col_hp )
- end
- G.TextESP( v, col_team )
- end
- end
- end
- // Bunny Hop
- function G.HookFuncs.CreateMove.BunnyHop( cmd )
- local ply = LocalPlayer()
- local buttons = 0
- if ( G.GetSetting( "misc_bhop" ) == 1 ) then
- if ( cmd:KeyDown( IN_JUMP ) ) then
- if ( G.GetSetting( "misc_bhop_autostrafer" ) == 1 ) then
- if ( cmd:GetMouseX() < 0 ) then
- cmd:SetSideMove( -10000000 )
- elseif ( cmd:GetMouseX() > 0 ) then
- cmd:SetSideMove( 10000000 )
- end
- end
- if ( ply:IsOnGround() ) then
- buttons = cmd:GetButtons()
- cmd:SetButtons( buttons, IN_JUMP )
- else
- buttons = cmd:GetButtons() - IN_JUMP
- cmd:SetButtons( buttons )
- end
- end
- end
- end
- // Bind System
- function G.IsKeyDown( button, typ )
- if ( typ == "Keyboard" ) then
- if ( input.IsKeyDown( button ) ) then
- return true
- end
- elseif ( typ == "Mouse" ) then
- if ( input.IsMouseDown( button ) ) then
- return true
- end
- end
- return false
- end
- function G.HookFuncs.Think.BindSystem()
- local GlobalWaitTime = G.FAV[2]
- local binds = G.BindSystem.Binds
- local Button = 0
- local WaitTime = 0
- local BindType = ""
- local BeingHeld = true
- for k, v in loop, binds do
- Button = v[ "Button" ]
- WaitTime = v[ "WaitTime" ]
- BindType = v[ "BindType" ]
- BeingHeld = v[ "BeingHeld" ]
- local Stop = false
- if ( G.IsKeyDown( Button, BindType ) ) then
- Stop = false
- if not ( WaitTime == 0 ) then
- if ( RealTime() >= GlobalWaitTime ) then
- G.FAV[2] = RealTime() + WaitTime
- Stop = false // :|
- else
- Stop = true
- end
- end
- if ( Stop ) then
- return
- end
- v[ "BeingHeld" ] = true
- v[ "OnPressed" ]()
- elseif ( v[ "BeingHeld" ] ) then
- if not ( G.IsKeyDown( Button, BindType ) ) then
- v[ "BeingHeld" ] = false
- v[ "OnReleased" ]()
- end
- end
- end
- end
- function G.NumberToKey( number )
- local tab = G.FAV.Keys
- return tab[ number ]
- end
- // Aimbot
- function G.GetGeneralAimSpot( v )
- local forward = Vector()
- local eyes = Vector()
- local head = Vector()
- local center = Vector()
- if ( v:LookupAttachment( "forward" ) ~= 0 ) then
- forward = v:GetAttachment( v:LookupAttachment( "forward" ) )
- if ( forward ) and ( forward.Pos ) then
- return forward.Pos
- end
- end
- if ( v:LookupAttachment( "eyes" ) ~= 0 ) then
- eyes = v:GetAttachment( v:LookupAttachment( "eyes" ) )
- if ( eyes ) and ( eyes.Pos ) then
- return eyes.Pos
- end
- end
- if v:LookupBone( G.FAV[1] ) then
- head = v:GetBonePosition( v:LookupBone( G.FAV[1] ) )
- if ( head ) then
- return head
- end
- end
- if ( v:OBBCenter() and v:GetPos() ) then
- center = ( v:GetPos() + v:OBBCenter() )
- if ( center ) then
- return center
- end
- end
- end
- function G.HitboxPos( v ) // Get your own :)
- end
- function G.GetAimPosition( v )
- local pos = G.GetGeneralAimSpot( v )
- return pos
- end
- function G.GetAimbotTarget()
- if ( G.AimbotWaste.Target == 0 ) then
- return 0
- end
- return IsValid( G.AimbotWaste.Target ) and G.AimbotWaste.Target or 0
- end
- function G.HookFuncs.CreateMove.GetAimbotTargets()
- local ply = LocalPlayer()
- local range = 65535
- local distance = 0
- local setting = 1
- local valid = true
- local svalid = true
- local ang = Angle()
- local target = 0
- for k, v in loop, GetAll() do
- ang = ( G.IsValidPlayer( v, 2 ) )
- if not ( ang ) then
- continue
- end
- if ( G.GetSetting( "aim_lock" ) == 1 ) then
- target = G.AimbotWaste.Target or 0
- svalid = G.IsValidPlayer( target, 2 )
- if ( target ~= 0 ) and ( svalid ) and ( G.AimbotWaste.AimKeyDown ) then
- return
- end
- end
- if ( G.FAV[12] ) and ( target ) then // Unnecessary, don't care
- target = 0
- distance = 0
- range = 0
- G.FAV[12] = false
- return
- end
- setting = G.GetSetting( "aim_priority" )
- // 0 = none
- // 1 = distance
- // 2 = angle
- if ( setting == 1 ) then
- distance = ply:GetPos():Distance( v:GetPos() )
- elseif ( setting ~= 0 ) then
- distance = G.InFov( ang, 2 )
- elseif ( setting == 0 ) then
- target = v
- range = distance
- G.AimbotWaste.Target = target
- return
- end
- if ( distance == range ) then // Jitter fix
- return
- end
- if ( distance <= range ) then
- target = v
- range = distance
- end
- end
- G.AimbotWaste.Target = target
- end
- function G.SmoothAngle( cmd, ang, v )
- local ply = LocalPlayer()
- local smoothang = ang
- local speed = 0
- local enabl = G.GetSetting( "aim_smooth" )
- if ( enabl == 1 ) then
- speed = RealFrameTime() / ( ( G.GetSetting( "aim_smooth_value" ) ) / 100.141592 )
- smoothang = LerpAngle( speed, ply:EyeAngles(), ang )
- end
- return smoothang
- end
- function G.HookFuncs.CreateMove.Aimbot( cmd )
- local ply = LocalPlayer()
- local ang = Angle()
- local vel = Vector()
- local v = G.GetAimbotTarget()
- local once = G.FAV[7]
- local SetViewAngles = G.FAV[11]
- local buttons = 0
- if not ( once ) then
- if ( G.GetSetting( "aim_norecoil" ) == 1 ) then // No Recoil
- old_plymeta.SetEyeAngles = function() end
- else
- //old_plymeta.SetEyeAngles = G.Detours.OldFuncs.SetEyeAngles
- end
- G.FAV[7] = true
- return // I don't know why LocalPlayer gets targeted the first frame
- end
- if ( v == 0 or G.GetSetting( "aim_enabled" ) ~= 1 or G.GetSetting( "aim_key" ) ~= 0 and not G.AimbotWaste.AimKeyDown ) then
- G.AimbotWaste.Aimbotting = false
- return
- end
- if ( G.GetSetting( "aim_norecoil" ) == 1 ) then // No Recoil
- old_plymeta.SetEyeAngles = function() end
- else
- //old_plymeta.SetEyeAngles = G.Detours.OldFuncs.SetEyeAngles
- end
- local aim_pos = G.GetAimPosition( v )
- if ( G.IsVisible( aim_pos, v ) ) then
- G.AimbotWaste.Aimbotting = true
- if ( G.GetSetting( "aim_prediction" ) == 1 ) then // Nope
- end
- ang = ( aim_pos - ply:GetShootPos() ):Angle()
- ang = G.SmoothAngle( cmd, ang, v )
- ang = Angle( G.Normalize( ang.p ), G.Normalize( ang.y ), 0 )
- SetViewAngles( cmd, ang )
- if ( G.GetSetting( "aim_autofire" ) == 1 ) and ( G.GetSetting( "aim_rapidfire" ) ~= 1 ) then
- buttons = bit.bor( cmd:GetButtons(), IN_ATTACK )
- cmd:SetButtons( buttons )
- elseif ( G.GetSetting( "aim_rapidfire" ) == 1 ) and ( RealTime() >= G.FAV[10] ) then
- buttons = bit.bor( cmd:GetButtons(), IN_ATTACK )
- G.FAV[10] = RealTime() + 0.02
- cmd:SetButtons( buttons )
- end
- end
- end
- // Console Backend
- function G.Console.Input( str )
- local tab = G.StringToTable( str )
- local lower = string.lower( tab[ 1 ] )
- local _commands = G.Console.Commands
- local cmd = _commands[ lower ]
- if not ( cmd ) then
- G.LogConsole( "The command specified does not exist, perhaps you mistyped it?" )
- return
- end
- if ( cmd[ "Arguments" ][ 1 ] ~= 0 and #tab - 1 > cmd[ "Arguments" ][ 1 ] or #tab - 1 == 0 and cmd[ "Arguments" ][ 1 ] == 1 ) then // wat
- G.LogConsole( "The command " .. cmd[ "Name" ] .. " only takes " .. cmd[ "Arguments" ][ 1 ] .. " argument(s) " .. cmd[ "Arguments" ][ 2 ] )
- return
- end
- cmd[ "OnActivated" ]( tab )
- end
- function G.Library.ConsoleFuncs()
- G.Console.CreateCommands()
- end
- // GUI
- function G.Theme.Panel:Init()
- end
- function G.Theme.Panel:Paint()
- self.btnMaxim:SetVisible( false )
- self.btnMinim:SetVisible( false )
- self.btnClose:SetVisible( false )
- if not ( G ) then
- return
- end
- RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), Color( 21, 108, 165, 200 ) )
- SetDrawColor( Color( 0, 0, 0, 255 ) );
- DrawOutlinedRect( 0, 0, self:GetWide(), self:GetTall())
- RoundedBox( 0, 1, 1, self:GetWide() - 2, 24, Color( 41, 128, 185 ) )
- SetMaterial( Material( "gui/gradient_up" ) );
- SetDrawColor( Color( 0, 0, 0, 127.5 ) );
- DrawTexturedRect( 1, 1, self:GetWide() - 1, 24, 0 );
- self.btnClose:SetVisible( true )
- self.btnClose.Paint = function()
- if not ( G ) then
- return
- end
- SetTextColor( 255, 255, 255, 255 )
- SetDrawColor( 0, 0, 0, 255 )
- SetTextPos( 18, 6 )
- SetFont( "BudgetLabel" )
- DrawText( "-" )
- end
- self.Close = function()
- self:SetVisible( false )
- end
- end
- vgui.Register( "GFrame", G.Theme.Panel, "DFrame" )
- function G.DrawConsole()
- G.Panels.Console.Panel = vgui.Create( "GFrame" )
- local Panel = G.Panels.Console.Panel
- local gw, gt, x, y = Panel:GetWide(), Panel:GetTall(), ScrW() / 2, ScrH() / 2
- local w, h = ScrW(), ScrH()
- Panel:SetSize( 300, 65 )
- Panel:SetPos( w - h - 10, gw - gt - ( gw - gt ) + 10 )
- Panel:SetTitle( "Mini Console" )
- Panel:SetVisible( false )
- Panel:SetDraggable( true )
- Panel:ShowCloseButton( true )
- G.Panels.Console.Frame = vgui.Create( "DPanel" )
- local Frame = G.Panels.Console.Frame
- Frame:SetVisible( false )
- Frame:SetParent( Panel )
- Frame:SetPos( 5, 30 )
- Frame:SetSize( 290, 30 )
- G.Panels.Console.TextBox = vgui.Create( "DTextEntry" )
- local TextEntry = G.Panels.Console.TextBox
- TextEntry:SetVisible( false )
- TextEntry:SetParent( Panel )
- TextEntry:SetPos( 10, Panel:GetTall() - 30 )
- TextEntry:SetWide( Panel:GetWide() - 20 )
- TextEntry.OnEnter = function()
- G.Console.Input( TextEntry:GetValue() )
- end
- end
- function G.TogglePanelVisiblity( bool )
- local MenuOpen = bool and not bool or G.FAV[4]
- for k, v in loop, G.Panels do
- for l, b in loop, v do
- if not ( IsValid( b ) ) or not ( ValidPanel( b ) ) then
- return
- end
- b:SetVisible( not MenuOpen )
- end
- end
- if not ( bool ) then // Open all panels with the name Panel
- for k, v in loop, G.Panels do
- for l, b in loop, v do
- if not ( IsValid( b ) ) or not ( ValidPanel( b ) ) then
- return
- end
- if ( l == "Panel" ) then
- b:MakePopup()
- end
- end
- end
- end
- gui.EnableScreenClicker( not MenuOpen )
- G.FAV[4] = not MenuOpen
- end
- function G.NiceTabName( name )
- return G.SettingsPrefixs[ name ]
- end
- function G.CreateSettingsMenus()
- G.Panels.SettingsMenu.Panel = vgui.Create( "GFrame" )
- local Panel = G.Panels.SettingsMenu.Panel
- local gw, gt, x, y = Panel:GetWide(), Panel:GetTall(), ScrW() / 2, ScrH() / 2
- local w, h = ScrW(), ScrH()
- Panel:SetSize( 300, 800 )
- Panel:SetPos( w - h - 320, gw - gt - ( gw - gt ) + 10 )
- Panel:SetTitle( "Settings" )
- Panel:SetVisible( false )
- Panel:SetDraggable( true )
- Panel:ShowCloseButton( true )
- G.Panels.SettingsMenu.Frame = vgui.Create( "DPanel" )
- local Frame = G.Panels.SettingsMenu.Frame
- Frame:SetVisible( false )
- Frame:SetParent( Panel )
- Frame:SetPos( 5, 30 )
- Frame:SetSize( 290, 765 )
- G.Panels.SettingsMenu.Settings = vgui.Create( "DProperties" )
- local DProperties = vgui.Create( "DProperties" )
- DProperties:SetParent( Panel )
- DProperties:SetSize( 280, 1000 )
- DProperties:SetPos( 10, 35 )
- local tab = {
- [ "aim" ] = {},
- [ "esp" ] = {},
- [ "mis" ] = {} // Misc
- }
- for k, v in loop, G.Settings do
- local key = string.sub( k, 1, 3 )
- tab[ key ][ k ] = v
- end
- for k, v in loop, tab do
- local short = string.sub( k, 1, 3 )
- local nicename = G.NiceTabName( short )
- for l, b in loop, v do
- local row = DProperties:CreateRow( nicename, l )
- row:Setup( "Float", { min = 0, max = 999 } )
- row:SetValue( b[ 2 ] )
- row.DataChanged = function( self, _val )
- local val = math.floor( _val )
- G.SetSetting( l, val )
- end
- end
- end
- end
- function G.Library.CreateVGUIElements()
- hook.Add( "Think", "_____waitforsettings", function() // Because I love archaic iteration
- if ( G.FAV[13] ) then
- G.DrawConsole()
- G.CreateSettingsMenus()
- end
- hook.Remove( "Think", "_____waitforsettings" )
- end )
- end
- function G.Library.NotifyHooks()
- MsgN( " " ) // Spacer
- for k, v in loop, G.HookFuncs do
- for l, func in loop, v do
- G.LogConsole( "[ Library ] [ NotifyHooks ] [ HookGFuncs ] [ " .. l .. " ] will be called with [ " .. k .. " ]" )
- end
- end
- MsgN( " " ) // Spacer
- end
- function G.CheatInit() // TODO: Add spacers automatically when a library finishes loading
- if ( CHANGE_ME1 == "change_me_please" or CHANGE_ME2 == "change_me_please" ) then
- G.LogChat( "You did not change CHANGE_ME1 and or CHANGE_ME2, aborting." )
- return
- end
- local s
- local e
- for k, v in loop, G.Library do
- s, e = pcall( v )
- if ( s ) then
- G.LogConsole( "[ Library ] [ " .. k .. " ] Library loaded successfully" )
- else
- G.LogConsole( "[ Library ] [ " .. k .. " ] Library failed to load [ " .. e .. " ]" )
- end
- end
- MsgN( " " ) // Spacer
- G.LogChat( "Cheat initialized" )
- end
- G.CheatInit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement