Results 1 to 6 of 6
  1. #1
    Razon91's Avatar
    Join Date
    Nov 2014
    Gender
    male
    Location
    star69
    Posts
    62
    Reputation
    10
    Thanks
    120

    skidsnatcher source code (not pseudo code)

    --[[
    _ _ _
    SS

    Created by dazthecodegod and originally released at MPGH.
    Current Version: 1.5.0

    Features:
    On/Off Switch - In the top right of the hack there is an on/off switch that will deactivate everything.

    Aimbot -
    Active - Determines, overall, if the aimbot should be working.
    Random Bone - If enabled the aimbot will pick a random bone to attack instead of always going at the players head.
    Preference - Used to determine who the aimbot should target next. Can be set to Distance or Angle.
    Attack NPCs - Determines if the aimbot should target NPCs.
    Attack Player - Determines if the aimbot should target Players.
    Prediction - Velocity prediction, to increase the aimbots accuracy.
    Aim On Key - If this is on the aimbot will only target when your selected key is pressed.
    Key - Determines the key for the previous option.
    Anti Snap - Stops the aimbot from snapping to the target. But will decrease accuracy.
    A-Snap Speed - The speed of the anti-snap. Value between 1 and 5.
    Max Angle - The maximum angle the target can be away from you. Value between 0-270.
    Auto Shoot - If this is on and the aimbot is locked on it will automatically shoot.
    Panic Mode - If this is on the aimbot wont function while you are being spectated.
    Ignore Team - If this is on the aimbot will not target players on your team, works with TTT if the traitor detector is enabled.

    ESP -
    Active - Determines, overall, if the ESP is working.
    Player Info - Determines if the ESP should show player information.
    NPC Info - Determines if the ESP should show NPC information.
    Names - Determines if the targets name should be shown. (on NPCs it will be the class name, ex: npc_monk)
    Weapons - Determines if the targets weapon should be displayed
    Distance - Determines if distance between you and the target should be displayed.
    Health - Determines if the targets health should be displayed.
    Bounding Box - Determines if a bounding box should be drawn around the target.
    TTT Feature - Show Traitors - Determines if the ESP should display if the target is a traitor. (must have traitor finder active, see Misc)
    TTT Feature - Bodies - Will display body information on TTT. (Credits on body, Name of player, Found or not found)
    2D Radar - Enables a 2D radar on screen. Players and NPCs are shown as arrows, bodies (TTT) are shown as circles.
    Radar Scale - The distance the radar reaches. Value between 1 and 100
    Max Distance - Determines the maximum distance the ESP will work to. (set to 0 for unlimited distance)
    Team Based - Make the color of the ESP based on the targets team. Works with TTT.

    Chams -
    Active - Determines, overall, if the Chams are working.
    Draw Players - Determines if the Chams should draw players.
    Draw NPCs - Determines if the Chams should draw NPCs.
    Draw Weapons - Determines if the Chams should draw the targets weapon.
    TTT Feature - Bodies - Adds TTT bodies to the Chams
    Team Based - Makes the color of the chams based on the targets team. Works with TTT.
    Max Distance - Determines the maximum distance the Chams will work to. (set to 0 for unlimited distance)

    Misc -
    Show Admins - Displays all current admins in the top right corner of your screen.
    Crosshair - Will draw a crosshair on your screen.
    Crosshair Size - The size of the crosshair. Value between 0 and 1000.
    No Recoil - Will remove all weapon recoil. (doesn't work in singleplayer)
    Spectators - Displays all your current spectators in the top right corner of your screen, under the admins.
    Auto Reload - Will automatically reload your weapon when your magazine is empty.
    Bunny Hop - If this is on you will bunny hop while pressing the bunny hop key.
    Key - Determines the key for the previous option.
    Auto Pistol - Fires semi-automatic weapons as fast as possible. (doesn't work on default HL2 weapons)
    DarkRP Feature - Buy Health - Will automatically use /buyhealth when your health falls below the minimum value set.
    DarkRP Feature - Minimum - Minimum health before buying health. Value between 0 and 100.
    TTT Feature - Traitor Finder - Will display when a traitor buys a traitor weapon. (see also the ESP option for displaying traitors)
    Show Deaths - Will notify you via chat when a player dies.
    Sounds - Enables sound cues along with notifications.

    Style -
    Bounding Box - Determines the color the bounding box should draw in.
    ESP Text - Determines the color the ESP text should draw in.
    Crosshair - Determines the color the Crosshair should draw in.
    TTT Feature - Body Text - Determines the color body information will be shown in.
    Chams - The color of the chams. (will be overwritten if Cham option Team Based is on)
    TTT Feature - Body Chams - The color TTT bodies should be on the chams.
    --]]

    Code:
    //I hear this makes the hack load faster, i didn't actually check the O times but whatever.
    local hook = hook
    local derma = derma
    local surface = surface
    local vgui = vgui
    local input = input
    local util = util
    local cam = cam
    local render = render
    local math = math
    local draw = draw
    local team = team
    
    local AHack = {}
    AHack.Active = CreateClientConVar("AHack_Active", 1, true, false)
    AHack.Version = "1.5.0"
    AHack.Ply = LocalPlayer()
    AHack.TTT = (GAMEMODE and GAMEMODE.Name and string.find(GAMEMODE.Name, "Terror") and true) or false
    if AHack.TTT then AHack.TTTCORPSE = CORPSE end
    AHack.DarkRP = (GAMEMODE and GAMEMODE.Name and string.find(GAMEMODE.Name, "DarkRP") and true) or false
    
    //Converts a string of a color (ex. "Color(255, 255, 255, 255)") into an actual color, and returns the color.
    AHack.GetColorFromString = function(words)
    	//I probably shouldve just used string.explode...well.......
    	if type(words) != "string" then return Color(255, 255, 255, 255) end
    	words = "return "..words
    	local func = CompileString(words, "GettingColors", true)
    	local good, color = pcall(func)
    	if good and type(color) == "table" and color.r and color.g and color.b and color.a then
    		return color
    	else
    		return Color(255, 255, 255, 255)
    	end
    end
    
    AHack.Chars = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}
    AHack.RandomName = function(amount)
    	local toReturn = ""
    	local amount = amount or 10
    	for i = 1, amount do
    		if math.random(0, 1) == 0 then
    			toReturn = toReturn..string.lower(table.Random(AHack.Chars))
    		else
    			toReturn = toReturn..table.Random(AHack.Chars)
    		end
    	end
    	return toReturn
    end
    
    AHack.Message = function(...)
    	chat.AddText(Color(50, 255, 100), "[AHack] ", ...)
    end
    
    AHack.Aimbot = {}
    AHack.Aimbot.CurTarget = nil
    AHack.Aimbot.Vars = {}
    AHack.Aimbot.Vars["Active"] = CreateClientConVar("AHack_Aimbot_Active", 0, true, false)
    AHack.Aimbot.Vars["RandomBones"] = CreateClientConVar("AHack_Aimbot_RandomBones", 0, true, false)
    AHack.Aimbot.Vars["AttackNPCs"] = CreateClientConVar("AHack_Aimbot_AttackNPCs", 0, true, false)
    AHack.Aimbot.Vars["AttackPlayers"] = CreateClientConVar("AHack_Aimbot_AttackPlayers", 0, true, false)
    AHack.Aimbot.Vars["Prediction"] = CreateClientConVar("AHack_Aimbot_Prediction", 0, true, false)
    AHack.Aimbot.Vars["AimOnKey"] = CreateClientConVar("AHack_Aimbot_AimOnKey", 0, true, false)
    AHack.Aimbot.Vars["AimOnKey_Key"] = CreateClientConVar("AHack_Aimbot_AimOnKey_Key", "MOUSE_LEFT", true, false)
    AHack.Aimbot.Vars["MaxAngle"] = CreateClientConVar("AHack_Aimbot_MaxAngle", 180, true, false)
    AHack.Aimbot.Vars["Preferance"] = CreateClientConVar("AHack_Aimbot_Preferance", "Distance", true, false)
    AHack.Aimbot.Vars["AntiSnap"] = CreateClientConVar("AHack_Aimbot_AntiSnap", 0, true, false)
    AHack.Aimbot.Vars["AntiSnapSpeed"] = CreateClientConVar("AHack_Aimbot_AntiSnapSpeed", 4, true, false)
    AHack.Aimbot.Vars["AutoShoot"] = CreateClientConVar("AHack_Aimbot_AutoShoot", 0, true, false)
    AHack.Aimbot.Vars["PanicMode"] = CreateClientConVar("AHack_Aimbot_PanicMode", 0, true, false)
    AHack.Aimbot.Vars["IgnoreTeam"] = CreateClientConVar("AHack_Aimbot_IgnoreTeam", 0, true, false)
    
    AHack.Friends = {}
    AHack.Friends.List = {} //The steamIDs of everyone on your friends list
    AHack.Friends.Vars = {}
    AHack.Friends.Vars["Active"] = CreateClientConVar("AHack_Friends_Active", 0, true, false)
    AHack.Friends.Vars["Reverse"] = CreateClientConVar("AHack_Friends_Reverse", 0, true, false)
    
    AHack.ESP = {}
    AHack.ESP.Vars = {}
    AHack.ESP.Vars["Active"] = CreateClientConVar("AHack_ESP_Active", 0, true, false)
    AHack.ESP.Vars["Players"] = CreateClientConVar("AHack_ESP_Players", 0, true, false)
    AHack.ESP.Vars["NPCs"] = CreateClientConVar("AHack_ESP_NPCs", 0, true, false)
    AHack.ESP.Vars["Name"] = CreateClientConVar("AHack_ESP_Name", "Off", true, false)
    AHack.ESP.Vars["Weapons"] = CreateClientConVar("AHack_ESP_Weapons", "Off", true, false)
    AHack.ESP.Vars["Distance"] = CreateClientConVar("AHack_ESP_Distance", "Off", true, false)
    AHack.ESP.Vars["Health"] = CreateClientConVar("AHack_ESP_Health", "Off", true, false)
    AHack.ESP.Vars["MaxDistance"] = CreateClientConVar("AHack_ESP_MaxDistance", 0, true, false)
    AHack.ESP.Vars["Box"] = CreateClientConVar("AHack_ESP_Box", 0, true, false)
    AHack.ESP.Vars["ShowTraitors"] = CreateClientConVar("AHack_ESP_ShowTraitors", "Off", true, false)
    AHack.ESP.Vars["Bodies"] = CreateClientConVar("AHack_ESP_Bodies", 0, true, false)
    AHack.ESP.Vars["Radar"] = CreateClientConVar("AHack_ESP_Radar", 0, true, false)
    AHack.ESP.Vars["RadarScale"] = CreateClientConVar("AHack_ESP_RadarScale", 20, true, false)
    AHack.ESP.Vars["TeamBased"] = CreateClientConVar("AHack_ESP_TeamBased", 0, true, false)
    
    AHack.Chams = {}
    AHack.Chams.Mat = CreateMaterial(AHack.RandomName(math.random(10,15)), "VertexLitGeneric", { ["$basetexture"] = "models/debug/debugwhite", ["$model"] = 1, ["$ignorez"] = 1 })
    AHack.Chams.Vars = {}
    AHack.Chams.Vars["Active"] = CreateClientConVar("AHack_Chams_Active", 0, true, false)
    AHack.Chams.Vars["Players"] = CreateClientConVar("AHack_Chams_Players", 0, true, false)
    AHack.Chams.Vars["NPCs"] = CreateClientConVar("AHack_Chams_NPCs", 0, true, false)
    AHack.Chams.Vars["Weapons"] = CreateClientConVar("AHack_Chams_Weapons", 0, true, false)
    AHack.Chams.Vars["MaxDistance"] = CreateClientConVar("AHack_Chams_MaxDistance", 0, true, false)
    AHack.Chams.Vars["Bodies"] = CreateClientConVar("AHack_Chams_Bodies", 0, true, false)
    AHack.Chams.Vars["TeamBased"] = CreateClientConVar("AHack_Chams_TeamBased", 0, true, false)
    
    AHack.Entities = {}
    AHack.Entities.List = {} //The class namse of all the entities
    AHack.Entities.Vars = {}
    AHack.Entities.Vars["Active"] = CreateClientConVar("AHack_Entities_Active", 0, true, false)
    
    AHack.Misc = {}
    AHack.Misc.Vars = {}
    AHack.Misc.Vars["ShowAdmins"] = CreateClientConVar("AHack_Misc_ShowAdmins", 0, true, false)
    AHack.Misc.Vars["Crosshair"] = CreateClientConVar("AHack_Misc_Cross", 0, true, false)
    AHack.Misc.Vars["CrosshairSize"] = CreateClientConVar("AHack_Misc_CrossSize", 50, true, false)
    AHack.Misc.Vars["NoRecoil"] = CreateClientConVar("AHack_Misc_NoRecoil", 0, true, false)
    AHack.Misc.Vars["ShowSpectators"] = CreateClientConVar("AHack_Misc_ShowSpectators", 0, true, false)
    AHack.Misc.Vars["BunnyHop"] = CreateClientConVar("AHack_Misc_BunnyHop", 0, true, false)
    AHack.Misc.Vars["BunnyHop_Key"] = CreateClientConVar("AHack_Misc_BunnyHop_Key", "KEY_SPACE", true, false)
    AHack.Misc.Vars["AutoReload"] = CreateClientConVar("AHack_Misc_AutoReload", 0, true, false)
    AHack.Misc.Vars["AutoPistol"] = CreateClientConVar("AHack_Misc_AutoPistol", 0, true, false)
    AHack.Misc.Vars["BuyHealth"] = CreateClientConVar("AHack_Misc_BuyHealth", 0, true, false)
    AHack.Misc.Vars["BuyHealth_Minimum"] = CreateClientConVar("AHack_Misc_BuyHealth_Minimum", 80, true, false)
    AHack.Misc.Vars["TraitorFinder"] = CreateClientConVar("AHack_Misc_TraitorFinder", 0, true, false)
    AHack.Misc.Vars["Deaths"] = CreateClientConVar("AHack_Misc_Deaths", 0, true, false)
    AHack.Misc.Vars["Sounds"] = CreateClientConVar("AHack_Misc_Sounds", 0, true, false)
    
    AHack.Style = {}
    AHack.Style.Vars = {}
    AHack.Style.Vars["BoundingBox"] = {}
    AHack.Style.Vars["BoundingBox"].var = CreateClientConVar("AHack_Style_BoundingBox", "Color(255, 0, 0, 255)", true, false)
    AHack.Style.Vars["BoundingBox"].color = AHack.GetColorFromString(AHack.Style.Vars["BoundingBox"].var:GetString())
    AHack.Style.Vars["ESPText"] = {}
    AHack.Style.Vars["ESPText"].var = CreateClientConVar("AHack_Style_ESPText", "Color(255, 255, 255, 255)", true, false)
    AHack.Style.Vars["ESPText"].color = AHack.GetColorFromString(AHack.Style.Vars["ESPText"].var:GetString())
    AHack.Style.Vars["Crosshair"] = {}
    AHack.Style.Vars["Crosshair"].var = CreateClientConVar("AHack_Style_Cross", "Color(255, 255, 255, 255)", true, false)
    AHack.Style.Vars["Crosshair"].color = AHack.GetColorFromString(AHack.Style.Vars["Crosshair"].var:GetString())
    AHack.Style.Vars["BodyText"] = {}
    AHack.Style.Vars["BodyText"].var = CreateClientConVar("AHack_Style_BodyText", "Color(255, 255, 255, 255)", true, false)
    AHack.Style.Vars["BodyText"].color = AHack.GetColorFromString(AHack.Style.Vars["BodyText"].var:GetString())
    AHack.Style.Vars["Chams"] = {}
    AHack.Style.Vars["Chams"].var = CreateClientConVar("AHack_Style_Chams", "Color(0, 255, 0, 255)", true, false)
    AHack.Style.Vars["Chams"].color = AHack.GetColorFromString(AHack.Style.Vars["Chams"].var:GetString())
    AHack.Style.Vars["BodyChams"] = {}
    AHack.Style.Vars["BodyChams"].var = CreateClientConVar("AHack_Style_BodyChams", "Color(0, 255, 0, 255)", true, false)
    AHack.Style.Vars["BodyChams"].color = AHack.GetColorFromString(AHack.Style.Vars["BodyChams"].var:GetString())
    
    //This loads our friends list and custom entities list.
    /*AHack.SavedData = CreateClientConVar("AHack_SaveData", AHack.RandomName(math.random(10, 15)), true, false)
    if file.Exists(AHack.SavedData:GetString()..".txt", "DATA") then
    	local info = string.Explode("\n", file.Read(AHack.SavedData:GetString()..".txt", "DATA"))
    	if type(info) == "table" and info[1] and info[2] then
    		AHack.Friends.List = util.JSONToTable(info[1])
    		AHack.Entities.List = util.JSONToTable(info[2])
    	end
    end
    
    AHack.SaveData = function()
    	file.Write(AHack.SavedData:GetString()..".txt", util.TableToJSON(AHack.Friends.List))
    	file.Append(AHack.SavedData:GetString()..".txt", "\n")
    	file.Append(AHack.SavedData:GetString()..".txt", util.TableToJSON(AHack.Entities.List))
    end*/
    
    //This is all the bones i look for in the order im looking for them. Feel free to change the order if you want to attack the foot before the head or something like that.
    AHack.Bones = {
    "ValveBiped.Bip01_Head1",
    "ValveBiped.Bip01_Neck1",
    "ValveBiped.Bip01_Spine4",
    "ValveBiped.Bip01_Spine2",
    "ValveBiped.Bip01_Spine1",
    "ValveBiped.Bip01_Spine",
    "ValveBiped.Bip01_R_UpperArm",
    "ValveBiped.Bip01_R_Forearm",
    "ValveBiped.Bip01_R_Hand",
    "ValveBiped.Bip01_L_UpperArm",
    "ValveBiped.Bip01_L_Forearm",
    "ValveBiped.Bip01_L_Hand",
    "ValveBiped.Bip01_R_Thigh",
    "ValveBiped.Bip01_R_Calf",
    "ValveBiped.Bip01_R_Foot",
    "ValveBiped.Bip01_R_Toe0",
    "ValveBiped.Bip01_L_Thigh",
    "ValveBiped.Bip01_L_Calf",
    "ValveBiped.Bip01_L_Foot",
    "ValveBiped.Bip01_L_Toe0"
    }
    
    //If random bones is enabled this list is gone through, randomly, and if none of the bones on this list are found the entire list (above) is gone through.
    //If you edit this be sure to edit the function below it.
    AHack.RandomBones = {
    "ValveBiped.Bip01_Head1",
    "ValveBiped.Bip01_Neck1",
    "ValveBiped.Bip01_Spine4",
    "ValveBiped.Bip01_Spine2",
    "ValveBiped.Bip01_R_UpperArm",
    "ValveBiped.Bip01_L_UpperArm"
    }
    AHack.GetRandomBones = function()
    	local temp = {}
    	local function GetBones() //Ahh recursion, i love you.
    		if #AHack.RandomBones > 0 then
    			local random = math.random(1, #AHack.RandomBones)
    			table.insert(temp, AHack.RandomBones[random])
    			table.remove(AHack.RandomBones, random)
    			GetBones()
    		else
    			table.insert(AHack.RandomBones, "ValveBiped.Bip01_Head1")
    			table.insert(AHack.RandomBones, "ValveBiped.Bip01_Neck1")
    			table.insert(AHack.RandomBones, "ValveBiped.Bip01_Spine4")
    			table.insert(AHack.RandomBones, "ValveBiped.Bip01_Spine2")
    			table.insert(AHack.RandomBones, "ValveBiped.Bip01_R_UpperArm")
    			table.insert(AHack.RandomBones, "ValveBiped.Bip01_L_UpperArm")
    		end
    	end
    	GetBones()
    	return temp
    end
    
    //A list of all keyboard keys, for binding
    AHack.Keys = {
    [0] = "KEY_NONE",
    [1] = "KEY_0",
    [2] = "KEY_1",
    [3] = "KEY_2",
    [4] = "KEY_3",
    [5] = "KEY_4",
    [6] = "KEY_5",
    [7] = "KEY_6",
    [8] = "KEY_7",
    [9] = "KEY_8",
    [10] = "KEY_9",
    [11] = "KEY_A",
    [12] = "KEY_B",
    [13] = "KEY_C",
    [14] = "KEY_D",
    [15] = "KEY_E",
    [16] = "KEY_F",
    [17] = "KEY_G",
    [18] = "KEY_H",
    [19] = "KEY_I",
    [20] = "KEY_J",
    [21] = "KEY_K",
    [22] = "KEY_L",
    [23] = "KEY_M",
    [24] = "KEY_N",
    [25] = "KEY_O",
    [26] = "KEY_P",
    [27] = "KEY_Q",
    [28] = "KEY_R",
    [29] = "KEY_S",
    [30] = "KEY_T",
    [31] = "KEY_U",
    [32] = "KEY_V",
    [33] = "KEY_W",
    [34] = "KEY_X",
    [35] = "KEY_Y",
    [36] = "KEY_Z",
    [37] = "KEY_PAD_0",
    [38] = "KEY_PAD_1",
    [39] = "KEY_PAD_2",
    [40] = "KEY_PAD_3",
    [41] = "KEY_PAD_4",
    [42] = "KEY_PAD_5",
    [43] = "KEY_PAD_6",
    [44] = "KEY_PAD_7",
    [45] = "KEY_PAD_8",
    [46] = "KEY_PAD_9",
    [47] = "KEY_PAD_DIVIDE",
    [48] = "KEY_PAD_MULTIPLY",
    [49] = "KEY_PAD_MINUS",
    [50] = "KEY_PAD_PLUS",
    [51] = "KEY_PAD_ENTER",
    [52] = "KEY_PAD_DECIMAL",
    [53] = "KEY_LBRACKET",
    [54] = "KEY_RBRACKET",
    [55] = "KEY_SEMICOLON",
    [56] = "KEY_APOSTROPHE",
    [57] = "KEY_BACKQUOTE",
    [58] = "KEY_COMMA",
    [59] = "KEY_PERIOD",
    [60] = "KEY_SLASH",
    [61] = "KEY_BACKSLASH",
    [62] = "KEY_MINUS",
    [63] = "KEY_EQUAL",
    [64] = "KEY_ENTER",
    [65] = "KEY_SPACE",
    [66] = "KEY_BACKSPACE",
    [67] = "KEY_TAB",
    [68] = "KEY_CAPSLOCK",
    [69] = "KEY_NUMLOCK",
    [70] = "KEY_ESCAPE",
    [71] = "KEY_SCROLLLOCK",
    [72] = "KEY_INSERT",
    [73] = "KEY_DELETE",
    [74] = "KEY_HOME",
    [75] = "KEY_END",
    [76] = "KEY_PAGEUP",
    [77] = "KEY_PAGEDOWN",
    [78] = "KEY_BREAK",
    [79] = "KEY_LSHIFT",
    [80] = "KEY_RSHIFT",
    [81] = "KEY_LALT",
    [82] = "KEY_RALT",
    [83] = "KEY_LCONTROL",
    [84] = "KEY_RCONTROL",
    [85] = "KEY_LWIN",
    [86] = "KEY_RWIN",
    [87] = "KEY_APP",
    [88] = "KEY_UP",
    [89] = "KEY_LEFT",
    [90] = "KEY_DOWN",
    [91] = "KEY_RIGHT",
    [92] = "KEY_F1",
    [93] = "KEY_F2",
    [94] = "KEY_F3",
    [95] = "KEY_F4",
    [96] = "KEY_F5",
    [97] = "KEY_F6",
    [98] = "KEY_F7",
    [99] = "KEY_F8",
    [100] = "KEY_F9",
    [101] = "KEY_F10",
    [102] = "KEY_F11",
    [103] = "KEY_F12",
    //[104] = "KEY_CAPSLOCKTOGGLE", //THESE
    //[105] = "KEY_NUMLOCKTOGGLE", //MOFOS
    //[106] = "KEY_SCROLLLOCKTOGGLE", //SHOULD DIE
    [107] = "KEY_XBUTTON_UP",
    [108] = "KEY_XBUTTON_DOWN",
    [109] = "KEY_XBUTTON_LEFT",
    [110] = "KEY_XBUTTON_RIGHT",
    [111] = "KEY_XBUTTON_START",
    [112] = "KEY_XBUTTON_BACK",
    [113] = "KEY_XBUTTON_STICK1",
    [114] = "KEY_XBUTTON_STICK2",
    [115] = "KEY_XBUTTON_A",
    [116] = "KEY_XBUTTON_B",
    [117] = "KEY_XBUTTON_X",
    [118] = "KEY_XBUTTON_Y",
    [119] = "KEY_XBUTTON_BLACK",
    [120] = "KEY_XBUTTON_WHITE",
    [121] = "KEY_XBUTTON_LTRIGGER",
    [122] = "KEY_XBUTTON_RTRIGGER",
    [123] = "KEY_XSTICK1_UP",
    [124] = "KEY_XSTICK1_DOWN",
    [125] = "KEY_XSTICK1_LEFT",
    [126] = "KEY_XSTICK1_RIGHT",
    [127] = "KEY_XSTICK2_UP",
    [128] = "KEY_XSTICK2_DOWN",
    [129] = "KEY_XSTICK2_LEFT",
    [130] = "KEY_XSTICK2_RIGHT"
    }
    //A list of all mouse keys, for binding
    AHack.MouseKeys = {
    [107] = "MOUSE_LEFT",
    [108] = "MOUSE_RIGHT",
    [109] = "MOUSE_MIDDLE",
    [110] = "MOUSE_4",
    [111] = "MOUSE_5"
    }
    //Tells me if a specific key is pressed. Loops through both tables.
    AHack.KeyPressed = function(key)
    	if AHack.InChat then return false end
    	
    	for k = 107, 111 do
    		if key == AHack.MouseKeys[k] then
    			if input.IsMouseDown(k) then
    				return true
    			else
    				return false
    			end
    		end
    	end
    	
    	for k = 0, 130 do
    		if key == AHack.Keys[k] then
    			if input.IsKeyDown(k) then
    				return true
    			else
    				return false
    			end
    		end
    	end
    	
    	return false
    end
    
    //Very simple. If the boolean is true it returns 1. If the boolean is false then it returns 0. I dont think i ended up using this anywhere, but whatever, ill leave it here.
    AHack.BoolToInt = function(bool)
    	if bool then 
    		return 1
    	else
    		return 0
    	end
    end
    
    //Checking if a bone is visible, pos is the position of the bone and ent is the entity whos bone were looking for. 
    AHack.SpotIsVisible = function(pos, ent)
    	ent = ent or AHack.Aimbot.CurTarget
    	local tracedata = {}
    	tracedata.start = AHack.Ply:GetShootPos()
    	tracedata.endpos = pos
    	tracedata.filter = {AHack.Ply, ent}
    	
    	local trace = util.TraceLine(tracedata)
    	if trace.HitPos:Distance(pos) < 0.005 then
    		return true
    	else
    		return false
    	end
    end
    
    //Checks all of the entities bones to find if we can see this entity or not.
    AHack.CanSee = function(ent)
    	for k = 1, #AHack.Bones do 
    		local v = AHack.Bones[k]
    		local bone = ent:LookupBone(v)
    		if bone != nil then
    			local pos, ang = ent:GetBonePosition(bone)
    			if AHack.SpotIsVisible(pos, ent) then
    				return true
    			end
    		end
    	end
    	return false
    end
    
    //This returns the next entity we should attack.
    AHack.GetTarget = function()
    	if AHack.Aimbot.Vars["AttackNPCs"]:GetBool() or AHack.Aimbot.Vars["AttackPlayers"]:GetBool() then
    		local targets = {}
    		local everything = ents.GetAll()
    		for k = 1, #everything do 
    			local v = everything[k]
    			if AHack.Aimbot.Vars["AttackNPCs"]:GetBool() and v:IsNPC() then
    				if AHack.CanSee(v) then
    					table.insert(targets, {["Target"] = v, ["Pos"] = v:LocalToWorld(v:OBBCenter())})
    				end
    			elseif AHack.Aimbot.Vars["AttackPlayers"]:GetBool() and v:IsPlayer() and v != AHack.Ply then
    				if AHack.CanSee(v) then
    					table.insert(targets, {["Target"] = v, ["Pos"] = v:LocalToWorld(v:OBBCenter())})
    				end
    			end
    		end
    		
    		for k,v in SortedPairs(targets, true) do //It will already be sorted so this shouldn't be too resource heavy, the main point of this is to loop through the table backwards
    			local v = v["Target"]
    			local shouldremove = false
    			if AHack.Aimbot.Vars["IgnoreTeam"]:GetBool() and v:IsPlayer() then
    				if AHack.TTT then
    					if AHack.Ply:GetRole() == 1 and v:GetRole() == 1 then
    						shouldremove = true
    					end
    						
    					if AHack.Ply:GetRole() != 1 and not table.HasValue(AHack.Traitors, v) then
    						shouldremove = true
    					end
    				else
    					if v:Team() == AHack.Ply:Team() then
    						shouldremove = true
    					end
    				end
    			end
    			
    			if AHack.Friends.Vars["Active"]:GetBool() then
    				if AHack.Friends.Vars["Reverse"]:GetBool() then
    					if not table.HasValue(AHack.Friends.List, v:SteamID()) then
    						shouldremove = true
    					end
    				else
    					if table.HasValue(AHack.Friends.List, v:SteamID()) then
    						shouldremove = true		
    					end
    				end
    			end
    			
    			if shouldremove then
    				table.remove(targets, k)
    			end
    		end
    		
    		if #targets == 0 then 
    			return nil
    		elseif #targets == 1 then
    			targets[1]["Target"].BoneToAimAt = nil
    			return targets[1]["Target"]
    		end
    		
    		if AHack.Aimbot.Vars["Preferance"]:GetString() == "Distance" then
    			local min = {["Distance"] = AHack.Ply:GetPos():Distance(targets[1]["Pos"]), ["Target"] = targets[1]["Target"]}
    			for k = 1, #targets do 
    				local v = targets[k]
    				
    				local distance = AHack.Ply:GetPos():Distance(v["Pos"])
    				if distance < min["Distance"] then
    					min = {["Distance"] = distance, ["Target"] = v["Target"]}
    				end
    			end
    			min["Target"].BoneToAimAt = nil
    			return min["Target"]
    		elseif AHack.Aimbot.Vars["Preferance"]:GetString() == "Angle" then		
    			local min = {["Angle"] = AHack.AngleTo(targets[1]["Pos"]), ["Target"] = targets[1]["Target"]}
    			for k = 1, #targets do 
    				local v = targets[k]
    				
    				local angle = AHack.AngleTo(v["Pos"])
    				if angle < min["Angle"] then
    					min = {["Angle"] = angle, ["Target"] = v["Target"]}
    				end
    			end
    			min["Target"].BoneToAimAt = nil
    			return min["Target"]
    		end
    	else
    		return nil
    	end
    end
    
    //This returns the total angle away from the target we are, and then the pitch and yaw seperately
    AHack.AngleTo = function(pos)
    	local myAngs = AHack.Ply:GetAngles()
    	local needed = (pos - AHack.Ply:GetShootPos()):Angle()
    	
    	myAngs.p = math.NormalizeAngle(myAngs.p)
    	needed.p = math.NormalizeAngle(needed.p)
    	
    	myAngs.y = math.NormalizeAngle(myAngs.y)
    	needed.y = math.NormalizeAngle(needed.y)
    	
    	local p = math.NormalizeAngle(needed.p - myAngs.p)
    	local y = math.NormalizeAngle(needed.y - myAngs.y)
    	
    	return math.abs(p) + math.abs(y), {p = p, y = y}
    end
    
    //Returns true if our target meets our preferances.
    AHack.ValidTarget = function()
    	if AHack.Aimbot.CurTarget == nil then return false end
    	if not IsValid(AHack.Aimbot.CurTarget) then return false end
    	if AHack.Aimbot.CurTarget:IsPlayer() and (not AHack.Aimbot.CurTarget:Alive() or AHack.Aimbot.CurTarget:Team() == TEAM_SPECTATOR or AHack.Aimbot.CurTarget:Health() < 1) then return false end
    	if not AHack.Aimbot.Vars["AttackNPCs"]:GetBool() and AHack.Aimbot.CurTarget:IsNPC() then return false end
    	if not AHack.Aimbot.Vars["AttackPlayers"]:GetBool() and AHack.Aimbot.CurTarget:IsPlayer() then return false end
    	if not AHack.CanSee(AHack.Aimbot.CurTarget) then return false end
    	if AHack.Aimbot.Vars["IgnoreTeam"]:GetBool() and AHack.Aimbot.CurTarget:IsPlayer() then
    		if AHack.TTT then
    			if AHack.Ply:GetRole() == 1 and AHack.Aimbot.CurTarget:GetRole() == 1 then return false end				
    			if AHack.Ply:GetRole() != 1 and not table.HasValue(AHack.Traitors, AHack.Aimbot.CurTarget) then return false end
    		else
    			if AHack.Aimbot.CurTarget:Team() == AHack.Ply:Team() then return false end
    		end
    	end
    	
    	return true
    end
    
    hook.Add("RenderScreenspaceEffects", AHack.RandomName(math.random(10, 15)), function()
    	if AHack.Active:GetBool() then
    		local everything = ents.GetAll()
    		for k = 1, #everything do
    			local v = everything[k]
    			
    			if AHack.Chams.Vars["Active"]:GetBool() and v != AHack.Ply and (AHack.Chams.Vars["MaxDistance"]:GetInt() == 0 or v:GetPos():Distance(AHack.Ply:GetPos()) < AHack.Chams.Vars["MaxDistance"]:GetInt()) then
    				cam.Start3D(EyePos(), EyeAngles())
    					if (v:IsPlayer() and v:Alive() and v:Team() != TEAM_SPECTATOR and AHack.Chams.Vars["Players"]:GetBool()) or (v:IsNPC() and v:Health() > 0 and AHack.Chams.Vars["NPCs"]:GetBool()) then
    						local color = AHack.Style.Vars["Chams"].color
    						if AHack.Chams.Vars["TeamBased"]:GetBool() and v:IsPlayer() then
    							color = team.GetColor(v:Team())
    							if AHack.TTT then
    								if v:GetRole() == 2 then
    									color = Color(0, 0, 255, 255)
    								elseif table.HasValue(AHack.Traitors, v) then
    									color = Color(255, 0, 0, 255)
    								else
    									color = Color(0, 255, 0, 255)
    								end
    							end
    						end
    						render.SuppressEngineLighting(true)
    						render.SetColorModulation(color.r/255, color.g/255, color.b/255, 1)
    						render.MaterialOverride(AHack.Chams.Mat)
    						v:DrawModel()
    						
    						render.SetColorModulation((color.r + 150)/250, (color.g + 150)/250, (color.b + 150)/255, 1)						
    						if IsValid(v:GetActiveWeapon()) and AHack.Chams.Vars["Weapons"]:GetBool() then
    							v:GetActiveWeapon():DrawModel() 
    						end
    						
    						render.SetColorModulation(1, 1, 1, 1)
    						render.MaterialOverride()
    						render.SetModelLighting(4, color.r/255, color.g/255, color.b/255)
    						v:DrawModel()
    						render.SuppressEngineLighting(false)
    					elseif AHack.TTT and AHack.Chams.Vars["Bodies"]:GetBool() and v:GetClass() == "prop_ragdoll" then
    						local color = AHack.Style.Vars["BodyChams"].color
    						render.SuppressEngineLighting(true)	
    						render.SetColorModulation(color.r/255, color.g/255, color.b/255, 1)
    						render.MaterialOverride(AHack.Chams.Mat)
    						v:DrawModel()	
    						render.SetColorModulation(1, 1, 1, 1)
    						render.MaterialOverride()
    						render.SetModelLighting(4, color.r/255, color.g/255, color.b/255)
    						v:DrawModel()
    						render.SuppressEngineLighting(false)
    					elseif AHack.Entities.Vars["Active"]:GetBool() and table.HasValue(AHack.Entities.List, v:GetClass()) then
    						local color = AHack.Style.Vars["Chams"].color					
    						render.SuppressEngineLighting(true)	
    						render.SetColorModulation(color.r/255, color.g/255, color.b/255, 1)
    						render.MaterialOverride(AHack.Chams.Mat)
    						v:DrawModel()	
    						render.SetColorModulation(1, 1, 1, 1)
    						render.MaterialOverride()
    						render.SetModelLighting(4, color.r/255, color.g/255, color.b/255)
    						v:DrawModel()
    						render.SuppressEngineLighting(false)
    					end
    				cam.End3D()
    			end
    		end
    	end
    end)
    
    //Helper function on radar. I just copied this one from the wiki.
    AHack.DrawFilledCircle = function(x, y, radius, quality)
    	local circle = {}
        local tmp = 0
        for i = 1, quality do
            tmp = math.rad(i * 360) / quality 
            circle[i] = {x = x + math.cos(tmp) * radius, y = y + math.sin(tmp) * radius}
        end
    	surface.DrawPoly(circle)
    end
    
    //Another helper fuction on the radar.
    AHack.DrawArrow = function(x, y, myRotation)
    	local arrow = {}	
    	arrow[1] = {x = x, y = y}
    	arrow[2] = {x = x + 4, y = y + 7.5}
    	arrow[3] = {x = x, y = y + 5}
    	arrow[4] = {x = x - 4, y = y + 7.5}
    	
    	//Now that i have the arrow determined, i have to rotate it to match the targets angle
    	myRotation = myRotation * -1
    	myRotation = math.rad(myRotation)
    	for i = 1, 4 do
    		local theirX = arrow[i].x
    		local theirY = arrow[i].y
    		
    		theirX = theirX - x
    		theirY = theirY - y
    		
    		arrow[i].x = theirX * math.cos(myRotation) - theirY * math.sin(myRotation)
    		arrow[i].y = theirX * math.sin(myRotation) + theirY * math.cos(myRotation)
    		
    		arrow[i].x = arrow[i].x + x
    		arrow[i].y = arrow[i].y + y
    	end
    
    	surface.DrawPoly(arrow)
    end
    
    AHack.Traitors = {}
    AHack.SuperAdmins = {}
    AHack.Admins = {}
    AHack.Spectators = {}
    local radarX, radarY, radarWidth, radarHeight = 100, 200, 150, 150
    hook.Add("HUDPaint", AHack.RandomName(math.random(10, 15)), function()
    	if AHack.Active:GetBool() then	
    		local everything = ents.GetAll()
    		
    		if AHack.ESP.Vars["Active"]:GetBool() and AHack.ESP.Vars["Radar"]:GetBool() then //Setting up the background here. And since the ESP doesnt draw you 
    			draw****undedBox(0, radarX, radarY, radarWidth, radarHeight, Color(100, 100, 100, 255 ))
    			draw.NoTexture()
    			if AHack.ESP.Vars["TeamBased"]:GetBool() then
    				local color = team.GetColor(AHack.Ply:Team())
    				if AHack.TTT then
    					if AHack.Ply:GetRole() == 2 then
    						color = Color(0, 0, 255, 255)
    					elseif AHack.Ply:GetRole() == 1 then
    						color = Color(255, 0, 0, 255)
    					else
    						color = Color(0, 255, 0, 255)
    					end
    				end
    				surface.SetDrawColor(color)
    			else
    				surface.SetDrawColor(AHack.Style.Vars["ESPText"].color)
    			end
    			AHack.DrawArrow(radarX + (radarWidth / 2), radarY + (radarHeight / 2), 0)
    		end
    		
    		for k = 1, #everything do
    			local v = everything[k]
    		
    			if AHack.ESP.Vars["Active"]:GetBool() and v != AHack.Ply and (AHack.ESP.Vars["MaxDistance"]:GetInt() == 0 or v:GetPos():Distance(AHack.Ply:GetPos()) < AHack.ESP.Vars["MaxDistance"]:GetInt()) then										
    				if (v:IsPlayer() and v:Alive() and v:Team() != TEAM_SPECTATOR and AHack.ESP.Vars["Players"]:GetBool()) or (v:IsNPC() and v:Health() > 0 and AHack.ESP.Vars["NPCs"]:GetBool()) then
    					local color = AHack.Style.Vars["ESPText"].color
    					if AHack.ESP.Vars["TeamBased"]:GetBool() and v:IsPlayer() then
    						color = team.GetColor(v:Team())
    						if AHack.TTT then
    							if v:GetRole() == 2 then
    								color = Color(0, 0, 255, 255)
    							elseif table.HasValue(AHack.Traitors, v) then
    								color = Color(255, 0, 0, 255)
    							else
    								color = Color(0, 255, 0, 255)
    							end
    						end
    					end
    					
    					local Min, Max = v:GetCollisionBounds()
    					if AHack.ESP.Vars["Box"]:GetBool() then
    						local one = v:LocalToWorld(Min):ToScreen()
    						local two = v:LocalToWorld(Vector(Min.x, Min.y, Max.z)):ToScreen()
    						local three = v:LocalToWorld(Vector(Min.x, Min.y + (Max.y * 2), Min.z)):ToScreen()
    						local four = v:LocalToWorld(Vector(Min.x + (Max.x * 2), Min.y, Min.z)):ToScreen()
    						local five = v:LocalToWorld(Max):ToScreen()
    						local six = v:LocalToWorld(Vector(Max.x, Max.y, Min.z)):ToScreen()
    						local seven = v:LocalToWorld(Vector(Max.x, Max.y + (Min.y * 2), Max.z)):ToScreen()
    						local eight = v:LocalToWorld(Vector(Max.x + (Min.x * 2), Max.y, Max.z)):ToScreen()				
    						
    						if AHack.ESP.Vars["TeamBased"]:GetBool() then
    							surface.SetDrawColor(color)
    						else
    							surface.SetDrawColor(AHack.Style.Vars["BoundingBox"].color)
    						end
    						local function connect(tabone, tabtwo)
    							surface.DrawLine(tabone.x, tabone.y, tabtwo.x, tabtwo.y)
    						end
    						
    						connect(one, two)
    						connect(three, eight)
    						connect(four, seven)
    						connect(six, five)
    						connect(four, six)
    						connect(four, one)
    						connect(one, three)
    						connect(three, six)
    						connect(five, eight)
    						connect(eight, two)
    						connect(two, seven)
    						connect(seven, five)
    					end
    					
    					surface.SetFont("ESPFont")
    					local top = v:GetPos() + Vector(0, 0, Max.z + 10) // A little above their head so its not constantly covering their face.
    					local topscreen = top:ToScreen()
    					local topy = topscreen.y
    					
    					local bottom = v:GetPos()
    					local bottomscreen = bottom:ToScreen()
    					local bottomy = bottomscreen.y
    					
    					local function DrawAbove(text)
    						local W, H = surface.GetTextSize(text)
    						surface.SetTextPos(topscreen.x - W / 2, topy) 
    						surface.DrawText(text)
    						
    						topy = topy + H
    					end
    					
    					local function DrawBelow(text)
    						local W, H = surface.GetTextSize(text)
    						surface.SetTextPos(bottomscreen.x - W / 2, bottomy) 
    						surface.DrawText(text)
    						
    						bottomy = bottomy + H
    					end
    					
    					surface.SetTextColor(Color(255, 0, 0, 255))
    					if AHack.ESP.Vars["ShowTraitors"]:GetString() != "Off" and table.HasValue(AHack.Traitors, v) then
    						if AHack.ESP.Vars["ShowTraitors"]:GetString() == "Above" then
    							DrawAbove("Traitor")
    						else
    							DrawBelow("Traitor")
    						end
    					end
    					
    					surface.SetTextColor(color)
    					if v:IsPlayer() then
    						if AHack.ESP.Vars["Name"]:GetString() == "Above" then
    							DrawAbove("Name: "..v:Nick())
    						elseif AHack.ESP.Vars["Name"]:GetString() == "Below" then
    							DrawBelow("Name: "..v:Nick())
    						end
    					else
    						if AHack.ESP.Vars["Name"]:GetString() == "Above" then
    							DrawAbove("Name: "..v:GetClass())
    						elseif AHack.ESP.Vars["Name"]:GetString() == "Below" then
    							DrawBelow("Name: "..v:GetClass())
    						end
    					end
    					
    					if AHack.ESP.Vars["Weapons"]:GetString() == "Above" and IsValid(v:GetActiveWeapon()) then
    						DrawAbove("Weapon: "..v:GetActiveWeapon():GetClass()) 
    					elseif AHack.ESP.Vars["Weapons"]:GetString() == "Below" and IsValid(v:GetActiveWeapon()) then
    						DrawBelow("Weapon: "..v:GetActiveWeapon():GetClass()) 
    					end		
    					
    					if AHack.ESP.Vars["Distance"]:GetString() == "Above" then 
    						DrawAbove("Distance: "..bottom:Distance(AHack.Ply:GetPos())) 
    					elseif AHack.ESP.Vars["Distance"]:GetString() == "Below" then
    						DrawBelow("Distance: "..bottom:Distance(AHack.Ply:GetPos())) 
    					end	
    					
    					if AHack.ESP.Vars["Health"]:GetString() == "Above" then 
    						DrawAbove("HP: "..v:Health()) 
    					elseif AHack.ESP.Vars["Health"]:GetString() == "Below" then
    						DrawBelow("HP: "..v:Health()) 
    					end
    					
    					if AHack.ESP.Vars["Radar"]:GetBool() then
    						surface.SetDrawColor(color)
    						local myPos = AHack.Ply:GetPos()
    						local theirPos = v:GetPos()
    						local myAngles = AHack.Ply:GetAngles()
    						
    						local theirX = (radarX + (radarWidth / 2)) + ((theirPos.x - myPos.x) / AHack.ESP.Vars["RadarScale"]:GetInt())
    						local theirY = (radarY + (radarHeight / 2)) + ((myPos.y - theirPos.y) / AHack.ESP.Vars["RadarScale"]:GetInt())
    						
    						//Now i have to rotate this
    						local myRotation = myAngles.y - 90
    						myRotation = math.rad(myRotation)
    						
    						theirX = theirX - (radarX + (radarWidth / 2))
    						theirY = theirY - (radarY + (radarHeight / 2))
    						local newX = theirX * math.cos(myRotation) - theirY * math.sin(myRotation)
    						local newY = theirX * math.sin(myRotation) + theirY * math.cos(myRotation)
    						newX = newX + (radarX + (radarWidth / 2))
    						newY = newY + (radarY + (radarHeight / 2))
    						
    						//And now that its rotated i can check if its within our radars bounds and draw it
    						if newX < (radarX + radarWidth) and newX > radarX and newY < (radarY + radarHeight) and newY > radarY then
    							AHack.DrawArrow(newX, newY, v:EyeAngles().y - myAngles.y)
    						end
    					end
    				elseif AHack.TTT and AHack.ESP.Vars["Bodies"]:GetBool() and v:GetClass() == "prop_ragdoll" then
    					surface.SetFont("ESPFont")
    					
    					//Im just going to position this info at the center of the player, if i get any complaints ill change it
    					local pos = v:LocalToWorld(v:OBBCenter())
    					local poscreen = pos:ToScreen()
    					local W, H = surface.GetTextSize("Sample") //It doesnt have to be perfect but this will help center the text more.
    					local y = poscreen.y - (H * 1.5)
    					
    					local function DrawText(text)
    						local W, H = surface.GetTextSize(text)
    						surface.SetTextPos(poscreen.x - W / 2, y) 
    						surface.DrawText(text)
    						
    						y = y + H
    					end
    					
    					surface.SetTextColor(AHack.Style.Vars["BodyText"].color)
    					DrawText("Credits: "..AHack.TTTCORPSE.GetCredits(v, 0))
    					DrawText("Name: "..AHack.TTTCORPSE.GetPlayerNick(v, "Unknown"))
    					DrawText("Found: "..tostring(AHack.TTTCORPSE.GetFound(v, false)))
    					
    					if AHack.ESP.Vars["Radar"] then
    						surface.SetDrawColor(AHack.Style.Vars["BodyText"].color)
    						local myPos = AHack.Ply:GetPos()
    						local theirPos = v:GetPos()
    						
    						local theirX = (radarX + (radarWidth / 2)) + ((theirPos.x - myPos.x) / AHack.ESP.Vars["RadarScale"]:GetInt())
    						local theirY = (radarY + (radarHeight / 2)) + ((myPos.y - theirPos.y) / AHack.ESP.Vars["RadarScale"]:GetInt())
    						
    						//Now i have to rotate this
    						local myRotation = AHack.Ply:GetAngles().y - 90
    						myRotation = math.rad(myRotation)
    						
    						theirX = theirX - (radarX + (radarWidth / 2))
    						theirY = theirY - (radarY + (radarHeight / 2))
    						local newX = theirX * math.cos(myRotation) - theirY * math.sin(myRotation)
    						local newY = theirX * math.sin(myRotation) + theirY * math.cos(myRotation)
    						newX = newX + (radarX + (radarWidth / 2))
    						newY = newY + (radarY + (radarHeight / 2))
    						
    						//And now that its rotated i can check if its within our radars bounds and draw it
    						if newX < (radarX + radarWidth) and newX > radarX and newY < (radarY + radarHeight) and newY > radarY then
    							AHack.DrawFilledCircle(newX, newY, 2, 4)
    						end
    					end
    				elseif AHack.Entities.Vars["Active"]:GetBool() and table.HasValue(AHack.Entities.List, v:GetClass()) then
    					surface.SetFont("ESPFont")
    					surface.SetTextColor(AHack.Style.Vars["ESPText"].color)
    					
    					local text = v:GetClass()
    					local W, H = surface.GetTextSize(text)
    					
    					local PosScreen = v:GetPos():ToScreen()
    					surface.SetTextPos(PosScreen.x - W / 2, PosScreen.y) 
    					surface.DrawText(text)
    				end
    			end
    			
    			surface.SetFont("default")
    			if v:IsPlayer() and v:IsSuperAdmin() then
    				if not table.HasValue(AHack.SuperAdmins, v) then
    					table.insert(AHack.SuperAdmins, v) 
    					AHack.Message("Super Admin "..v:Nick().." joined the game.")
    					if AHack.Misc.Vars["Sounds"]:GetBool() then
    						surface.PlaySound("vo/npc/Alyx/watchout02.wav")
    					end	
    				end
    			end			
    			if v:IsPlayer() and v:IsAdmin() and not v:IsSuperAdmin() then
    				if not table.HasValue(AHack.Admins, v) then
    					table.insert(AHack.Admins, v)
    					AHack.Message("Admin "..v:Nick().." joined the game.")
    					if AHack.Misc.Vars["Sounds"]:GetBool() then
    						surface.PlaySound("vo/npc/Alyx/watchout01.wav")
    					end	
    				end
    			end		
    			for k,v in SortedPairs(AHack.Admins, true) do
    				if not IsValid(v) then
    					table.remove(AHack.Admins, k)
    				end
    			end
    			for k,v in SortedPairs(AHack.SuperAdmins, true) do
    				if not IsValid(v) then
    					table.remove(AHack.SuperAdmins, k)
    				end
    			end
    				
    			if v:IsPlayer() and v:GetObserverTarget() == AHack.Ply then
    				if not table.HasValue(AHack.Spectators, v) then
    					table.insert(AHack.Spectators, v)
    					AHack.Message(v:Nick().." started spectating you.")
    					if AHack.Misc.Vars["Sounds"]:GetBool() then
    						surface.PlaySound("vo/npc/female01/ohno.wav")
    					end				
    				end
    			end
    			for k,v in SortedPairs(AHack.Spectators, true) do
    				if IsValid(v) then
    					if v:GetObserverTarget() != AHack.Ply then
    						table.remove(AHack.Spectators, k)
    					end
    				else
    					table.remove(AHack.Spectators, k)
    				end
    			end
    			
    			if AHack.TTT and AHack.Misc.Vars["TraitorFinder"]:GetBool() then
    				if GetRoundState() == 3 and v:IsWeapon() and type(v:GetOwner()) == "Player" and v.Buyer == nil and v.CanBuy and table.HasValue(v.CanBuy, 1) then
    					local owner = v:GetOwner()
    					if owner:GetRole() == 2 then
    						v.Buyer = owner
    					else
    						AHack.Message(owner:Nick().." bought a traitor weapon: "..v:GetClass())
    						v.Buyer = owner
    						table.insert(AHack.Traitors, owner)
    						if AHack.Misc.Vars["Sounds"]:GetBool() then
    							surface.PlaySound("weapons/shotgun/shotgun_cock.wav")
    						end	
    					end
    				elseif GetRoundState() != 3 then
    					table.Empty(AHack.Traitors)
    				end
    			end
    			
    			if AHack.Misc.Vars["Deaths"]:GetBool() and v:IsPlayer() then
    				if v:Alive() then
    					v.IsAlive = true
    				elseif v.IsAlive then
    					AHack.Message(3, v:Nick().." just died.")
    					v.IsAlive = false
    					if AHack.Misc.Vars["Sounds"]:GetBool() then
    						surface.PlaySound("npc/combine_soldier/vo/onedown.wav")
    					end	
    				end				
    			end
    		end
    		
    		surface.SetFont("default")
    		surface.SetTextColor(Color(255, 255, 255, 255))	
    		local AdminWidest = 0
    		local Admin******eight = 0
    		local AdminHeight = 20
    		if AHack.Misc.Vars["ShowAdmins"]:GetBool() then 
    			for k,v in pairs(AHack.SuperAdmins) do
    				local W, H = surface.GetTextSize(v:Nick().." - Super Admin")
    				if W > AdminWidest then
    					AdminWidest = W
    				end
    				Admin******eight = Admin******eight + H
    			end
    			for k,v in pairs(AHack.Admins) do
    				local W, H = surface.GetTextSize(v:Nick().." - Admin")
    				if W > AdminWidest then
    					AdminWidest = W
    				end
    				Admin******eight = Admin******eight + H
    			end
    			draw****undedBox(8, ScrW() - AdminWidest - 30, 10, AdminWidest + 20, Admin******eight + 20, Color(0, 0, 0, 150 ))
    			for k,v in pairs(AHack.SuperAdmins) do
    				local text = v:Nick().." - Super Admin"
    				local W, H = surface.GetTextSize(text)
    				surface.SetTextPos(ScrW() - 20 - AdminWidest, AdminHeight)
    				surface.DrawText(text)
    				AdminHeight = AdminHeight + H
    			end
    			for k,v in pairs(AHack.Admins) do
    				local text = v:Nick().." - Admin"
    				local W, H = surface.GetTextSize(text)
    				surface.SetTextPos(ScrW() - 20 - AdminWidest, AdminHeight)
    				surface.DrawText(text)
    				AdminHeight = AdminHeight + H
    			end
    		end
    		
    		local SpecWidest = 0
    		local Spec******eight = 0
    		local SpecHeight = Admin******eight + 50
    		if AHack.Misc.Vars["ShowSpectators"]:GetBool() then
    			for k,v in pairs(AHack.Spectators) do
    				local W, H = surface.GetTextSize(v:Nick())
    				if W > SpecWidest then
    					SpecWidest = W
    				end
    				Spec******eight = Spec******eight + H
    			end
    			draw****undedBox(8, ScrW() - SpecWidest - 30, 40 + Admin******eight, SpecWidest + 20, Spec******eight + 20, Color(0, 0, 0, 150 ))
    			for k,v in pairs(AHack.Spectators) do
    				local text = v:Nick()
    				local W, H = surface.GetTextSize(text)
    				surface.SetTextPos(ScrW() - 20 - SpecWidest, SpecHeight)
    				surface.DrawText(text)
    				SpecHeight = SpecHeight + H
    			end
    		end
    		
    		if AHack.Misc.Vars["Crosshair"]:GetBool() then
    			local size = AHack.Misc.Vars["CrosshairSize"]:GetInt()
    			local MiddleScreen = {x = surface.ScreenWidth() / 2, y = surface.ScreenHeight() / 2}
    			surface.SetDrawColor(AHack.Style.Vars["Crosshair"].color)
    			surface.DrawLine(MiddleScreen.x, MiddleScreen.y, MiddleScreen.x - size, MiddleScreen.y)
    			surface.DrawLine(MiddleScreen.x, MiddleScreen.y, MiddleScreen.x, MiddleScreen.y - size)
    			surface.DrawLine(MiddleScreen.x, MiddleScreen.y, MiddleScreen.x + size, MiddleScreen.y)
    			surface.DrawLine(MiddleScreen.x, MiddleScreen.y, MiddleScreen.x, MiddleScreen.y + size)
    		end
    	end
    end)
    
    hook.Add("Think", AHack.RandomName(math.random(10, 15)), function()
    	if AHack.Active:GetBool() then	
    		if AHack.Aimbot.Vars["Active"]:GetBool() and not (AHack.Aimbot.Vars["PanicMode"]:GetBool() and #AHack.Spectators > 0) then
    			if not AHack.Aimbot.Vars["AimOnKey"]:GetBool() or (AHack.Aimbot.Vars["AimOnKey"]:GetBool() and AHack.KeyPressed(AHack.Aimbot.Vars["AimOnKey_Key"]:GetString())) then
    				if AHack.ValidTarget() then
    					local BoneOrder = {}
    					if AHack.Aimbot.CurTarget.BoneToAimAt and AHack.Aimbot.Vars["RandomBones"]:GetBool() then
    						table.insert(BoneOrder, AHack.Aimbot.CurTarget.BoneToAimAt)
    						table.Add(BoneOrder, AHack.GetRandomBones())
    						table.Add(BoneOrder, AHack.Bones)
    					else
    						if AHack.Aimbot.Vars["RandomBones"]:GetBool() then
    							table.Add(BoneOrder, AHack.GetRandomBones())
    							table.Add(BoneOrder, AHack.Bones)
    						else
    							table.Add(BoneOrder, AHack.Bones)
    						end
    					end
    					for k = 1, #BoneOrder do 
    						local v = BoneOrder[k]
    						local bone = AHack.Aimbot.CurTarget:LookupBone(v)
    						if bone != nil then
    							local pos, ang = AHack.Aimbot.CurTarget:GetBonePosition(bone)
    							if v == "ValveBiped.Bip01_Head1" then
    								pos = pos + Vector(0, 0, 3) //Aiming a little higher for the head
    							end
    							local total, needed = 300, {300, 300}
    							
    							if AHack.Aimbot.Vars["Prediction"]:GetBool() then
    								local tarSpeed = AHack.Aimbot.CurTarget:GetVelocity() * 0.013
    								local plySpeed = AHack.Ply:GetVelocity() * 0.013
    								total, needed = AHack.AngleTo(pos - plySpeed + tarSpeed)
    							else
    								total, needed = AHack.AngleTo(pos)
    							end
    								
    							if AHack.SpotIsVisible(pos) and total < AHack.Aimbot.Vars["MaxAngle"]:GetInt() then
    								local myAngles = AHack.Ply:GetAngles()								
    								local NewAngles = Angle(myAngles.p + needed.p, myAngles.y + needed.y, 0)
    								
    								if AHack.Aimbot.Vars["AntiSnap"]:GetBool() then
    									local speed = AHack.Aimbot.Vars["AntiSnapSpeed"]:GetInt()
    									NewAngles = (Angle(math.Approach(myAngles.p, NewAngles.p, speed), math.Approach(myAngles.y, NewAngles.y, speed), 0))
    								end
    								
    								AHack.Ply:SetEyeAngles(NewAngles)
    								AHack.Aimbot.CurTarget.BoneToAimAt = BoneOrder[k]
    								break
    							end
    						end
    					end
    				else
    					AHack.Aimbot.CurTarget = AHack.GetTarget()
    				end
    			else
    				AHack.Aimbot.CurTarget = nil
    			end
    		end
    		
    		if AHack.Misc.Vars["NoRecoil"]:GetBool() then
    			if IsValid(AHack.Ply:GetActiveWeapon()) then
    				local weapon = AHack.Ply:GetActiveWeapon()
    				if weapon.Primary then
    					weapon.OldRecoil = weapon.OldRecoil or weapon.Primary.Recoil or weapon.Recoil
    					weapon.Primary.Recoil = 0
    					weapon.Recoil = 0
    				else
    					weapon.OldRecoil = weapon.OldRecoil or weapon.Recoil
    					weapon.Recoil = 0
    				end
    			end
    		elseif IsValid(AHack.Ply:GetActiveWeapon()) then
    			local weapon = AHack.Ply:GetActiveWeapon()
    			if weapon.Primary then
    				weapon.Primary.Recoil = weapon.OldRecoil or weapon.Primary.Recoil or weapon.Recoil
    				weapon.Recoil = weapon.OldRecoil or weapon.Recoil or weapon.Primary.Recoil
    			else
    				weapon.Recoil = weapon.OldRecoil or weapon.Recoil
    			end
    		end
    		
    		if AHack.DarkRP and AHack.Misc.Vars["BuyHealth"]:GetBool() then
    			if AHack.Ply:Alive() and AHack.Ply:Health() < AHack.Misc.Vars["BuyHealth_Minimum"]:GetInt() then
    				AHack.Ply:ConCommand("say /buyhealth")
    			end
    		end
    	end
    end)
    
    AHack.Misc.NextReload = CurTime()
    AHack.Misc.ShootNext = true
    hook.Add("CreateMove", AHack.RandomName(math.random(10, 15)), function(cmd)
    	if AHack.Active:GetBool() then		
    		local DontShoot = {"gmod_tool", "gmod_camera", "weapon_physgun", "weapon_physcannon"}
    		if AHack.Aimbot.Vars["AutoShoot"]:GetBool() and AHack.Aimbot.Vars["Active"]:GetBool() and AHack.Ply:GetEyeTrace().Entity == AHack.Aimbot.CurTarget and IsValid(AHack.Ply:GetActiveWeapon()) and not table.HasValue(DontShoot, AHack.Ply:GetActiveWeapon():GetClass()) then
    			cmd:SetButtons(cmd:GetButtons() + IN_ATTACK)
    		end
    		
    		if AHack.Misc.Vars["BunnyHop"]:GetBool() and cmd:KeyDown(IN_JUMP) and AHack.KeyPressed(AHack.Misc.Vars["BunnyHop_Key"]:GetString()) then
    			cmd:SetButtons(cmd:GetButtons() - IN_JUMP)
    		end
    		if AHack.Misc.Vars["BunnyHop"]:GetBool() and AHack.Ply:OnGround() and AHack.KeyPressed(AHack.Misc.Vars["BunnyHop_Key"]:GetString()) then
    			cmd:SetButtons(cmd:GetButtons() + IN_JUMP)
    		end
    		
    		local DontReload = {"gmod_tool", "gmod_camera", "weapon_physgun", "weapon_physcannon", "weapon_crowbar"}
    		if AHack.Misc.Vars["AutoReload"]:GetBool() and IsValid(AHack.Ply:GetActiveWeapon()) and AHack.Ply:GetActiveWeapon():Clip1() < 1 and not table.HasValue(DontReload, AHack.Ply:GetActiveWeapon():GetClass()) and AHack.Misc.NextReload < CurTime() then
    			cmd:SetButtons(cmd:GetButtons() + IN_RELOAD)
    		end
    		
    		if AHack.Misc.Vars["AutoPistol"]:GetBool() and IsValid(AHack.Ply:GetActiveWeapon()) then
    			local weapon = AHack.Ply:GetActiveWeapon()
    			if weapon.Primary and type(weapon.Primary.Automatic) == "boolean" and not weapon.Primary.Automatic then
    				if cmd:KeyDown(IN_ATTACK) then
    					if AHack.Misc.ShootNext then
    						AHack.Misc.ShootNext = false
    					else
    						cmd:SetButtons(cmd:GetButtons() - IN_ATTACK)
    						AHack.Misc.ShootNext = true
    					end
    				end					
    			elseif type(weapon.Automatic) == "boolean" and not weapon.Automatic then
    				if cmd:KeyDown(IN_ATTACK) then
    					if AHack.Misc.ShootNext then
    						AHack.Misc.ShootNext = false
    					else
    						cmd:SetButtons(cmd:GetButtons() - IN_ATTACK)
    						AHack.Misc.ShootNext = true
    					end
    				end
    			end
    		end
    	end
    end)
    
    //Used to see if the player is typing in chat or not. Binds arent called when you're in chat.
    AHack.InChat = false
    hook.Add("StartChat", AHack.RandomName(math.random(10, 15)), function()
    	AHack.InChat = true
    end)
    hook.Add("FinishChat", AHack.RandomName(math.random(10, 15)), function()
    	AHack.InChat = false
    end) 
    
    concommand.Add("AHack_Menu", function()
    	//Im only using DColumnSheet because everyone used DPropertySheet. I just want to be different
    	local main = vgui.Create("DFrame")
    	main:SetSize(500,496)
    	main:Center()
    	main:SetTitle("")
    	main:MakePopup()
    	main:ShowCloseButton(false)
    	main.Paint = function()
    		draw****undedBox( 0, 0, 0, main:GetWide(), main:GetTall(), Color( 0, 0, 0, 150 ) )
    	end
    	
    	local PanicButton = vgui.Create("DButton", main)
    	PanicButton:SetSize(50, 20)
    	PanicButton:SetPos(415, 3)
    	local function Enable()
    		PanicButton:SetText("Disable")
    		PanicButton.DoClick = function()
    			PanicButton:SetText("Enable")
    			PanicButton.DoClick = Enable
    			AHack.Ply:ConCommand("AHack_Active 0")
    		end
    		AHack.Ply:ConCommand("AHack_Active 1")
    	end
    	local function Disable()
    		PanicButton:SetText("Enable")
    		PanicButton.DoClick = function()
    			PanicButton:SetText("Disable")
    			PanicButton.DoClick = Disable
    			AHack.Ply:ConCommand("AHack_Active 1")
    		end
    		AHack.Ply:ConCommand("AHack_Active 0")
    	end
    	if AHack.Active:GetBool() then
    		PanicButton:SetText("Disable")
    		PanicButton.DoClick = Disable
    	else
    		PanicButton:SetText("Enable")
    		PanicButton.DoClick = Enable
    	end
    	
    	local CloseButton = vgui.Create("DButton", main)
    	CloseButton:SetSize(30, 20)
    	CloseButton:SetPos(465, 3)
    	CloseButton:SetText("X")
    	CloseButton.DoClick = function()
    		main:Close()
    	end
    	
    	local title = vgui.Create("DLabel", main)
    	title:SetColor(Color(255, 255, 255, 255))
    	title:SetFont("TitleFont")
    	title:SetText("AHack - "..AHack.Version)
    	title:SizeToContents()
    	title:SetPos(main:GetWide() / 2 - title:GetWide() / 2,3)	
    	
    	ColumnSheet = vgui.Create("DColumnSheet",main)
    	ColumnSheet:SetPos(5, 25)
    	ColumnSheet:SetSize(500 ,465)
    	
    	local y = 40
    	local function ToggleOption(name, parent, var)
    		local Options = vgui.Create("DComboBox", parent)
    		Options:SetSize(100, 20)
    		Options:SetPos(parent:GetWide() * 0.75 - Options:GetWide() / 2, y)
    		Options:AddChoice("Off", 0)
    		Options:AddChoice("On", 1)
    		Options.OnSelect = function(panel,index,value,data)
    			AHack.Ply:ConCommand(var.." "..data)
    		end
    		Options:SetText(Options:GetOptionText(GetConVar(var):GetInt() + 1))
    		
    		local text = vgui.Create("DLabel", parent)
    		text:SetColor(Color(0, 0, 0, 255))
    		text:SetFont("CatagoryText")
    		text:SetText(name)
    		text:SizeToContents()
    		text:SetPos(parent:GetWide() / 4 - text:GetWide() / 2, y + Options:GetTall() / 2 - text:GetTall() / 2)
    		
    		y = y + Options:GetTall() + 20
    	end
    	
    	local function SetKeyOption(name, parent, var)		
    		local Options = vgui.Create("DButton", parent)
    		Options:SetSize(100, 20)
    		Options:SetPos(parent:GetWide() * 0.75 - Options:GetWide() / 2, y)
    		Options:SetText(GetConVar(var):GetString())
    		Options.DoClick = function()
    			Options:SetText("Press a key...")
    			Options.Think = function()
    				for k = 107, 111 do
    					if input.IsMouseDown(k) then
    						AHack.Ply:ConCommand(var.." "..AHack.MouseKeys[k])
    						Options:SetText(AHack.MouseKeys[k])
    						Options.Think = nil
    					end
    				end
    				
    				for k = 0, 130 do
    					if input.IsKeyDown(k) then
    						AHack.Ply:ConCommand(var.." "..AHack.Keys[k])
    						Options:SetText(AHack.Keys[k])
    						Options.Think = nil
    					end
    				end 
    			end
    		end
    		
    		local text = vgui.Create("DLabel", parent)
    		text:SetColor(Color(0, 0, 0, 255))
    		text:SetFont("CatagoryText")
    		text:SetText(name)
    		text:SizeToContents()
    		text:SetPos(parent:GetWide() / 4 - text:GetWide() / 2, y + Options:GetTall() / 2 - text:GetTall() / 2)
    		
    		y = y + Options:GetTall() + 20
    	end
    	
    	local function SetNumberOption(name, parent, var, min, max, decimals)		
    		local Options = vgui.Create("DNumberWang", parent)
    		Options:SetSize(100, 20)
    		Options:SetPos(parent:GetWide() * 0.75 - Options:GetWide() / 2, y)
    		Options:SetMin(min)
    		Options:SetMax(max)
    		Options:SetDecimals(decimals)
    		Options:SetConVar(var)
    		
    		local text = vgui.Create("DLabel", parent)
    		text:SetColor(Color(0, 0, 0, 255))
    		text:SetFont("CatagoryText")
    		text:SetText(name)
    		text:SizeToContents()
    		text:SetPos(parent:GetWide() / 4 - text:GetWide() / 2, y + Options:GetTall() / 2 - text:GetTall() / 2)
    		
    		y = y + Options:GetTall() + 20
    	end
    	
    	local function MultiOption(name, parent, var, tab)		
    		local Options = vgui.Create("DComboBox", parent)
    		Options:SetSize(100, 20)
    		Options:SetPos(parent:GetWide() * 0.75 - Options:GetWide() / 2, y)
    		for i = 1, #tab do
    			Options:AddChoice(tab[i])
    		end
    		Options.OnSelect = function(panel,index,value,data)
    			AHack.Ply:ConCommand(var.." "..value)
    		end
    		Options:SetText(GetConVar(var):GetString())
    		
    		local text = vgui.Create("DLabel", parent)
    		text:SetColor(Color(0, 0, 0, 255))
    		text:SetFont("CatagoryText")
    		text:SetText(name)
    		text:SizeToContents()
    		text:SetPos(parent:GetWide() / 4 - text:GetWide() / 2, y + Options:GetTall() / 2 - text:GetTall() / 2)
    		
    		y = y + Options:GetTall() + 20
    	end
    	
    	//Starting the Aimbot panel
    	local Aimbot = vgui.Create("DPanel")
    	Aimbot:SetSize(379, 465)
    	Aimbot.Paint = function()
    		draw****undedBox( 0, 0, 0, Aimbot:GetWide(), Aimbot:GetTall(), Color( 240, 240, 240, 255 ) )
    	end
    	
    	local title = vgui.Create("DLabel", Aimbot)
    	title:SetColor(Color(0, 0, 0, 255))
    	title:SetFont("CatagoryHeader")
    	title:SetText("Aimbot")
    	title:SizeToContents()
    	title:SetPos(Aimbot:GetWide() / 2 - title:GetWide() / 2, 0)
    	
    	ToggleOption("Active", Aimbot, "AHack_Aimbot_Active")
    	ToggleOption("Random Bones", Aimbot, "AHack_Aimbot_RandomBones")
    	MultiOption("Preferance", Aimbot, "AHack_Aimbot_Preferance", {"Distance", "Angle"})	
    	ToggleOption("Attack Players", Aimbot, "AHack_Aimbot_AttackPlayers")
    	ToggleOption("Attack NPCs", Aimbot, "AHack_Aimbot_AttackNPCs")
    	ToggleOption("Prediction", Aimbot, "AHack_Aimbot_Prediction")
    	ToggleOption("Aim On Key", Aimbot, "AHack_Aimbot_AimOnKey")
    	SetKeyOption("Key", Aimbot, "AHack_Aimbot_AimOnKey_Key")
    	ToggleOption("Anti Snap", Aimbot, "AHack_Aimbot_AntiSnap")
    	SetNumberOption("Anti Snap Speed", Aimbot, "AHack_Aimbot_AntiSnapSpeed", 1, 5, 2)
    	SetNumberOption("Max Angle", Aimbot, "AHack_Aimbot_MaxAngle", 0, 270, 0)
    	ToggleOption("Auto Shoot", Aimbot, "AHack_Aimbot_AutoShoot")
    	ToggleOption("Panic Mode", Aimbot, "AHack_Aimbot_PanicMode")
    	ToggleOption("Ignore Team", Aimbot, "AHack_Aimbot_IgnoreTeam")
    	
    	if y > 465 then
    		Aimbot:SetTall(y)
    	end
    	
    	//This is the best way i can find to add a scrollbar to the menu...
    	AimbotList = vgui.Create( "DPanelList" )
    	AimbotList:SetSize(379, 465)
    	AimbotList:SetSpacing(0)
    	AimbotList:EnableHorizontal(false)
    	AimbotList:EnableVerticalScrollbar(true)
    	AimbotList:AddItem(Aimbot)
    	
    	ColumnSheet:AddSheet("Aimbot", AimbotList, "icon16/application_xp_terminal.png")
    	
    	//Starting the Friends panel
    	local FriendsPanel = vgui.Create("DPanel")
    	FriendsPanel:SetSize(379, 465)
    	FriendsPanel.Paint = function()
    		draw****undedBox( 0, 0, 0, FriendsPanel:GetWide(), FriendsPanel:GetTall(), Color( 240, 240, 240, 255 ) )
    	end
    	
    	local title = vgui.Create("DLabel", FriendsPanel)
    	title:SetColor(Color(0, 0, 0, 255))
    	title:SetFont("CatagoryHeader")
    	title:SetText("Friends")
    	title:SizeToContents()
    	title:SetPos(FriendsPanel:GetWide() / 2 - title:GetWide() / 2, 3)
    	
    	local Friends = {}
    	local Enemies = {}
    	
    	local players = player.GetAll()
    	for k = 1, #players do
    		local v = players[k]
    		if v != AHack.Ply then
    			if table.HasValue(AHack.Friends.List, v:SteamID()) then
    				table.insert(Friends, v)
    			else
    				table.insert(Enemies, v)
    			end
    		end
    	end
    	
    	y = 40
    	local EnemiesList = vgui.Create("DListView", FriendsPanel) //Need this up here so FriendsList can reference it.	
    	local FriendsList = vgui.Create("DListView", FriendsPanel)
    	FriendsList:SetSize(150, 200)
    	FriendsList:SetPos(FriendsPanel:GetWide() * 0.25 - FriendsList:GetWide() / 2, y)
    	FriendsList:SetMultiSelect(false)
    	FriendsList:AddColumn("Friends")
    	for k = 1, #Friends do
    		FriendsList:AddLine(Friends[k]:Nick())
    	end
    	FriendsList.DoDoubleClick = function(panel, index, line)
    		table.insert(Enemies, Friends[index])
    		table.remove(Friends, index)
    		
    		FriendsList:Clear()
    		EnemiesList:Clear()
    		for k = 1, #Friends do
    			FriendsList:AddLine(Friends[k]:Nick())
    		end
    		for k = 1, #Enemies do
    			EnemiesList:AddLine(Enemies[k]:Nick())
    		end
    		
    		AHack.Friends.List = {}
    		for k = 1, #Friends do
    			table.insert(AHack.Friends.List, Friends[k]:SteamID())
    		end
    		//AHack.SaveData()
    	end
    	
    	EnemiesList:SetSize(150, 200)
    	EnemiesList:SetPos(FriendsPanel:GetWide() * 0.75 - EnemiesList:GetWide() / 2, y)
    	EnemiesList:SetMultiSelect(false)
    	EnemiesList:AddColumn("Enemies")
    	for k = 1, #Enemies do
    		EnemiesList:AddLine(Enemies[k]:Nick())
    	end
    	EnemiesList.DoDoubleClick = function(panel, index, line)
    		table.insert(Friends, Enemies[index])
    		table.remove(Enemies, index)
    		
    		FriendsList:Clear()
    		EnemiesList:Clear()
    		for k = 1, #Friends do
    			FriendsList:AddLine(Friends[k]:Nick())
    		end
    		for k = 1, #Enemies do
    			EnemiesList:AddLine(Enemies[k]:Nick())
    		end
    		
    		AHack.Friends.List = {}
    		for k = 1, #Friends do
    			table.insert(AHack.Friends.List, Friends[k]:SteamID())
    		end
    		//AHack.SaveData()
    	end
    	
    	y = y + EnemiesList:GetTall() + 20
    	ToggleOption("Use", FriendsPanel, "AHack_Friends_Active")
    	ToggleOption("Reverse", FriendsPanel, "AHack_Friends_Reverse")
    	
    	if y > 465 then
    		FriendsPanel:SetTall(y)
    	end
    	
    	local FriendsPanelList = vgui.Create( "DPanelList" )
    	FriendsPanelList:SetSize(379, 465)
    	FriendsPanelList:SetSpacing(0)
    	FriendsPanelList:EnableHorizontal(false)
    	FriendsPanelList:EnableVerticalScrollbar(true)
    	FriendsPanelList:AddItem(FriendsPanel)
    	
    	ColumnSheet:AddSheet("Friends", FriendsPanelList, "icon16/group.png")
    
    	//Starting the ESP panel
    	local ESP = vgui.Create("DPanel")
    	ESP:SetSize(379, 465)
    	ESP.Paint = function()
    		draw****undedBox( 0, 0, 0, ESP:GetWide(), ESP:GetTall(), Color( 240, 240, 240, 255 ) )
    	end
    	
    	local title = vgui.Create("DLabel", ESP)
    	title:SetColor(Color(0, 0, 0, 255))
    	title:SetFont("CatagoryHeader")
    	title:SetText("ESP")
    	title:SizeToContents()
    	title:SetPos(ESP:GetWide() / 2 - title:GetWide() / 2, 3)
    	
    	y = 40
    	ToggleOption("Active", ESP, "AHack_ESP_Active")
    	ToggleOption("Player Info", ESP, "AHack_ESP_Players")
    	ToggleOption("NPC Info", ESP, "AHack_ESP_NPCs")
    	MultiOption("Name", ESP, "AHack_ESP_Name", {"Off", "Above", "Below"})	
    	MultiOption("Weapon", ESP, "AHack_ESP_Weapons", {"Off", "Above", "Below"})	
    	MultiOption("Health", ESP, "AHack_ESP_Health", {"Off", "Above", "Below"})	
    	MultiOption("Distance", ESP, "AHack_ESP_Distance", {"Off", "Above", "Below"})
    	MultiOption("Show Traitors", ESP, "AHack_ESP_ShowTraitors", {"Off", "Above", "Below"})
    	ToggleOption("Bounding Box", ESP, "AHack_ESP_Box")
    	ToggleOption("Body Info", ESP, "AHack_ESP_Bodies")
    	ToggleOption("2D Radar", ESP, "AHack_ESP_Radar")
    	SetNumberOption("Radar Scale", ESP, "AHack_ESP_RadarScale", 1, 100, 0)
    	SetNumberOption("Max Distance", ESP, "AHack_ESP_MaxDistance", 0, 8000, 0)
    	ToggleOption("Team Based", ESP, "AHack_ESP_TeamBased")
    	
    	if y > 465 then
    		ESP:SetTall(y)
    	end
    	
    	ESPList = vgui.Create( "DPanelList" )
    	ESPList:SetSize(379, 465)
    	ESPList:SetSpacing(0)
    	ESPList:EnableHorizontal(false)
    	ESPList:EnableVerticalScrollbar(true)
    	ESPList:AddItem(ESP)
    	
    	ColumnSheet:AddSheet("ESP", ESPList, "icon16/pencil.png")
    	
    	//Starting the Chams panel
    	local Chams = vgui.Create("DPanel")
    	Chams:SetSize(379, 465)
    	Chams.Paint = function()
    		draw****undedBox( 0, 0, 0, Chams:GetWide(), Chams:GetTall(), Color( 240, 240, 240, 255 ) )
    	end
    	
    	local title = vgui.Create("DLabel", Chams)
    	title:SetColor(Color(0, 0, 0, 255))
    	title:SetFont("CatagoryHeader")
    	title:SetText("Chams")
    	title:SizeToContents()
    	title:SetPos(Chams:GetWide() / 2 - title:GetWide() / 2, 3)
    	
    	y = 40
    	ToggleOption("Active", Chams, "AHack_Chams_Active")
    	ToggleOption("Draw Players", Chams, "AHack_Chams_Players")
    	ToggleOption("Draw NPCs", Chams, "AHack_Chams_NPCs")
    	ToggleOption("Draw Weapons", Chams, "AHack_Chams_Weapons")
    	ToggleOption("Draw Bodies", Chams, "AHack_Chams_Bodies")
    	ToggleOption("Team Based", Chams, "AHack_Chams_TeamBased")
    	SetNumberOption("Max Distance", Chams, "AHack_Chams_MaxDistance", 0, 8000, 0)
    	
    	if y > 465 then
    		Chams:SetTall(y)
    	end
    	
    	ChamsList = vgui.Create( "DPanelList" )
    	ChamsList:SetSize(379, 465)
    	ChamsList:SetSpacing(0)
    	ChamsList:EnableHorizontal(false)
    	ChamsList:EnableVerticalScrollbar(true)
    	ChamsList:AddItem(Chams)
    	
    	ColumnSheet:AddSheet("Chams", ChamsList, "icon16/eye.png")
    	
    	//Starting the Finder panel
    	local Finder = vgui.Create("DPanel")
    	Finder:SetSize(379, 465)
    	Finder.Paint = function()
    		draw****undedBox( 0, 0, 0, Finder:GetWide(), Finder:GetTall(), Color( 240, 240, 240, 255 ) )
    	end
    	
    	local title = vgui.Create("DLabel", Finder)
    	title:SetColor(Color(0, 0, 0, 255))
    	title:SetFont("CatagoryHeader")
    	title:SetText("Entity Finder")
    	title:SizeToContents()
    	title:SetPos(Finder:GetWide() / 2 - title:GetWide() / 2, 3)
    	
    	local ToShow = {}
    	local Others = {}
    	
    	local All = ents.GetAll()
    	for k = 1, #All do
    		local v = All[k]
    		if table.HasValue(AHack.Entities.List, v:GetClass()) then
    			if not table.HasValue(ToShow, v:GetClass()) then
    				table.insert(ToShow, v:GetClass())
    			end
    		elseif not table.HasValue(Others, v:GetClass()) then
    			table.insert(Others, v:GetClass())
    		end
    	end
    	
    	y = 40
    	local IgnoreList = vgui.Create("DListView", Finder) //Need this up here so ToShowList can reference it.	
    	local ToShowList = vgui.Create("DListView", Finder)
    	ToShowList:SetSize(150, 200)
    	ToShowList:SetPos(Finder:GetWide() * 0.25 - ToShowList:GetWide() / 2, y)
    	ToShowList:SetMultiSelect(false)
    	ToShowList:AddColumn("To Show")
    	for k = 1, #ToShow do
    		ToShowList:AddLine(ToShow[k])
    	end
    	ToShowList.DoDoubleClick = function(panel, index, line)
    		table.insert(Others, ToShow[index])
    		table.remove(ToShow, index)
    		
    		ToShowList:Clear()
    		IgnoreList:Clear()
    		for k = 1, #ToShow do
    			ToShowList:AddLine(ToShow[k])
    		end
    		for k = 1, #Others do
    			IgnoreList:AddLine(Others[k])
    		end
    		
    		AHack.Entities.List = {}
    		for k = 1, #ToShow do
    			table.insert(AHack.Entities.List, ToShow[k])
    		end
    		//AHack.SaveData()
    	end
    	
    	IgnoreList:SetSize(150, 200)
    	IgnoreList:SetPos(Finder:GetWide() * 0.75 - IgnoreList:GetWide() / 2, y)
    	IgnoreList:SetMultiSelect(false)
    	IgnoreList:AddColumn("Others")
    	for k = 1, #Others do
    		IgnoreList:AddLine(Others[k])
    	end
    	IgnoreList.DoDoubleClick = function(panel, index, line)
    		table.insert(ToShow, Others[index])
    		table.remove(Others, index)
    		
    		ToShowList:Clear()
    		IgnoreList:Clear()
    		for k = 1, #ToShow do
    			ToShowList:AddLine(ToShow[k])
    		end
    		for k = 1, #Others do
    			IgnoreList:AddLine(Others[k])
    		end
    		
    		AHack.Entities.List = {}
    		for k = 1, #ToShow do
    			table.insert(AHack.Entities.List, ToShow[k])
    		end
    		//AHack.SaveData()
    	end
    	
    	y = y + IgnoreList:GetTall() + 20
    	ToggleOption("Active", Finder, "AHack_Entities_Active")
    	
    	if y > 465 then
    		Finder:SetTall(y)
    	end
    	
    	local FinderList = vgui.Create( "DPanelList" )
    	FinderList:SetSize(379, 465)
    	FinderList:SetSpacing(0)
    	FinderList:EnableHorizontal(false)
    	FinderList:EnableVerticalScrollbar(true)
    	FinderList:AddItem(Finder)
    	
    	ColumnSheet:AddSheet("Finder", FinderList, "icon16/magnifier.png")
    	
    	//Starting the Misc panel
    	local Misc = vgui.Create("DPanel")
    	Misc:SetSize(379, 465)
    	Misc.Paint = function()
    		draw****undedBox( 0, 0, 0, Misc:GetWide(), Misc:GetTall(), Color( 240, 240, 240, 255 ) )
    	end
    	
    	local title = vgui.Create("DLabel", Misc)
    	title:SetColor(Color(0, 0, 0, 255))
    	title:SetFont("CatagoryHeader")
    	title:SetText("Misc")
    	title:SizeToContents()
    	title:SetPos(Misc:GetWide() / 2 - title:GetWide() / 2, 3)
    	
    	y = 40
    	ToggleOption("Show Admins", Misc, "AHack_Misc_ShowAdmins")
    	ToggleOption("Crosshair", Misc, "AHack_Misc_Cross")
    	SetNumberOption("Corsshair Size", Misc, "AHack_Misc_CrossSize", 0, 1000, 0)
    	ToggleOption("No Recoil", Misc, "AHack_Misc_NoRecoil")
    	ToggleOption("Spectators", Misc, "AHack_Misc_ShowSpectators")
    	ToggleOption("Auto Reload", Misc, "AHack_Misc_AutoReload")
    	ToggleOption("Bunny Hop", Misc, "AHack_Misc_BunnyHop")
    	SetKeyOption("Key", Misc, "AHack_Misc_BunnyHop_Key")
    	ToggleOption("Auto Pistol", Misc, "AHack_Misc_AutoPistol")
    	ToggleOption("Buy Health", Misc, "AHack_Misc_BuyHealth")
    	SetNumberOption("Minimum", Misc, "AHack_Misc_BuyHealth_Minimum", 0, 100, 0)
    	ToggleOption("Traitor Finder", Misc, "AHack_Misc_TraitorFinder")
    	ToggleOption("Show Deaths", Misc, "AHack_Misc_Deaths")
    	ToggleOption("Sounds", Misc, "AHack_Misc_Sounds")
    
    	if y > 465 then
    		Misc:SetTall(y)
    	end
    	
    	MiscList = vgui.Create( "DPanelList" )
    	MiscList:SetSize(379, 465)
    	MiscList:SetSpacing(0)
    	MiscList:EnableHorizontal(false)
    	MiscList:EnableVerticalScrollbar(true)
    	MiscList:AddItem(Misc)
    
    	ColumnSheet:AddSheet("Misc", MiscList, "icon16/package.png")
    	
    	local function ColorOption(name, parent, tab)
    		local Options = vgui.Create("DColorMixer", parent)
    		Options:SetSize(150, 100)
    		Options:SetPos(parent:GetWide() * 0.75 - Options:GetWide() / 2, y)
    		Options:SetColor(tab.color)//AHack.GetColorFromString(GetConVar(var):GetString()))
    		Options:SetWangs(false)
    		Options:SetPalette(false)
    		Options.ValueChanged = function(panel, color) 
    			AHack.Ply:ConCommand(tab.var:GetName().." ".."Color("..color.r..","..color.g..","..color.b..","..color.a..")")
    			tab.color = AHack.GetColorFromString(tab.var:GetString())
    		end
    		
    		local text = vgui.Create("DLabel", parent)
    		text:SetColor(Color(0, 0, 0, 255))
    		text:SetFont("CatagoryText")
    		text:SetText(name)
    		text:SizeToContents()
    		text:SetPos(parent:GetWide() / 4 - text:GetWide() / 2, y + Options:GetTall() / 2 - text:GetTall() / 2)
    		
    		y = y + Options:GetTall() + 10
    	end
    	//Starting the Style panel
    	local Style = vgui.Create("DPanel")
    	Style:SetSize(379, 465)
    	Style.Paint = function()
    		draw****undedBox( 0, 0, 0, Style:GetWide(), Style:GetTall(), Color( 240, 240, 240, 255 ) )
    	end
    	
    	local title = vgui.Create("DLabel", Style)
    	title:SetColor(Color(0, 0, 0, 255))
    	title:SetFont("CatagoryHeader")
    	title:SetText("Style")
    	title:SizeToContents()
    	title:SetPos(Style:GetWide() / 2 - title:GetWide() / 2, 3)
    	
    	y = 50
    	ColorOption("Bounding Box", Style, AHack.Style.Vars["BoundingBox"])
    	ColorOption("ESP Text", Style, AHack.Style.Vars["ESPText"])
    	ColorOption("Crosshair", Style, AHack.Style.Vars["Crosshair"])
    	ColorOption("TTT Body Text", Style, AHack.Style.Vars["BodyText"])
    	ColorOption("Chams", Style, AHack.Style.Vars["Chams"])
    	ColorOption("TTT Body Chams", Style, AHack.Style.Vars["BodyChams"])
    	
    	if y > 465 then
    		Style:SetTall(y)
    	end
    	
    	StyleList = vgui.Create( "DPanelList" )
    	StyleList:SetSize(379, 465)
    	StyleList:SetSpacing(0)
    	StyleList:EnableHorizontal(false)
    	StyleList:EnableVerticalScrollbar(true)
    	StyleList:AddItem(Style)
    	
    	ColumnSheet:AddSheet("Style", StyleList, "icon16/color_wheel.png")
    end)
    
    
    //Just some fonts
    surface.CreateFont("TitleFont", {font = "Arial", size = 20})
    surface.CreateFont("CatagoryHeader", {font = "CloseCaption_Normal", size = 34})
    surface.CreateFont("CatagoryText", {font = "CloseCaption_Normal", size = 28})
    surface.CreateFont("ESPFont", {font = "CloseCaption_Normal", weight = 1000, size = 15})
    
    --[[ 
    	DPropertySheet - Slightly edited so it looks good.
    --]]
    local PANEL = {}
    AccessorFunc( PANEL, "ActiveButton", "ActiveButton" )
    
    --[[---------------------------------------------------------
    Name: Init
    -----------------------------------------------------------]]
    function PANEL:Init()
    	self.Navigation = vgui.Create( "DScrollPanel", self )
    	self.Navigation:Dock( LEFT )
    	self.Navigation:SetWidth( 100 )
    	self.Navigation:DockMargin( 0, 0, 10, 0 )
    
    	self.Content = vgui.Create( "Panel", self )
    	self.Content:Dock( FILL )
    
    	self.Items = {}
    end
    
    function PANEL:UseButtonOnlyStyle()
    	self.ButtonOnly = true
    end
    
    --[[---------------------------------------------------------
    Name: AddSheet
    -----------------------------------------------------------]]
    function PANEL:AddSheet( label, panel, material )
    	if ( !IsValid( panel ) ) then return end
    
    	local Sheet = {}
    
    	if ( self.ButtonOnly ) then
    		Sheet.Button = vgui.Create( "DImageButton", self.Navigation )
    	else
    		Sheet.Button = vgui.Create( "DButton", self.Navigation )
    	end
    	Sheet.Button:SetImage( material )
    	Sheet.Button.Target = panel
    	Sheet.Button:Dock( TOP )
    	Sheet.Button:SetText( label )
    	Sheet.Button:DockMargin( 0, 0, 0, 5 )
    
    	Sheet.Button.DoClick = function ()
    		self:SetActiveButton( Sheet.Button )
    	end
    
    	Sheet.Panel = panel
    	Sheet.Panel:SetParent( self.Content )
    	Sheet.Panel:SetVisible( false )
    
    	if ( self.ButtonOnly ) then
    		Sheet.Button:SizeToContents()
    		Sheet.Button:SetColor( Color( 150, 150, 150, 255 ) )
    	end
    
    	table.insert( self.Items, Sheet )
    
    	if ( !IsValid( self.ActiveButton ) ) then
    		self:SetActiveButton( Sheet.Button )
    	end
    end
    
    --[[---------------------------------------------------------
    Name: SetActiveTab
    -----------------------------------------------------------]]
    function PANEL:SetActiveButton( active )
    	if ( self.ActiveButton == active ) then return end
    
    	if ( self.ActiveButton && self.ActiveButton.Target ) then	
    		self.ActiveButton.Target:SetVisible( false )
    		self.ActiveButton:SetSelected( false )
    		self.ActiveButton:SetColor( Color( 0, 0, 0, 255 ) )
    	end
    	self.ActiveButton = active
    	active.Target:SetVisible( true )
    	active:SetSelected( true )
    	active:SetColor( Color( 150, 150, 150, 255 ) )
    
    	self.Content:InvalidateLayout()
    end
    
    derma.DefineControl( "DColumnSheet", "", PANEL, "Panel" )
    
    AHack.Message("Hack Loaded")
    Last edited by Hunter; 12-17-2015 at 04:56 AM.

  2. The Following User Says Thank You to Razon91 For This Useful Post:

    Margen67 (11-07-2015)

  3. #2
    eth0s's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Posts
    188
    Reputation
    10
    Thanks
    1,887
    damn dude epic leak

  4. #3
    www12345's Avatar
    Join Date
    Aug 2014
    Gender
    male
    Posts
    39
    Reputation
    10
    Thanks
    4
    My Mood
    Amazed
    Looks more like ahack

  5. #4
    Psilly's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    672: '=' expected near '*' <- Getting this error :'(

  6. #5
    rockran's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Location
    austraya
    Posts
    70
    Reputation
    10
    Thanks
    15
    My Mood
    Breezy
    Quote Originally Posted by Psilly View Post
    672: '=' expected near '*' <- Getting this error :'(
    mpgh *'s out a lot of code, find it and replace it, should be easy.

  7. #6
    Koupers's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Posts
    16
    Reputation
    10
    Thanks
    32
    i fixed the code , awesome hack thanks you

Similar Threads

  1. Injector Source Code not working?
    By SuperMan9871 in forum Combat Arms Coding Help & Discussion
    Replies: 13
    Last Post: 04-07-2011, 08:00 PM
  2. [Help] Source code not working.
    By AskAndHelp in forum WarRock Hack Source Code
    Replies: 2
    Last Post: 04-02-2011, 06:23 AM
  3. [Help] No Recoil Source Code Not Working
    By zooSz in forum WarRock Hack Source Code
    Replies: 25
    Last Post: 03-31-2011, 08:14 PM
  4. Replies: 1
    Last Post: 09-06-2008, 09:13 AM
  5. [ Help ] VB6 Coding not working
    By ilovepie21 in forum Visual Basic Programming
    Replies: 17
    Last Post: 03-28-2008, 10:22 PM