daily pastebin goal
30%
SHARE
TWEET

Gmod leak dump part 10: ahack 2012

Caliber_ Dec 31st, 2017 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2.        _    _            _    
  3.      /\   | |  | |          | |  
  4.     /  \  | |__| | __ _  ___| | __
  5.    / /\ \ |  __  |/ _` |/ __| |/ /
  6.   / ____ \| |  | | (_| | (__|   <
  7.  /_/    \_\_|  |_|\__,_|\___|_|\_\
  8.  
  9.  Created by Atheon and originally released at MPGH.
  10.  Current Version: 1.5.0
  11.  
  12. Features:
  13. On/Off Switch - In the top right of the hack there is an on/off switch that will deactivate everything.
  14.  
  15. Aimbot -
  16. Active - Determines, overall, if the aimbot should be working.
  17. Random Bone - If enabled the aimbot will pick a random bone to attack instead of always going at the players head.
  18. Preference - Used to determine who the aimbot should target next. Can be set to Distance or Angle.
  19. Attack NPCs - Determines if the aimbot should target NPCs.
  20. Attack Player - Determines if the aimbot should target Players.
  21. Prediction - Velocity prediction, to increase the aimbots accuracy.
  22. Aim On Key - If this is on the aimbot will only target when your selected key is pressed.
  23. Key - Determines the key for the previous option.
  24. Anti Snap - Stops the aimbot from snapping to the target. But will decrease accuracy.
  25. A-Snap Speed - The speed of the anti-snap. Value between 1 and 5.
  26. Max Angle - The maximum angle the target can be away from you. Value between 0-270.
  27. Auto Shoot - If this is on and the aimbot is locked on it will automatically shoot.
  28. Panic Mode - If this is on the aimbot wont function while you are being spectated.
  29. Ignore Team - If this is on the aimbot will not target players on your team, works with TTT if the traitor detector is enabled.
  30.  
  31. ESP -
  32. Active - Determines, overall, if the ESP is working.
  33. Player Info - Determines if the ESP should show player information.
  34. NPC Info - Determines if the ESP should show NPC information.
  35. Names - Determines if the targets name should be shown. (on NPCs it will be the class name, ex: npc_monk)
  36. Weapons - Determines if the targets weapon should be displayed
  37. Distance - Determines if distance between you and the target should be displayed.
  38. Health - Determines if the targets health should be displayed.
  39. Bounding Box - Determines if a bounding box should be drawn around the target.
  40. TTT Feature - Show Traitors - Determines if the ESP should display if the target is a traitor. (must have traitor finder active, see Misc)
  41. TTT Feature - Bodies - Will display body information on TTT. (Credits on body, Name of player, Found or not found)
  42. 2D Radar - Enables a 2D radar on screen. Players and NPCs are shown as arrows, bodies (TTT) are shown as circles.
  43. Radar Scale - The distance the radar reaches. Value between 1 and 100
  44. Max Distance - Determines the maximum distance the ESP will work to. (set to 0 for unlimited distance)
  45. Team Based - Make the color of the ESP based on the targets team. Works with TTT.
  46.  
  47. Chams -
  48. Active - Determines, overall, if the Chams are working.
  49. Draw Players - Determines if the Chams should draw players.
  50. Draw NPCs - Determines if the Chams should draw NPCs.
  51. Draw Weapons - Determines if the Chams should draw the targets weapon.
  52. TTT Feature - Bodies - Adds TTT bodies to the Chams
  53. Team Based - Makes the color of the chams based on the targets team. Works with TTT.
  54. Max Distance - Determines the maximum distance the Chams will work to. (set to 0 for unlimited distance)
  55.  
  56. Misc -
  57. Show Admins - Displays all current admins in the top right corner of your screen.
  58. Crosshair - Will draw a crosshair on your screen.
  59. Crosshair Size - The size of the crosshair. Value between 0 and 1000.
  60. No Recoil - Will remove all weapon recoil. (doesn't work in singleplayer)
  61. Spectators - Displays all your current spectators in the top right corner of your screen, under the admins.
  62. Auto Reload - Will automatically reload your weapon when your magazine is empty.
  63. Bunny Hop - If this is on you will bunny hop while pressing the bunny hop key.
  64. Key - Determines the key for the previous option.
  65. Auto Pistol - Fires semi-automatic weapons as fast as possible. (doesn't work on default HL2 weapons)
  66. DarkRP Feature - Buy Health - Will automatically use /buyhealth when your health falls below the minimum value set.
  67. DarkRP Feature - Minimum - Minimum health before buying health. Value between 0 and 100.
  68. TTT Feature - Traitor Finder - Will display when a traitor buys a traitor weapon. (see also the ESP option for displaying traitors)
  69. Show Deaths - Will notify you via chat when a player dies.
  70. Sounds - Enables sound cues along with notifications.
  71.  
  72. Style -
  73. Bounding Box - Determines the color the bounding box should draw in.
  74. ESP Text - Determines the color the ESP text should draw in.
  75. Crosshair - Determines the color the Crosshair should draw in.
  76. TTT Feature - Body Text - Determines the color body information will be shown in.
  77. Chams - The color of the chams. (will be overwritten if Cham option Team Based is on)
  78. TTT Feature - Body Chams - The color TTT bodies should be on the chams.
  79. --]]
  80.  
  81. //I hear this makes the hack load faster, i didn't actually check the O times but whatever.
  82. local hook = hook
  83. local derma = derma
  84. local surface = surface
  85. local vgui = vgui
  86. local input = input
  87. local util = util
  88. local cam = cam
  89. local render = render
  90. local math = math
  91. local draw = draw
  92. local team = team
  93.  
  94. local AHack = {}
  95. AHack.Active = CreateClientConVar("AHack_Active", 1, true, false)
  96. AHack.Version = "1.5.0"
  97. AHack.Ply = LocalPlayer()
  98. AHack.TTT = (GAMEMODE and GAMEMODE.Name and string.find(GAMEMODE.Name, "Terror") and true) or false
  99. if AHack.TTT then AHack.TTTCORPSE = CORPSE end
  100. AHack.DarkRP = (GAMEMODE and GAMEMODE.Name and string.find(GAMEMODE.Name, "DarkRP") and true) or false
  101.  
  102. //Converts a string of a color (ex. "Color(255, 255, 255, 255)") into an actual color, and returns the color.
  103. AHack.GetColorFromString = function(words)
  104.     //I probably shouldve just used string.explode...well.......
  105.     if type(words) != "string" then return Color(255, 255, 255, 255) end
  106.     words = "return "..words
  107.     local func = CompileString(words, "GettingColors", true)
  108.     local good, color = pcall(func)
  109.     if good and type(color) == "table" and color.r and color.g and color.b and color.a then
  110.         return color
  111.     else
  112.         return Color(255, 255, 255, 255)
  113.     end
  114. end
  115.  
  116. 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"}
  117. AHack.RandomName = function(amount)
  118.     local toReturn = ""
  119.     local amount = amount or 10
  120.     for i = 1, amount do
  121.         if math.random(0, 1) == 0 then
  122.             toReturn = toReturn..string.lower(table.Random(AHack.Chars))
  123.         else
  124.             toReturn = toReturn..table.Random(AHack.Chars)
  125.         end
  126.     end
  127.     return toReturn
  128. end
  129.  
  130. AHack.Message = function(...)
  131.     chat.AddText(Color(50, 255, 100), "[AHack] ", ...)
  132. end
  133.  
  134. AHack.Aimbot = {}
  135. AHack.Aimbot.CurTarget = nil
  136. AHack.Aimbot.Vars = {}
  137. AHack.Aimbot.Vars["Active"] = CreateClientConVar("AHack_Aimbot_Active", 0, true, false)
  138. AHack.Aimbot.Vars["RandomBones"] = CreateClientConVar("AHack_Aimbot_RandomBones", 0, true, false)
  139. AHack.Aimbot.Vars["AttackNPCs"] = CreateClientConVar("AHack_Aimbot_AttackNPCs", 0, true, false)
  140. AHack.Aimbot.Vars["AttackPlayers"] = CreateClientConVar("AHack_Aimbot_AttackPlayers", 0, true, false)
  141. AHack.Aimbot.Vars["Prediction"] = CreateClientConVar("AHack_Aimbot_Prediction", 0, true, false)
  142. AHack.Aimbot.Vars["AimOnKey"] = CreateClientConVar("AHack_Aimbot_AimOnKey", 0, true, false)
  143. AHack.Aimbot.Vars["AimOnKey_Key"] = CreateClientConVar("AHack_Aimbot_AimOnKey_Key", "MOUSE_LEFT", true, false)
  144. AHack.Aimbot.Vars["MaxAngle"] = CreateClientConVar("AHack_Aimbot_MaxAngle", 180, true, false)
  145. AHack.Aimbot.Vars["Preferance"] = CreateClientConVar("AHack_Aimbot_Preferance", "Distance", true, false)
  146. AHack.Aimbot.Vars["AntiSnap"] = CreateClientConVar("AHack_Aimbot_AntiSnap", 0, true, false)
  147. AHack.Aimbot.Vars["AntiSnapSpeed"] = CreateClientConVar("AHack_Aimbot_AntiSnapSpeed", 4, true, false)
  148. AHack.Aimbot.Vars["AutoShoot"] = CreateClientConVar("AHack_Aimbot_AutoShoot", 0, true, false)
  149. AHack.Aimbot.Vars["PanicMode"] = CreateClientConVar("AHack_Aimbot_PanicMode", 0, true, false)
  150. AHack.Aimbot.Vars["IgnoreTeam"] = CreateClientConVar("AHack_Aimbot_IgnoreTeam", 0, true, false)
  151.  
  152. AHack.Friends = {}
  153. AHack.Friends.List = {} //The steamIDs of everyone on your friends list
  154. AHack.Friends.Vars = {}
  155. AHack.Friends.Vars["Active"] = CreateClientConVar("AHack_Friends_Active", 0, true, false)
  156. AHack.Friends.Vars["Reverse"] = CreateClientConVar("AHack_Friends_Reverse", 0, true, false)
  157.  
  158. AHack.ESP = {}
  159. AHack.ESP.Vars = {}
  160. AHack.ESP.Vars["Active"] = CreateClientConVar("AHack_ESP_Active", 0, true, false)
  161. AHack.ESP.Vars["Players"] = CreateClientConVar("AHack_ESP_Players", 0, true, false)
  162. AHack.ESP.Vars["NPCs"] = CreateClientConVar("AHack_ESP_NPCs", 0, true, false)
  163. AHack.ESP.Vars["Name"] = CreateClientConVar("AHack_ESP_Name", "Off", true, false)
  164. AHack.ESP.Vars["Weapons"] = CreateClientConVar("AHack_ESP_Weapons", "Off", true, false)
  165. AHack.ESP.Vars["Distance"] = CreateClientConVar("AHack_ESP_Distance", "Off", true, false)
  166. AHack.ESP.Vars["Health"] = CreateClientConVar("AHack_ESP_Health", "Off", true, false)
  167. AHack.ESP.Vars["MaxDistance"] = CreateClientConVar("AHack_ESP_MaxDistance", 0, true, false)
  168. AHack.ESP.Vars["Box"] = CreateClientConVar("AHack_ESP_Box", 0, true, false)
  169. AHack.ESP.Vars["ShowTraitors"] = CreateClientConVar("AHack_ESP_ShowTraitors", "Off", true, false)
  170. AHack.ESP.Vars["Bodies"] = CreateClientConVar("AHack_ESP_Bodies", 0, true, false)
  171. AHack.ESP.Vars["Radar"] = CreateClientConVar("AHack_ESP_Radar", 0, true, false)
  172. AHack.ESP.Vars["RadarScale"] = CreateClientConVar("AHack_ESP_RadarScale", 20, true, false)
  173. AHack.ESP.Vars["TeamBased"] = CreateClientConVar("AHack_ESP_TeamBased", 0, true, false)
  174.  
  175. AHack.Chams = {}
  176. AHack.Chams.Mat = CreateMaterial(AHack.RandomName(math.random(10,15)), "VertexLitGeneric", { ["$basetexture"] = "models/debug/debugwhite", ["$model"] = 1, ["$ignorez"] = 1 })
  177. AHack.Chams.Vars = {}
  178. AHack.Chams.Vars["Active"] = CreateClientConVar("AHack_Chams_Active", 0, true, false)
  179. AHack.Chams.Vars["Players"] = CreateClientConVar("AHack_Chams_Players", 0, true, false)
  180. AHack.Chams.Vars["NPCs"] = CreateClientConVar("AHack_Chams_NPCs", 0, true, false)
  181. AHack.Chams.Vars["Weapons"] = CreateClientConVar("AHack_Chams_Weapons", 0, true, false)
  182. AHack.Chams.Vars["MaxDistance"] = CreateClientConVar("AHack_Chams_MaxDistance", 0, true, false)
  183. AHack.Chams.Vars["Bodies"] = CreateClientConVar("AHack_Chams_Bodies", 0, true, false)
  184. AHack.Chams.Vars["TeamBased"] = CreateClientConVar("AHack_Chams_TeamBased", 0, true, false)
  185.  
  186. AHack.Entities = {}
  187. AHack.Entities.List = {} //The class namse of all the entities
  188. AHack.Entities.Vars = {}
  189. AHack.Entities.Vars["Active"] = CreateClientConVar("AHack_Entities_Active", 0, true, false)
  190.  
  191. AHack.Misc = {}
  192. AHack.Misc.Vars = {}
  193. AHack.Misc.Vars["ShowAdmins"] = CreateClientConVar("AHack_Misc_ShowAdmins", 0, true, false)
  194. AHack.Misc.Vars["Crosshair"] = CreateClientConVar("AHack_Misc_Cross", 0, true, false)
  195. AHack.Misc.Vars["CrosshairSize"] = CreateClientConVar("AHack_Misc_CrossSize", 50, true, false)
  196. AHack.Misc.Vars["NoRecoil"] = CreateClientConVar("AHack_Misc_NoRecoil", 0, true, false)
  197. AHack.Misc.Vars["ShowSpectators"] = CreateClientConVar("AHack_Misc_ShowSpectators", 0, true, false)
  198. AHack.Misc.Vars["BunnyHop"] = CreateClientConVar("AHack_Misc_BunnyHop", 0, true, false)
  199. AHack.Misc.Vars["BunnyHop_Key"] = CreateClientConVar("AHack_Misc_BunnyHop_Key", "KEY_SPACE", true, false)
  200. AHack.Misc.Vars["AutoReload"] = CreateClientConVar("AHack_Misc_AutoReload", 0, true, false)
  201. AHack.Misc.Vars["AutoPistol"] = CreateClientConVar("AHack_Misc_AutoPistol", 0, true, false)
  202. AHack.Misc.Vars["BuyHealth"] = CreateClientConVar("AHack_Misc_BuyHealth", 0, true, false)
  203. AHack.Misc.Vars["BuyHealth_Minimum"] = CreateClientConVar("AHack_Misc_BuyHealth_Minimum", 80, true, false)
  204. AHack.Misc.Vars["TraitorFinder"] = CreateClientConVar("AHack_Misc_TraitorFinder", 0, true, false)
  205. AHack.Misc.Vars["Deaths"] = CreateClientConVar("AHack_Misc_Deaths", 0, true, false)
  206. AHack.Misc.Vars["Sounds"] = CreateClientConVar("AHack_Misc_Sounds", 0, true, false)
  207.  
  208. AHack.Style = {}
  209. AHack.Style.Vars = {}
  210. AHack.Style.Vars["BoundingBox"] = {}
  211. AHack.Style.Vars["BoundingBox"].var = CreateClientConVar("AHack_Style_BoundingBox", "Color(255, 0, 0, 255)", true, false)
  212. AHack.Style.Vars["BoundingBox"].color = AHack.GetColorFromString(AHack.Style.Vars["BoundingBox"].var:GetString())
  213. AHack.Style.Vars["ESPText"] = {}
  214. AHack.Style.Vars["ESPText"].var = CreateClientConVar("AHack_Style_ESPText", "Color(255, 255, 255, 255)", true, false)
  215. AHack.Style.Vars["ESPText"].color = AHack.GetColorFromString(AHack.Style.Vars["ESPText"].var:GetString())
  216. AHack.Style.Vars["Crosshair"] = {}
  217. AHack.Style.Vars["Crosshair"].var = CreateClientConVar("AHack_Style_Cross", "Color(255, 255, 255, 255)", true, false)
  218. AHack.Style.Vars["Crosshair"].color = AHack.GetColorFromString(AHack.Style.Vars["Crosshair"].var:GetString())
  219. AHack.Style.Vars["BodyText"] = {}
  220. AHack.Style.Vars["BodyText"].var = CreateClientConVar("AHack_Style_BodyText", "Color(255, 255, 255, 255)", true, false)
  221. AHack.Style.Vars["BodyText"].color = AHack.GetColorFromString(AHack.Style.Vars["BodyText"].var:GetString())
  222. AHack.Style.Vars["Chams"] = {}
  223. AHack.Style.Vars["Chams"].var = CreateClientConVar("AHack_Style_Chams", "Color(0, 255, 0, 255)", true, false)
  224. AHack.Style.Vars["Chams"].color = AHack.GetColorFromString(AHack.Style.Vars["Chams"].var:GetString())
  225. AHack.Style.Vars["BodyChams"] = {}
  226. AHack.Style.Vars["BodyChams"].var = CreateClientConVar("AHack_Style_BodyChams", "Color(0, 255, 0, 255)", true, false)
  227. AHack.Style.Vars["BodyChams"].color = AHack.GetColorFromString(AHack.Style.Vars["BodyChams"].var:GetString())
  228.  
  229. //This loads our friends list and custom entities list.
  230. /*AHack.SavedData = CreateClientConVar("AHack_SaveData", AHack.RandomName(math.random(10, 15)), true, false)
  231. if file.Exists(AHack.SavedData:GetString()..".txt", "DATA") then
  232.     local info = string.Explode("\n", file.Read(AHack.SavedData:GetString()..".txt", "DATA"))
  233.     if type(info) == "table" and info[1] and info[2] then
  234.         AHack.Friends.List = util.JSONToTable(info[1])
  235.         AHack.Entities.List = util.JSONToTable(info[2])
  236.     end
  237. end
  238.  
  239. AHack.SaveData = function()
  240.     file.Write(AHack.SavedData:GetString()..".txt", util.TableToJSON(AHack.Friends.List))
  241.     file.Append(AHack.SavedData:GetString()..".txt", "\n")
  242.     file.Append(AHack.SavedData:GetString()..".txt", util.TableToJSON(AHack.Entities.List))
  243. end*/
  244.  
  245. //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.
  246. AHack.Bones = {
  247. "ValveBiped.Bip01_Head1",
  248. "ValveBiped.Bip01_Neck1",
  249. "ValveBiped.Bip01_Spine4",
  250. "ValveBiped.Bip01_Spine2",
  251. "ValveBiped.Bip01_Spine1",
  252. "ValveBiped.Bip01_Spine",
  253. "ValveBiped.Bip01_R_UpperArm",
  254. "ValveBiped.Bip01_R_Forearm",
  255. "ValveBiped.Bip01_R_Hand",
  256. "ValveBiped.Bip01_L_UpperArm",
  257. "ValveBiped.Bip01_L_Forearm",
  258. "ValveBiped.Bip01_L_Hand",
  259. "ValveBiped.Bip01_R_Thigh",
  260. "ValveBiped.Bip01_R_Calf",
  261. "ValveBiped.Bip01_R_Foot",
  262. "ValveBiped.Bip01_R_Toe0",
  263. "ValveBiped.Bip01_L_Thigh",
  264. "ValveBiped.Bip01_L_Calf",
  265. "ValveBiped.Bip01_L_Foot",
  266. "ValveBiped.Bip01_L_Toe0"
  267. }
  268.  
  269. //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.
  270. //If you edit this be sure to edit the function below it.
  271. AHack.RandomBones = {
  272. "ValveBiped.Bip01_Head1",
  273. "ValveBiped.Bip01_Neck1",
  274. "ValveBiped.Bip01_Spine4",
  275. "ValveBiped.Bip01_Spine2",
  276. "ValveBiped.Bip01_R_UpperArm",
  277. "ValveBiped.Bip01_L_UpperArm"
  278. }
  279. AHack.GetRandomBones = function()
  280.     local temp = {}
  281.     local function GetBones() //Ahh recursion, i love you.
  282.         if #AHack.RandomBones > 0 then
  283.             local random = math.random(1, #AHack.RandomBones)
  284.             table.insert(temp, AHack.RandomBones[random])
  285.             table.remove(AHack.RandomBones, random)
  286.             GetBones()
  287.         else
  288.             table.insert(AHack.RandomBones, "ValveBiped.Bip01_Head1")
  289.             table.insert(AHack.RandomBones, "ValveBiped.Bip01_Neck1")
  290.             table.insert(AHack.RandomBones, "ValveBiped.Bip01_Spine4")
  291.             table.insert(AHack.RandomBones, "ValveBiped.Bip01_Spine2")
  292.             table.insert(AHack.RandomBones, "ValveBiped.Bip01_R_UpperArm")
  293.             table.insert(AHack.RandomBones, "ValveBiped.Bip01_L_UpperArm")
  294.         end
  295.     end
  296.     GetBones()
  297.     return temp
  298. end
  299.  
  300. //A list of all keyboard keys, for binding
  301. AHack.Keys = {
  302. [0] = "KEY_NONE",
  303. [1] = "KEY_0",
  304. [2] = "KEY_1",
  305. [3] = "KEY_2",
  306. [4] = "KEY_3",
  307. [5] = "KEY_4",
  308. [6] = "KEY_5",
  309. [7] = "KEY_6",
  310. [8] = "KEY_7",
  311. [9] = "KEY_8",
  312. [10] = "KEY_9",
  313. [11] = "KEY_A",
  314. [12] = "KEY_B",
  315. [13] = "KEY_C",
  316. [14] = "KEY_D",
  317. [15] = "KEY_E",
  318. [16] = "KEY_F",
  319. [17] = "KEY_G",
  320. [18] = "KEY_H",
  321. [19] = "KEY_I",
  322. [20] = "KEY_J",
  323. [21] = "KEY_K",
  324. [22] = "KEY_L",
  325. [23] = "KEY_M",
  326. [24] = "KEY_N",
  327. [25] = "KEY_O",
  328. [26] = "KEY_P",
  329. [27] = "KEY_Q",
  330. [28] = "KEY_R",
  331. [29] = "KEY_S",
  332. [30] = "KEY_T",
  333. [31] = "KEY_U",
  334. [32] = "KEY_V",
  335. [33] = "KEY_W",
  336. [34] = "KEY_X",
  337. [35] = "KEY_Y",
  338. [36] = "KEY_Z",
  339. [37] = "KEY_PAD_0",
  340. [38] = "KEY_PAD_1",
  341. [39] = "KEY_PAD_2",
  342. [40] = "KEY_PAD_3",
  343. [41] = "KEY_PAD_4",
  344. [42] = "KEY_PAD_5",
  345. [43] = "KEY_PAD_6",
  346. [44] = "KEY_PAD_7",
  347. [45] = "KEY_PAD_8",
  348. [46] = "KEY_PAD_9",
  349. [47] = "KEY_PAD_DIVIDE",
  350. [48] = "KEY_PAD_MULTIPLY",
  351. [49] = "KEY_PAD_MINUS",
  352. [50] = "KEY_PAD_PLUS",
  353. [51] = "KEY_PAD_ENTER",
  354. [52] = "KEY_PAD_DECIMAL",
  355. [53] = "KEY_LBRACKET",
  356. [54] = "KEY_RBRACKET",
  357. [55] = "KEY_SEMICOLON",
  358. [56] = "KEY_APOSTROPHE",
  359. [57] = "KEY_BACKQUOTE",
  360. [58] = "KEY_COMMA",
  361. [59] = "KEY_PERIOD",
  362. [60] = "KEY_SLASH",
  363. [61] = "KEY_BACKSLASH",
  364. [62] = "KEY_MINUS",
  365. [63] = "KEY_EQUAL",
  366. [64] = "KEY_ENTER",
  367. [65] = "KEY_SPACE",
  368. [66] = "KEY_BACKSPACE",
  369. [67] = "KEY_TAB",
  370. [68] = "KEY_CAPSLOCK",
  371. [69] = "KEY_NUMLOCK",
  372. [70] = "KEY_ESCAPE",
  373. [71] = "KEY_SCROLLLOCK",
  374. [72] = "KEY_INSERT",
  375. [73] = "KEY_DELETE",
  376. [74] = "KEY_HOME",
  377. [75] = "KEY_END",
  378. [76] = "KEY_PAGEUP",
  379. [77] = "KEY_PAGEDOWN",
  380. [78] = "KEY_BREAK",
  381. [79] = "KEY_LSHIFT",
  382. [80] = "KEY_RSHIFT",
  383. [81] = "KEY_LALT",
  384. [82] = "KEY_RALT",
  385. [83] = "KEY_LCONTROL",
  386. [84] = "KEY_RCONTROL",
  387. [85] = "KEY_LWIN",
  388. [86] = "KEY_RWIN",
  389. [87] = "KEY_APP",
  390. [88] = "KEY_UP",
  391. [89] = "KEY_LEFT",
  392. [90] = "KEY_DOWN",
  393. [91] = "KEY_RIGHT",
  394. [92] = "KEY_F1",
  395. [93] = "KEY_F2",
  396. [94] = "KEY_F3",
  397. [95] = "KEY_F4",
  398. [96] = "KEY_F5",
  399. [97] = "KEY_F6",
  400. [98] = "KEY_F7",
  401. [99] = "KEY_F8",
  402. [100] = "KEY_F9",
  403. [101] = "KEY_F10",
  404. [102] = "KEY_F11",
  405. [103] = "KEY_F12",
  406. //[104] = "KEY_CAPSLOCKTOGGLE", //THESE
  407. //[105] = "KEY_NUMLOCKTOGGLE", //MOFOS
  408. //[106] = "KEY_SCROLLLOCKTOGGLE", //SHOULD DIE
  409. [107] = "KEY_XBUTTON_UP",
  410. [108] = "KEY_XBUTTON_DOWN",
  411. [109] = "KEY_XBUTTON_LEFT",
  412. [110] = "KEY_XBUTTON_RIGHT",
  413. [111] = "KEY_XBUTTON_START",
  414. [112] = "KEY_XBUTTON_BACK",
  415. [113] = "KEY_XBUTTON_STICK1",
  416. [114] = "KEY_XBUTTON_STICK2",
  417. [115] = "KEY_XBUTTON_A",
  418. [116] = "KEY_XBUTTON_B",
  419. [117] = "KEY_XBUTTON_X",
  420. [118] = "KEY_XBUTTON_Y",
  421. [119] = "KEY_XBUTTON_BLACK",
  422. [120] = "KEY_XBUTTON_WHITE",
  423. [121] = "KEY_XBUTTON_LTRIGGER",
  424. [122] = "KEY_XBUTTON_RTRIGGER",
  425. [123] = "KEY_XSTICK1_UP",
  426. [124] = "KEY_XSTICK1_DOWN",
  427. [125] = "KEY_XSTICK1_LEFT",
  428. [126] = "KEY_XSTICK1_RIGHT",
  429. [127] = "KEY_XSTICK2_UP",
  430. [128] = "KEY_XSTICK2_DOWN",
  431. [129] = "KEY_XSTICK2_LEFT",
  432. [130] = "KEY_XSTICK2_RIGHT"
  433. }
  434. //A list of all mouse keys, for binding
  435. AHack.MouseKeys = {
  436. [107] = "MOUSE_LEFT",
  437. [108] = "MOUSE_RIGHT",
  438. [109] = "MOUSE_MIDDLE",
  439. [110] = "MOUSE_4",
  440. [111] = "MOUSE_5"
  441. }
  442. //Tells me if a specific key is pressed. Loops through both tables.
  443. AHack.KeyPressed = function(key)
  444.     if AHack.InChat then return false end
  445.    
  446.     for k = 107, 111 do
  447.         if key == AHack.MouseKeys[k] then
  448.             if input.IsMouseDown(k) then
  449.                 return true
  450.             else
  451.                 return false
  452.             end
  453.         end
  454.     end
  455.    
  456.     for k = 0, 130 do
  457.         if key == AHack.Keys[k] then
  458.             if input.IsKeyDown(k) then
  459.                 return true
  460.             else
  461.                 return false
  462.             end
  463.         end
  464.     end
  465.    
  466.     return false
  467. end
  468.  
  469. //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.
  470. AHack.BoolToInt = function(bool)
  471.     if bool then
  472.         return 1
  473.     else
  474.         return 0
  475.     end
  476. end
  477.  
  478. //Checking if a bone is visible, pos is the position of the bone and ent is the entity whos bone were looking for.
  479. AHack.SpotIsVisible = function(pos, ent)
  480.     ent = ent or AHack.Aimbot.CurTarget
  481.     local tracedata = {}
  482.     tracedata.start = AHack.Ply:GetShootPos()
  483.     tracedata.endpos = pos
  484.     tracedata.filter = {AHack.Ply, ent}
  485.    
  486.     local trace = util.TraceLine(tracedata)
  487.     if trace.HitPos:Distance(pos) < 0.005 then
  488.         return true
  489.     else
  490.         return false
  491.     end
  492. end
  493.  
  494. //Checks all of the entities bones to find if we can see this entity or not.
  495. AHack.CanSee = function(ent)
  496.     for k = 1, #AHack.Bones do
  497.         local v = AHack.Bones[k]
  498.         local bone = ent:LookupBone(v)
  499.         if bone != nil then
  500.             local pos, ang = ent:GetBonePosition(bone)
  501.             if AHack.SpotIsVisible(pos, ent) then
  502.                 return true
  503.             end
  504.         end
  505.     end
  506.     return false
  507. end
  508.  
  509. //This returns the next entity we should attack.
  510. AHack.GetTarget = function()
  511.     if AHack.Aimbot.Vars["AttackNPCs"]:GetBool() or AHack.Aimbot.Vars["AttackPlayers"]:GetBool() then
  512.         local targets = {}
  513.         local everything = ents.GetAll()
  514.         for k = 1, #everything do
  515.             local v = everything[k]
  516.             if AHack.Aimbot.Vars["AttackNPCs"]:GetBool() and v:IsNPC() then
  517.                 if AHack.CanSee(v) then
  518.                     table.insert(targets, {["Target"] = v, ["Pos"] = v:LocalToWorld(v:OBBCenter())})
  519.                 end
  520.             elseif AHack.Aimbot.Vars["AttackPlayers"]:GetBool() and v:IsPlayer() and v != AHack.Ply then
  521.                 if AHack.CanSee(v) then
  522.                     table.insert(targets, {["Target"] = v, ["Pos"] = v:LocalToWorld(v:OBBCenter())})
  523.                 end
  524.             end
  525.         end
  526.        
  527.         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
  528.             local v = v["Target"]
  529.             local shouldremove = false
  530.             if AHack.Aimbot.Vars["IgnoreTeam"]:GetBool() and v:IsPlayer() then
  531.                 if AHack.TTT then
  532.                     if AHack.Ply:GetRole() == 1 and v:GetRole() == 1 then
  533.                         shouldremove = true
  534.                     end
  535.                        
  536.                     if AHack.Ply:GetRole() != 1 and not table.HasValue(AHack.Traitors, v) then
  537.                         shouldremove = true
  538.                     end
  539.                 else
  540.                     if v:Team() == AHack.Ply:Team() then
  541.                         shouldremove = true
  542.                     end
  543.                 end
  544.             end
  545.            
  546.             if AHack.Friends.Vars["Active"]:GetBool() then
  547.                 if AHack.Friends.Vars["Reverse"]:GetBool() then
  548.                     if not table.HasValue(AHack.Friends.List, v:SteamID()) then
  549.                         shouldremove = true
  550.                     end
  551.                 else
  552.                     if table.HasValue(AHack.Friends.List, v:SteamID()) then
  553.                         shouldremove = true    
  554.                     end
  555.                 end
  556.             end
  557.            
  558.             if shouldremove then
  559.                 table.remove(targets, k)
  560.             end
  561.         end
  562.        
  563.         if #targets == 0 then
  564.             return nil
  565.         elseif #targets == 1 then
  566.             targets[1]["Target"].BoneToAimAt = nil
  567.             return targets[1]["Target"]
  568.         end
  569.        
  570.         if AHack.Aimbot.Vars["Preferance"]:GetString() == "Distance" then
  571.             local min = {["Distance"] = AHack.Ply:GetPos():Distance(targets[1]["Pos"]), ["Target"] = targets[1]["Target"]}
  572.             for k = 1, #targets do
  573.                 local v = targets[k]
  574.                
  575.                 local distance = AHack.Ply:GetPos():Distance(v["Pos"])
  576.                 if distance < min["Distance"] then
  577.                     min = {["Distance"] = distance, ["Target"] = v["Target"]}
  578.                 end
  579.             end
  580.             min["Target"].BoneToAimAt = nil
  581.             return min["Target"]
  582.         elseif AHack.Aimbot.Vars["Preferance"]:GetString() == "Angle" then     
  583.             local min = {["Angle"] = AHack.AngleTo(targets[1]["Pos"]), ["Target"] = targets[1]["Target"]}
  584.             for k = 1, #targets do
  585.                 local v = targets[k]
  586.                
  587.                 local angle = AHack.AngleTo(v["Pos"])
  588.                 if angle < min["Angle"] then
  589.                     min = {["Angle"] = angle, ["Target"] = v["Target"]}
  590.                 end
  591.             end
  592.             min["Target"].BoneToAimAt = nil
  593.             return min["Target"]
  594.         end
  595.     else
  596.         return nil
  597.     end
  598. end
  599.  
  600. //This returns the total angle away from the target we are, and then the pitch and yaw seperately
  601. AHack.AngleTo = function(pos)
  602.     local myAngs = AHack.Ply:GetAngles()
  603.     local needed = (pos - AHack.Ply:GetShootPos()):Angle()
  604.    
  605.     myAngs.p = math.NormalizeAngle(myAngs.p)
  606.     needed.p = math.NormalizeAngle(needed.p)
  607.    
  608.     myAngs.y = math.NormalizeAngle(myAngs.y)
  609.     needed.y = math.NormalizeAngle(needed.y)
  610.    
  611.     local p = math.NormalizeAngle(needed.p - myAngs.p)
  612.     local y = math.NormalizeAngle(needed.y - myAngs.y)
  613.    
  614.     return math.abs(p) + math.abs(y), {p = p, y = y}
  615. end
  616.  
  617. //Returns true if our target meets our preferances.
  618. AHack.ValidTarget = function()
  619.     if AHack.Aimbot.CurTarget == nil then return false end
  620.     if not IsValid(AHack.Aimbot.CurTarget) then return false end
  621.     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
  622.     if not AHack.Aimbot.Vars["AttackNPCs"]:GetBool() and AHack.Aimbot.CurTarget:IsNPC() then return false end
  623.     if not AHack.Aimbot.Vars["AttackPlayers"]:GetBool() and AHack.Aimbot.CurTarget:IsPlayer() then return false end
  624.     if not AHack.CanSee(AHack.Aimbot.CurTarget) then return false end
  625.     if AHack.Aimbot.Vars["IgnoreTeam"]:GetBool() and AHack.Aimbot.CurTarget:IsPlayer() then
  626.         if AHack.TTT then
  627.             if AHack.Ply:GetRole() == 1 and AHack.Aimbot.CurTarget:GetRole() == 1 then return false end            
  628.             if AHack.Ply:GetRole() != 1 and not table.HasValue(AHack.Traitors, AHack.Aimbot.CurTarget) then return false end
  629.         else
  630.             if AHack.Aimbot.CurTarget:Team() == AHack.Ply:Team() then return false end
  631.         end
  632.     end
  633.    
  634.     return true
  635. end
  636.  
  637. hook.Add("RenderScreenspaceEffects", AHack.RandomName(math.random(10, 15)), function()
  638.     if AHack.Active:GetBool() then
  639.         local everything = ents.GetAll()
  640.         for k = 1, #everything do
  641.             local v = everything[k]
  642.            
  643.             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
  644.                 cam.Start3D(EyePos(), EyeAngles())
  645.                     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
  646.                         local color = AHack.Style.Vars["Chams"].color
  647.                         if AHack.Chams.Vars["TeamBased"]:GetBool() and v:IsPlayer() then
  648.                             color = team.GetColor(v:Team())
  649.                             if AHack.TTT then
  650.                                 if v:GetRole() == 2 then
  651.                                     color = Color(0, 0, 255, 255)
  652.                                 elseif table.HasValue(AHack.Traitors, v) then
  653.                                     color = Color(255, 0, 0, 255)
  654.                                 else
  655.                                     color = Color(0, 255, 0, 255)
  656.                                 end
  657.                             end
  658.                         end
  659.                         render.SuppressEngineLighting(true)
  660.                         render.SetColorModulation(color.r/255, color.g/255, color.b/255, 1)
  661.                         render.MaterialOverride(AHack.Chams.Mat)
  662.                         v:DrawModel()
  663.                        
  664.                         render.SetColorModulation((color.r + 150)/250, (color.g + 150)/250, (color.b + 150)/255, 1)                    
  665.                         if IsValid(v:GetActiveWeapon()) and AHack.Chams.Vars["Weapons"]:GetBool() then
  666.                             v:GetActiveWeapon():DrawModel()
  667.                         end
  668.                        
  669.                         render.SetColorModulation(1, 1, 1, 1)
  670.                         render.MaterialOverride()
  671.                         render.SetModelLighting(4, color.r/255, color.g/255, color.b/255)
  672.                         v:DrawModel()
  673.                         render.SuppressEngineLighting(false)
  674.                     elseif AHack.TTT and AHack.Chams.Vars["Bodies"]:GetBool() and v:GetClass() == "prop_ragdoll" then
  675.                         local color = AHack.Style.Vars["BodyChams"].color
  676.                         render.SuppressEngineLighting(true)
  677.                         render.SetColorModulation(color.r/255, color.g/255, color.b/255, 1)
  678.                         render.MaterialOverride(AHack.Chams.Mat)
  679.                         v:DrawModel()  
  680.                         render.SetColorModulation(1, 1, 1, 1)
  681.                         render.MaterialOverride()
  682.                         render.SetModelLighting(4, color.r/255, color.g/255, color.b/255)
  683.                         v:DrawModel()
  684.                         render.SuppressEngineLighting(false)
  685.                     elseif AHack.Entities.Vars["Active"]:GetBool() and table.HasValue(AHack.Entities.List, v:GetClass()) then
  686.                         local color = AHack.Style.Vars["Chams"].color                  
  687.                         render.SuppressEngineLighting(true)
  688.                         render.SetColorModulation(color.r/255, color.g/255, color.b/255, 1)
  689.                         render.MaterialOverride(AHack.Chams.Mat)
  690.                         v:DrawModel()  
  691.                         render.SetColorModulation(1, 1, 1, 1)
  692.                         render.MaterialOverride()
  693.                         render.SetModelLighting(4, color.r/255, color.g/255, color.b/255)
  694.                         v:DrawModel()
  695.                         render.SuppressEngineLighting(false)
  696.                     end
  697.                 cam.End3D()
  698.             end
  699.         end
  700.     end
  701. end)
  702.  
  703. //Helper function on radar. I just copied this one from the wiki.
  704. AHack.DrawFilledCircle = function(x, y, radius, quality)
  705.     local circle = {}
  706.     local tmp = 0
  707.     for i = 1, quality do
  708.         tmp = math.rad(i * 360) / quality
  709.         circle[i] = {x = x + math.cos(tmp) * radius, y = y + math.sin(tmp) * radius}
  710.     end
  711.     surface.DrawPoly(circle)
  712. end
  713.  
  714. //Another helper fuction on the radar.
  715. AHack.DrawArrow = function(x, y, myRotation)
  716.     local arrow = {}   
  717.     arrow[1] = {x = x, y = y}
  718.     arrow[2] = {x = x + 4, y = y + 7.5}
  719.     arrow[3] = {x = x, y = y + 5}
  720.     arrow[4] = {x = x - 4, y = y + 7.5}
  721.    
  722.     //Now that i have the arrow determined, i have to rotate it to match the targets angle
  723.     myRotation = myRotation * -1
  724.     myRotation = math.rad(myRotation)
  725.     for i = 1, 4 do
  726.         local theirX = arrow[i].x
  727.         local theirY = arrow[i].y
  728.        
  729.         theirX = theirX - x
  730.         theirY = theirY - y
  731.        
  732.         arrow[i].x = theirX * math.cos(myRotation) - theirY * math.sin(myRotation)
  733.         arrow[i].y = theirX * math.sin(myRotation) + theirY * math.cos(myRotation)
  734.        
  735.         arrow[i].x = arrow[i].x + x
  736.         arrow[i].y = arrow[i].y + y
  737.     end
  738.  
  739.     surface.DrawPoly(arrow)
  740. end
  741.  
  742. AHack.Traitors = {}
  743. AHack.SuperAdmins = {}
  744. AHack.Admins = {}
  745. AHack.Spectators = {}
  746. local radarX, radarY, radarWidth, radarHeight = 100, 200, 150, 150
  747. hook.Add("HUDPaint", AHack.RandomName(math.random(10, 15)), function()
  748.     if AHack.Active:GetBool() then 
  749.         local everything = ents.GetAll()
  750.        
  751.         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
  752.             draw.RoundedBox(0, radarX, radarY, radarWidth, radarHeight, Color(100, 100, 100, 255 ))
  753.             draw.NoTexture()
  754.             if AHack.ESP.Vars["TeamBased"]:GetBool() then
  755.                 local color = team.GetColor(AHack.Ply:Team())
  756.                 if AHack.TTT then
  757.                     if AHack.Ply:GetRole() == 2 then
  758.                         color = Color(0, 0, 255, 255)
  759.                     elseif AHack.Ply:GetRole() == 1 then
  760.                         color = Color(255, 0, 0, 255)
  761.                     else
  762.                         color = Color(0, 255, 0, 255)
  763.                     end
  764.                 end
  765.                 surface.SetDrawColor(color)
  766.             else
  767.                 surface.SetDrawColor(AHack.Style.Vars["ESPText"].color)
  768.             end
  769.             AHack.DrawArrow(radarX + (radarWidth / 2), radarY + (radarHeight / 2), 0)
  770.         end
  771.        
  772.         for k = 1, #everything do
  773.             local v = everything[k]
  774.        
  775.             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                                    
  776.                 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
  777.                     local color = AHack.Style.Vars["ESPText"].color
  778.                     if AHack.ESP.Vars["TeamBased"]:GetBool() and v:IsPlayer() then
  779.                         color = team.GetColor(v:Team())
  780.                         if AHack.TTT then
  781.                             if v:GetRole() == 2 then
  782.                                 color = Color(0, 0, 255, 255)
  783.                             elseif table.HasValue(AHack.Traitors, v) then
  784.                                 color = Color(255, 0, 0, 255)
  785.                             else
  786.                                 color = Color(0, 255, 0, 255)
  787.                             end
  788.                         end
  789.                     end
  790.                    
  791.                     local Min, Max = v:GetCollisionBounds()
  792.                     if AHack.ESP.Vars["Box"]:GetBool() then
  793.                         local one = v:LocalToWorld(Min):ToScreen()
  794.                         local two = v:LocalToWorld(Vector(Min.x, Min.y, Max.z)):ToScreen()
  795.                         local three = v:LocalToWorld(Vector(Min.x, Min.y + (Max.y * 2), Min.z)):ToScreen()
  796.                         local four = v:LocalToWorld(Vector(Min.x + (Max.x * 2), Min.y, Min.z)):ToScreen()
  797.                         local five = v:LocalToWorld(Max):ToScreen()
  798.                         local six = v:LocalToWorld(Vector(Max.x, Max.y, Min.z)):ToScreen()
  799.                         local seven = v:LocalToWorld(Vector(Max.x, Max.y + (Min.y * 2), Max.z)):ToScreen()
  800.                         local eight = v:LocalToWorld(Vector(Max.x + (Min.x * 2), Max.y, Max.z)):ToScreen()             
  801.                        
  802.                         if AHack.ESP.Vars["TeamBased"]:GetBool() then
  803.                             surface.SetDrawColor(color)
  804.                         else
  805.                             surface.SetDrawColor(AHack.Style.Vars["BoundingBox"].color)
  806.                         end
  807.                         local function connect(tabone, tabtwo)
  808.                             surface.DrawLine(tabone.x, tabone.y, tabtwo.x, tabtwo.y)
  809.                         end
  810.                        
  811.                         connect(one, two)
  812.                         connect(three, eight)
  813.                         connect(four, seven)
  814.                         connect(six, five)
  815.                         connect(four, six)
  816.                         connect(four, one)
  817.                         connect(one, three)
  818.                         connect(three, six)
  819.                         connect(five, eight)
  820.                         connect(eight, two)
  821.                         connect(two, seven)
  822.                         connect(seven, five)
  823.                     end
  824.                    
  825.                     surface.SetFont("ESPFont")
  826.                     local top = v:GetPos() + Vector(0, 0, Max.z + 10) // A little above their head so its not constantly covering their face.
  827.                     local topscreen = top:ToScreen()
  828.                     local topy = topscreen.y
  829.                    
  830.                     local bottom = v:GetPos()
  831.                     local bottomscreen = bottom:ToScreen()
  832.                     local bottomy = bottomscreen.y
  833.                    
  834.                     local function DrawAbove(text)
  835.                         local W, H = surface.GetTextSize(text)
  836.                         surface.SetTextPos(topscreen.x - W / 2, topy)
  837.                         surface.DrawText(text)
  838.                        
  839.                         topy = topy + H
  840.                     end
  841.                    
  842.                     local function DrawBelow(text)
  843.                         local W, H = surface.GetTextSize(text)
  844.                         surface.SetTextPos(bottomscreen.x - W / 2, bottomy)
  845.                         surface.DrawText(text)
  846.                        
  847.                         bottomy = bottomy + H
  848.                     end
  849.                    
  850.                     surface.SetTextColor(Color(255, 0, 0, 255))
  851.                     if AHack.ESP.Vars["ShowTraitors"]:GetString() != "Off" and table.HasValue(AHack.Traitors, v) then
  852.                         if AHack.ESP.Vars["ShowTraitors"]:GetString() == "Above" then
  853.                             DrawAbove("Traitor")
  854.                         else
  855.                             DrawBelow("Traitor")
  856.                         end
  857.                     end
  858.                    
  859.                     surface.SetTextColor(color)
  860.                     if v:IsPlayer() then
  861.                         if AHack.ESP.Vars["Name"]:GetString() == "Above" then
  862.                             DrawAbove("Name: "..v:Nick())
  863.                         elseif AHack.ESP.Vars["Name"]:GetString() == "Below" then
  864.                             DrawBelow("Name: "..v:Nick())
  865.                         end
  866.                     else
  867.                         if AHack.ESP.Vars["Name"]:GetString() == "Above" then
  868.                             DrawAbove("Name: "..v:GetClass())
  869.                         elseif AHack.ESP.Vars["Name"]:GetString() == "Below" then
  870.                             DrawBelow("Name: "..v:GetClass())
  871.                         end
  872.                     end
  873.                    
  874.                     if AHack.ESP.Vars["Weapons"]:GetString() == "Above" and IsValid(v:GetActiveWeapon()) then
  875.                         DrawAbove("Weapon: "..v:GetActiveWeapon():GetClass())
  876.                     elseif AHack.ESP.Vars["Weapons"]:GetString() == "Below" and IsValid(v:GetActiveWeapon()) then
  877.                         DrawBelow("Weapon: "..v:GetActiveWeapon():GetClass())
  878.                     end    
  879.                    
  880.                     if AHack.ESP.Vars["Distance"]:GetString() == "Above" then
  881.                         DrawAbove("Distance: "..bottom:Distance(AHack.Ply:GetPos()))
  882.                     elseif AHack.ESP.Vars["Distance"]:GetString() == "Below" then
  883.                         DrawBelow("Distance: "..bottom:Distance(AHack.Ply:GetPos()))
  884.                     end
  885.                    
  886.                     if AHack.ESP.Vars["Health"]:GetString() == "Above" then
  887.                         DrawAbove("HP: "..v:Health())
  888.                     elseif AHack.ESP.Vars["Health"]:GetString() == "Below" then
  889.                         DrawBelow("HP: "..v:Health())
  890.                     end
  891.                    
  892.                     if AHack.ESP.Vars["Radar"]:GetBool() then
  893.                         surface.SetDrawColor(color)
  894.                         local myPos = AHack.Ply:GetPos()
  895.                         local theirPos = v:GetPos()
  896.                         local myAngles = AHack.Ply:GetAngles()
  897.                        
  898.                         local theirX = (radarX + (radarWidth / 2)) + ((theirPos.x - myPos.x) / AHack.ESP.Vars["RadarScale"]:GetInt())
  899.                         local theirY = (radarY + (radarHeight / 2)) + ((myPos.y - theirPos.y) / AHack.ESP.Vars["RadarScale"]:GetInt())
  900.                        
  901.                         //Now i have to rotate this
  902.                         local myRotation = myAngles.y - 90
  903.                         myRotation = math.rad(myRotation)
  904.                        
  905.                         theirX = theirX - (radarX + (radarWidth / 2))
  906.                         theirY = theirY - (radarY + (radarHeight / 2))
  907.                         local newX = theirX * math.cos(myRotation) - theirY * math.sin(myRotation)
  908.                         local newY = theirX * math.sin(myRotation) + theirY * math.cos(myRotation)
  909.                         newX = newX + (radarX + (radarWidth / 2))
  910.                         newY = newY + (radarY + (radarHeight / 2))
  911.                        
  912.                         //And now that its rotated i can check if its within our radars bounds and draw it
  913.                         if newX < (radarX + radarWidth) and newX > radarX and newY < (radarY + radarHeight) and newY > radarY then
  914.                             AHack.DrawArrow(newX, newY, v:EyeAngles().y - myAngles.y)
  915.                         end
  916.                     end
  917.                 elseif AHack.TTT and AHack.ESP.Vars["Bodies"]:GetBool() and v:GetClass() == "prop_ragdoll" then
  918.                     surface.SetFont("ESPFont")
  919.                    
  920.                     //Im just going to position this info at the center of the player, if i get any complaints ill change it
  921.                     local pos = v:LocalToWorld(v:OBBCenter())
  922.                     local poscreen = pos:ToScreen()
  923.                     local W, H = surface.GetTextSize("Sample") //It doesnt have to be perfect but this will help center the text more.
  924.                     local y = poscreen.y - (H * 1.5)
  925.                    
  926.                     local function DrawText(text)
  927.                         local W, H = surface.GetTextSize(text)
  928.                         surface.SetTextPos(poscreen.x - W / 2, y)
  929.                         surface.DrawText(text)
  930.                        
  931.                         y = y + H
  932.                     end
  933.                    
  934.                     surface.SetTextColor(AHack.Style.Vars["BodyText"].color)
  935.                     DrawText("Credits: "..AHack.TTTCORPSE.GetCredits(v, 0))
  936.                     DrawText("Name: "..AHack.TTTCORPSE.GetPlayerNick(v, "Unknown"))
  937.                     DrawText("Found: "..tostring(AHack.TTTCORPSE.GetFound(v, false)))
  938.                    
  939.                     if AHack.ESP.Vars["Radar"] then
  940.                         surface.SetDrawColor(AHack.Style.Vars["BodyText"].color)
  941.                         local myPos = AHack.Ply:GetPos()
  942.                         local theirPos = v:GetPos()
  943.                        
  944.                         local theirX = (radarX + (radarWidth / 2)) + ((theirPos.x - myPos.x) / AHack.ESP.Vars["RadarScale"]:GetInt())
  945.                         local theirY = (radarY + (radarHeight / 2)) + ((myPos.y - theirPos.y) / AHack.ESP.Vars["RadarScale"]:GetInt())
  946.                        
  947.                         //Now i have to rotate this
  948.                         local myRotation = AHack.Ply:GetAngles().y - 90
  949.                         myRotation = math.rad(myRotation)
  950.                        
  951.                         theirX = theirX - (radarX + (radarWidth / 2))
  952.                         theirY = theirY - (radarY + (radarHeight / 2))
  953.                         local newX = theirX * math.cos(myRotation) - theirY * math.sin(myRotation)
  954.                         local newY = theirX * math.sin(myRotation) + theirY * math.cos(myRotation)
  955.                         newX = newX + (radarX + (radarWidth / 2))
  956.                         newY = newY + (radarY + (radarHeight / 2))
  957.                        
  958.                         //And now that its rotated i can check if its within our radars bounds and draw it
  959.                         if newX < (radarX + radarWidth) and newX > radarX and newY < (radarY + radarHeight) and newY > radarY then
  960.                             AHack.DrawFilledCircle(newX, newY, 2, 4)
  961.                         end
  962.                     end
  963.                 elseif AHack.Entities.Vars["Active"]:GetBool() and table.HasValue(AHack.Entities.List, v:GetClass()) then
  964.                     surface.SetFont("ESPFont")
  965.                     surface.SetTextColor(AHack.Style.Vars["ESPText"].color)
  966.                    
  967.                     local text = v:GetClass()
  968.                     local W, H = surface.GetTextSize(text)
  969.                    
  970.                     local PosScreen = v:GetPos():ToScreen()
  971.                     surface.SetTextPos(PosScreen.x - W / 2, PosScreen.y)
  972.                     surface.DrawText(text)
  973.                 end
  974.             end
  975.            
  976.             surface.SetFont("default")
  977.             if v:IsPlayer() and v:IsSuperAdmin() then
  978.                 if not table.HasValue(AHack.SuperAdmins, v) then
  979.                     table.insert(AHack.SuperAdmins, v)
  980.                     AHack.Message("Super Admin "..v:Nick().." joined the game.")
  981.                     if AHack.Misc.Vars["Sounds"]:GetBool() then
  982.                         surface.PlaySound("vo/npc/Alyx/watchout02.wav")
  983.                     end
  984.                 end
  985.             end        
  986.             if v:IsPlayer() and v:IsAdmin() and not v:IsSuperAdmin() then
  987.                 if not table.HasValue(AHack.Admins, v) then
  988.                     table.insert(AHack.Admins, v)
  989.                     AHack.Message("Admin "..v:Nick().." joined the game.")
  990.                     if AHack.Misc.Vars["Sounds"]:GetBool() then
  991.                         surface.PlaySound("vo/npc/Alyx/watchout01.wav")
  992.                     end
  993.                 end
  994.             end    
  995.             for k,v in SortedPairs(AHack.Admins, true) do
  996.                 if not IsValid(v) then
  997.                     table.remove(AHack.Admins, k)
  998.                 end
  999.             end
  1000.             for k,v in SortedPairs(AHack.SuperAdmins, true) do
  1001.                 if not IsValid(v) then
  1002.                     table.remove(AHack.SuperAdmins, k)
  1003.                 end
  1004.             end
  1005.                
  1006.             if v:IsPlayer() and v:GetObserverTarget() == AHack.Ply then
  1007.                 if not table.HasValue(AHack.Spectators, v) then
  1008.                     table.insert(AHack.Spectators, v)
  1009.                     AHack.Message(v:Nick().." started spectating you.")
  1010.                     if AHack.Misc.Vars["Sounds"]:GetBool() then
  1011.                         surface.PlaySound("vo/npc/female01/ohno.wav")
  1012.                     end            
  1013.                 end
  1014.             end
  1015.             for k,v in SortedPairs(AHack.Spectators, true) do
  1016.                 if IsValid(v) then
  1017.                     if v:GetObserverTarget() != AHack.Ply then
  1018.                         table.remove(AHack.Spectators, k)
  1019.                     end
  1020.                 else
  1021.                     table.remove(AHack.Spectators, k)
  1022.                 end
  1023.             end
  1024.            
  1025.             if AHack.TTT and AHack.Misc.Vars["TraitorFinder"]:GetBool() then
  1026.                 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
  1027.                     local owner = v:GetOwner()
  1028.                     if owner:GetRole() == 2 then
  1029.                         v.Buyer = owner
  1030.                     else
  1031.                         AHack.Message(owner:Nick().." bought a traitor weapon: "..v:GetClass())
  1032.                         v.Buyer = owner
  1033.                         table.insert(AHack.Traitors, owner)
  1034.                         if AHack.Misc.Vars["Sounds"]:GetBool() then
  1035.                             surface.PlaySound("weapons/shotgun/shotgun_cock.wav")
  1036.                         end
  1037.                     end
  1038.                 elseif GetRoundState() != 3 then
  1039.                     table.Empty(AHack.Traitors)
  1040.                 end
  1041.             end
  1042.            
  1043.             if AHack.Misc.Vars["Deaths"]:GetBool() and v:IsPlayer() then
  1044.                 if v:Alive() then
  1045.                     v.IsAlive = true
  1046.                 elseif v.IsAlive then
  1047.                     AHack.Message(3, v:Nick().." just died.")
  1048.                     v.IsAlive = false
  1049.                     if AHack.Misc.Vars["Sounds"]:GetBool() then
  1050.                         surface.PlaySound("npc/combine_soldier/vo/onedown.wav")
  1051.                     end
  1052.                 end            
  1053.             end
  1054.         end
  1055.        
  1056.         surface.SetFont("default")
  1057.         surface.SetTextColor(Color(255, 255, 255, 255))
  1058.         local AdminWidest = 0
  1059.         local AdminTotalHeight = 0
  1060.         local AdminHeight = 20
  1061.         if AHack.Misc.Vars["ShowAdmins"]:GetBool() then
  1062.             for k,v in pairs(AHack.SuperAdmins) do
  1063.                 local W, H = surface.GetTextSize(v:Nick().." - Super Admin")
  1064.                 if W > AdminWidest then
  1065.                     AdminWidest = W
  1066.                 end
  1067.                 AdminTotalHeight = AdminTotalHeight + H
  1068.             end
  1069.             for k,v in pairs(AHack.Admins) do
  1070.                 local W, H = surface.GetTextSize(v:Nick().." - Admin")
  1071.                 if W > AdminWidest then
  1072.                     AdminWidest = W
  1073.                 end
  1074.                 AdminTotalHeight = AdminTotalHeight + H
  1075.             end
  1076.             draw.RoundedBox(8, ScrW() - AdminWidest - 30, 10, AdminWidest + 20, AdminTotalHeight + 20, Color(0, 0, 0, 150 ))
  1077.             for k,v in pairs(AHack.SuperAdmins) do
  1078.                 local text = v:Nick().." - Super Admin"
  1079.                 local W, H = surface.GetTextSize(text)
  1080.                 surface.SetTextPos(ScrW() - 20 - AdminWidest, AdminHeight)
  1081.                 surface.DrawText(text)
  1082.                 AdminHeight = AdminHeight + H
  1083.             end
  1084.             for k,v in pairs(AHack.Admins) do
  1085.                 local text = v:Nick().." - Admin"
  1086.                 local W, H = surface.GetTextSize(text)
  1087.                 surface.SetTextPos(ScrW() - 20 - AdminWidest, AdminHeight)
  1088.                 surface.DrawText(text)
  1089.                 AdminHeight = AdminHeight + H
  1090.             end
  1091.         end
  1092.        
  1093.         local SpecWidest = 0
  1094.         local SpecTotalHeight = 0
  1095.         local SpecHeight = AdminTotalHeight + 50
  1096.         if AHack.Misc.Vars["ShowSpectators"]:GetBool() then
  1097.             for k,v in pairs(AHack.Spectators) do
  1098.                 local W, H = surface.GetTextSize(v:Nick())
  1099.                 if W > SpecWidest then
  1100.                     SpecWidest = W
  1101.                 end
  1102.                 SpecTotalHeight = SpecTotalHeight + H
  1103.             end
  1104.             draw.RoundedBox(8, ScrW() - SpecWidest - 30, 40 + AdminTotalHeight, SpecWidest + 20, SpecTotalHeight + 20, Color(0, 0, 0, 150 ))
  1105.             for k,v in pairs(AHack.Spectators) do
  1106.                 local text = v:Nick()
  1107.                 local W, H = surface.GetTextSize(text)
  1108.                 surface.SetTextPos(ScrW() - 20 - SpecWidest, SpecHeight)
  1109.                 surface.DrawText(text)
  1110.                 SpecHeight = SpecHeight + H
  1111.             end
  1112.         end
  1113.        
  1114.         if AHack.Misc.Vars["Crosshair"]:GetBool() then
  1115.             local size = AHack.Misc.Vars["CrosshairSize"]:GetInt()
  1116.             local MiddleScreen = {x = surface.ScreenWidth() / 2, y = surface.ScreenHeight() / 2}
  1117.             surface.SetDrawColor(AHack.Style.Vars["Crosshair"].color)
  1118.             surface.DrawLine(MiddleScreen.x, MiddleScreen.y, MiddleScreen.x - size, MiddleScreen.y)
  1119.             surface.DrawLine(MiddleScreen.x, MiddleScreen.y, MiddleScreen.x, MiddleScreen.y - size)
  1120.             surface.DrawLine(MiddleScreen.x, MiddleScreen.y, MiddleScreen.x + size, MiddleScreen.y)
  1121.             surface.DrawLine(MiddleScreen.x, MiddleScreen.y, MiddleScreen.x, MiddleScreen.y + size)
  1122.         end
  1123.     end
  1124. end)
  1125.  
  1126. hook.Add("Think", AHack.RandomName(math.random(10, 15)), function()
  1127.     if AHack.Active:GetBool() then 
  1128.         if AHack.Aimbot.Vars["Active"]:GetBool() and not (AHack.Aimbot.Vars["PanicMode"]:GetBool() and #AHack.Spectators > 0) then
  1129.             if not AHack.Aimbot.Vars["AimOnKey"]:GetBool() or (AHack.Aimbot.Vars["AimOnKey"]:GetBool() and AHack.KeyPressed(AHack.Aimbot.Vars["AimOnKey_Key"]:GetString())) then
  1130.                 if AHack.ValidTarget() then
  1131.                     local BoneOrder = {}
  1132.                     if AHack.Aimbot.CurTarget.BoneToAimAt and AHack.Aimbot.Vars["RandomBones"]:GetBool() then
  1133.                         table.insert(BoneOrder, AHack.Aimbot.CurTarget.BoneToAimAt)
  1134.                         table.Add(BoneOrder, AHack.GetRandomBones())
  1135.                         table.Add(BoneOrder, AHack.Bones)
  1136.                     else
  1137.                         if AHack.Aimbot.Vars["RandomBones"]:GetBool() then
  1138.                             table.Add(BoneOrder, AHack.GetRandomBones())
  1139.                             table.Add(BoneOrder, AHack.Bones)
  1140.                         else
  1141.                             table.Add(BoneOrder, AHack.Bones)
  1142.                         end
  1143.                     end
  1144.                     for k = 1, #BoneOrder do
  1145.                         local v = BoneOrder[k]
  1146.                         local bone = AHack.Aimbot.CurTarget:LookupBone(v)
  1147.                         if bone != nil then
  1148.                             local pos, ang = AHack.Aimbot.CurTarget:GetBonePosition(bone)
  1149.                             if v == "ValveBiped.Bip01_Head1" then
  1150.                                 pos = pos + Vector(0, 0, 3) //Aiming a little higher for the head
  1151.                             end
  1152.                             local total, needed = 300, {300, 300}
  1153.                            
  1154.                             if AHack.Aimbot.Vars["Prediction"]:GetBool() then
  1155.                                 local tarSpeed = AHack.Aimbot.CurTarget:GetVelocity() * 0.013
  1156.                                 local plySpeed = AHack.Ply:GetVelocity() * 0.013
  1157.                                 total, needed = AHack.AngleTo(pos - plySpeed + tarSpeed)
  1158.                             else
  1159.                                 total, needed = AHack.AngleTo(pos)
  1160.                             end
  1161.                                
  1162.                             if AHack.SpotIsVisible(pos) and total < AHack.Aimbot.Vars["MaxAngle"]:GetInt() then
  1163.                                 local myAngles = AHack.Ply:GetAngles()                             
  1164.                                 local NewAngles = Angle(myAngles.p + needed.p, myAngles.y + needed.y, 0)
  1165.                                
  1166.                                 if AHack.Aimbot.Vars["AntiSnap"]:GetBool() then
  1167.                                     local speed = AHack.Aimbot.Vars["AntiSnapSpeed"]:GetInt()
  1168.                                     NewAngles = (Angle(math.Approach(myAngles.p, NewAngles.p, speed), math.Approach(myAngles.y, NewAngles.y, speed), 0))
  1169.                                 end
  1170.                                
  1171.                                 AHack.Ply:SetEyeAngles(NewAngles)
  1172.                                 AHack.Aimbot.CurTarget.BoneToAimAt = BoneOrder[k]
  1173.                                 break
  1174.                             end
  1175.                         end
  1176.                     end
  1177.                 else
  1178.                     AHack.Aimbot.CurTarget = AHack.GetTarget()
  1179.                 end
  1180.             else
  1181.                 AHack.Aimbot.CurTarget = nil
  1182.             end
  1183.         end
  1184.        
  1185.         if AHack.Misc.Vars["NoRecoil"]:GetBool() then
  1186.             if IsValid(AHack.Ply:GetActiveWeapon()) then
  1187.                 local weapon = AHack.Ply:GetActiveWeapon()
  1188.                 if weapon.Primary then
  1189.                     weapon.OldRecoil = weapon.OldRecoil or weapon.Primary.Recoil or weapon.Recoil
  1190.                     weapon.Primary.Recoil = 0
  1191.                     weapon.Recoil = 0
  1192.                 else
  1193.                     weapon.OldRecoil = weapon.OldRecoil or weapon.Recoil
  1194.                     weapon.Recoil = 0
  1195.                 end
  1196.             end
  1197.         elseif IsValid(AHack.Ply:GetActiveWeapon()) then
  1198.             local weapon = AHack.Ply:GetActiveWeapon()
  1199.             if weapon.Primary then
  1200.                 weapon.Primary.Recoil = weapon.OldRecoil or weapon.Primary.Recoil or weapon.Recoil
  1201.                 weapon.Recoil = weapon.OldRecoil or weapon.Recoil or weapon.Primary.Recoil
  1202.             else
  1203.                 weapon.Recoil = weapon.OldRecoil or weapon.Recoil
  1204.             end
  1205.         end
  1206.        
  1207.         if AHack.DarkRP and AHack.Misc.Vars["BuyHealth"]:GetBool() then
  1208.             if AHack.Ply:Alive() and AHack.Ply:Health() < AHack.Misc.Vars["BuyHealth_Minimum"]:GetInt() then
  1209.                 AHack.Ply:ConCommand("say /buyhealth")
  1210.             end
  1211.         end
  1212.     end
  1213. end)
  1214.  
  1215. AHack.Misc.NextReload = CurTime()
  1216. AHack.Misc.ShootNext = true
  1217. hook.Add("CreateMove", AHack.RandomName(math.random(10, 15)), function(cmd)
  1218.     if AHack.Active:GetBool() then     
  1219.         local DontShoot = {"gmod_tool", "gmod_camera", "weapon_physgun", "weapon_physcannon"}
  1220.         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
  1221.             cmd:SetButtons(cmd:GetButtons() + IN_ATTACK)
  1222.         end
  1223.        
  1224.         if AHack.Misc.Vars["BunnyHop"]:GetBool() and cmd:KeyDown(IN_JUMP) and AHack.KeyPressed(AHack.Misc.Vars["BunnyHop_Key"]:GetString()) then
  1225.             cmd:SetButtons(cmd:GetButtons() - IN_JUMP)
  1226.         end
  1227.         if AHack.Misc.Vars["BunnyHop"]:GetBool() and AHack.Ply:OnGround() and AHack.KeyPressed(AHack.Misc.Vars["BunnyHop_Key"]:GetString()) then
  1228.             cmd:SetButtons(cmd:GetButtons() + IN_JUMP)
  1229.         end
  1230.        
  1231.         local DontReload = {"gmod_tool", "gmod_camera", "weapon_physgun", "weapon_physcannon", "weapon_crowbar"}
  1232.         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
  1233.             cmd:SetButtons(cmd:GetButtons() + IN_RELOAD)
  1234.         end
  1235.        
  1236.         if AHack.Misc.Vars["AutoPistol"]:GetBool() and IsValid(AHack.Ply:GetActiveWeapon()) then
  1237.             local weapon = AHack.Ply:GetActiveWeapon()
  1238.             if weapon.Primary and type(weapon.Primary.Automatic) == "boolean" and not weapon.Primary.Automatic then
  1239.                 if cmd:KeyDown(IN_ATTACK) then
  1240.                     if AHack.Misc.ShootNext then
  1241.                         AHack.Misc.ShootNext = false
  1242.                     else
  1243.                         cmd:SetButtons(cmd:GetButtons() - IN_ATTACK)
  1244.                         AHack.Misc.ShootNext = true
  1245.                     end
  1246.                 end                
  1247.             elseif type(weapon.Automatic) == "boolean" and not weapon.Automatic then
  1248.                 if cmd:KeyDown(IN_ATTACK) then
  1249.                     if AHack.Misc.ShootNext then
  1250.                         AHack.Misc.ShootNext = false
  1251.                     else
  1252.                         cmd:SetButtons(cmd:GetButtons() - IN_ATTACK)
  1253.                         AHack.Misc.ShootNext = true
  1254.                     end
  1255.                 end
  1256.             end
  1257.         end
  1258.     end
  1259. end)
  1260.  
  1261. //Used to see if the player is typing in chat or not. Binds arent called when you're in chat.
  1262. AHack.InChat = false
  1263. hook.Add("StartChat", AHack.RandomName(math.random(10, 15)), function()
  1264.     AHack.InChat = true
  1265. end)
  1266. hook.Add("FinishChat", AHack.RandomName(math.random(10, 15)), function()
  1267.     AHack.InChat = false
  1268. end)
  1269.  
  1270. concommand.Add("AHack_Menu", function()
  1271.     //Im only using DColumnSheet because everyone used DPropertySheet. I just want to be different
  1272.     local main = vgui.Create("DFrame")
  1273.     main:SetSize(500,496)
  1274.     main:Center()
  1275.     main:SetTitle("")
  1276.     main:MakePopup()
  1277.     main:ShowCloseButton(false)
  1278.     main.Paint = function()
  1279.         draw.RoundedBox( 0, 0, 0, main:GetWide(), main:GetTall(), Color( 0, 0, 0, 150 ) )
  1280.     end
  1281.    
  1282.     local PanicButton = vgui.Create("DButton", main)
  1283.     PanicButton:SetSize(50, 20)
  1284.     PanicButton:SetPos(415, 3)
  1285.     local function Enable()
  1286.         PanicButton:SetText("Disable")
  1287.         PanicButton.DoClick = function()
  1288.             PanicButton:SetText("Enable")
  1289.             PanicButton.DoClick = Enable
  1290.             AHack.Ply:ConCommand("AHack_Active 0")
  1291.         end
  1292.         AHack.Ply:ConCommand("AHack_Active 1")
  1293.     end
  1294.     local function Disable()
  1295.         PanicButton:SetText("Enable")
  1296.         PanicButton.DoClick = function()
  1297.             PanicButton:SetText("Disable")
  1298.             PanicButton.DoClick = Disable
  1299.             AHack.Ply:ConCommand("AHack_Active 1")
  1300.         end
  1301.         AHack.Ply:ConCommand("AHack_Active 0")
  1302.     end
  1303.     if AHack.Active:GetBool() then
  1304.         PanicButton:SetText("Disable")
  1305.         PanicButton.DoClick = Disable
  1306.     else
  1307.         PanicButton:SetText("Enable")
  1308.         PanicButton.DoClick = Enable
  1309.     end
  1310.    
  1311.     local CloseButton = vgui.Create("DButton", main)
  1312.     CloseButton:SetSize(30, 20)
  1313.     CloseButton:SetPos(465, 3)
  1314.     CloseButton:SetText("X")
  1315.     CloseButton.DoClick = function()
  1316.         main:Close()
  1317.     end
  1318.    
  1319.     local title = vgui.Create("DLabel", main)
  1320.     title:SetColor(Color(255, 255, 255, 255))
  1321.     title:SetFont("TitleFont")
  1322.     title:SetText("AHack - "..AHack.Version)
  1323.     title:SizeToContents()
  1324.     title:SetPos(main:GetWide() / 2 - title:GetWide() / 2,3)   
  1325.    
  1326.     ColumnSheet = vgui.Create("DColumnSheet",main)
  1327.     ColumnSheet:SetPos(5, 25)
  1328.     ColumnSheet:SetSize(500 ,465)
  1329.    
  1330.     local y = 40
  1331.     local function ToggleOption(name, parent, var)
  1332.         local Options = vgui.Create("DComboBox", parent)
  1333.         Options:SetSize(100, 20)
  1334.         Options:SetPos(parent:GetWide() * 0.75 - Options:GetWide() / 2, y)
  1335.         Options:AddChoice("Off", 0)
  1336.         Options:AddChoice("On", 1)
  1337.         Options.OnSelect = function(panel,index,value,data)
  1338.             AHack.Ply:ConCommand(var.." "..data)
  1339.         end
  1340.         Options:SetText(Options:GetOptionText(GetConVar(var):GetInt() + 1))
  1341.        
  1342.         local text = vgui.Create("DLabel", parent)
  1343.         text:SetColor(Color(0, 0, 0, 255))
  1344.         text:SetFont("CatagoryText")
  1345.         text:SetText(name)
  1346.         text:SizeToContents()
  1347.         text:SetPos(parent:GetWide() / 4 - text:GetWide() / 2, y + Options:GetTall() / 2 - text:GetTall() / 2)
  1348.        
  1349.         y = y + Options:GetTall() + 20
  1350.     end
  1351.    
  1352.     local function SetKeyOption(name, parent, var)     
  1353.         local Options = vgui.Create("DButton", parent)
  1354.         Options:SetSize(100, 20)
  1355.         Options:SetPos(parent:GetWide() * 0.75 - Options:GetWide() / 2, y)
  1356.         Options:SetText(GetConVar(var):GetString())
  1357.         Options.DoClick = function()
  1358.             Options:SetText("Press a key...")
  1359.             Options.Think = function()
  1360.                 for k = 107, 111 do
  1361.                     if input.IsMouseDown(k) then
  1362.                         AHack.Ply:ConCommand(var.." "..AHack.MouseKeys[k])
  1363.                         Options:SetText(AHack.MouseKeys[k])
  1364.                         Options.Think = nil
  1365.                     end
  1366.                 end
  1367.                
  1368.                 for k = 0, 130 do
  1369.                     if input.IsKeyDown(k) then
  1370.                         AHack.Ply:ConCommand(var.." "..AHack.Keys[k])
  1371.                         Options:SetText(AHack.Keys[k])
  1372.                         Options.Think = nil
  1373.                     end
  1374.                 end
  1375.             end
  1376.         end
  1377.        
  1378.         local text = vgui.Create("DLabel", parent)
  1379.         text:SetColor(Color(0, 0, 0, 255))
  1380.         text:SetFont("CatagoryText")
  1381.         text:SetText(name)
  1382.         text:SizeToContents()
  1383.         text:SetPos(parent:GetWide() / 4 - text:GetWide() / 2, y + Options:GetTall() / 2 - text:GetTall() / 2)
  1384.        
  1385.         y = y + Options:GetTall() + 20
  1386.     end
  1387.    
  1388.     local function SetNumberOption(name, parent, var, min, max, decimals)      
  1389.         local Options = vgui.Create("DNumberWang", parent)
  1390.         Options:SetSize(100, 20)
  1391.         Options:SetPos(parent:GetWide() * 0.75 - Options:GetWide() / 2, y)
  1392.         Options:SetMin(min)
  1393.         Options:SetMax(max)
  1394.         Options:SetDecimals(decimals)
  1395.         Options:SetConVar(var)
  1396.        
  1397.         local text = vgui.Create("DLabel", parent)
  1398.         text:SetColor(Color(0, 0, 0, 255))
  1399.         text:SetFont("CatagoryText")
  1400.         text:SetText(name)
  1401.         text:SizeToContents()
  1402.         text:SetPos(parent:GetWide() / 4 - text:GetWide() / 2, y + Options:GetTall() / 2 - text:GetTall() / 2)
  1403.        
  1404.         y = y + Options:GetTall() + 20
  1405.     end
  1406.    
  1407.     local function MultiOption(name, parent, var, tab)     
  1408.         local Options = vgui.Create("DComboBox", parent)
  1409.         Options:SetSize(100, 20)
  1410.         Options:SetPos(parent:GetWide() * 0.75 - Options:GetWide() / 2, y)
  1411.         for i = 1, #tab do
  1412.             Options:AddChoice(tab[i])
  1413.         end
  1414.         Options.OnSelect = function(panel,index,value,data)
  1415.             AHack.Ply:ConCommand(var.." "..value)
  1416.         end
  1417.         Options:SetText(GetConVar(var):GetString())
  1418.        
  1419.         local text = vgui.Create("DLabel", parent)
  1420.         text:SetColor(Color(0, 0, 0, 255))
  1421.         text:SetFont("CatagoryText")
  1422.         text:SetText(name)
  1423.         text:SizeToContents()
  1424.         text:SetPos(parent:GetWide() / 4 - text:GetWide() / 2, y + Options:GetTall() / 2 - text:GetTall() / 2)
  1425.        
  1426.         y = y + Options:GetTall() + 20
  1427.     end
  1428.    
  1429.     //Starting the Aimbot panel
  1430.     local Aimbot = vgui.Create("DPanel")
  1431.     Aimbot:SetSize(379, 465)
  1432.     Aimbot.Paint = function()
  1433.         draw.RoundedBox( 0, 0, 0, Aimbot:GetWide(), Aimbot:GetTall(), Color( 240, 240, 240, 255 ) )
  1434.     end
  1435.    
  1436.     local title = vgui.Create("DLabel", Aimbot)
  1437.     title:SetColor(Color(0, 0, 0, 255))
  1438.     title:SetFont("CatagoryHeader")
  1439.     title:SetText("Aimbot")
  1440.     title:SizeToContents()
  1441.     title:SetPos(Aimbot:GetWide() / 2 - title:GetWide() / 2, 0)
  1442.    
  1443.     ToggleOption("Active", Aimbot, "AHack_Aimbot_Active")
  1444.     ToggleOption("Random Bones", Aimbot, "AHack_Aimbot_RandomBones")
  1445.     MultiOption("Preferance", Aimbot, "AHack_Aimbot_Preferance", {"Distance", "Angle"})
  1446.     ToggleOption("Attack Players", Aimbot, "AHack_Aimbot_AttackPlayers")
  1447.     ToggleOption("Attack NPCs", Aimbot, "AHack_Aimbot_AttackNPCs")
  1448.     ToggleOption("Prediction", Aimbot, "AHack_Aimbot_Prediction")
  1449.     ToggleOption("Aim On Key", Aimbot, "AHack_Aimbot_AimOnKey")
  1450.     SetKeyOption("Key", Aimbot, "AHack_Aimbot_AimOnKey_Key")
  1451.     ToggleOption("Anti Snap", Aimbot, "AHack_Aimbot_AntiSnap")
  1452.     SetNumberOption("Anti Snap Speed", Aimbot, "AHack_Aimbot_AntiSnapSpeed", 1, 5, 2)
  1453.     SetNumberOption("Max Angle", Aimbot, "AHack_Aimbot_MaxAngle", 0, 270, 0)
  1454.     ToggleOption("Auto Shoot", Aimbot, "AHack_Aimbot_AutoShoot")
  1455.     ToggleOption("Panic Mode", Aimbot, "AHack_Aimbot_PanicMode")
  1456.     ToggleOption("Ignore Team", Aimbot, "AHack_Aimbot_IgnoreTeam")
  1457.    
  1458.     if y > 465 then
  1459.         Aimbot:SetTall(y)
  1460.     end
  1461.    
  1462.     //This is the best way i can find to add a scrollbar to the menu...
  1463.     AimbotList = vgui.Create( "DPanelList" )
  1464.     AimbotList:SetSize(379, 465)
  1465.     AimbotList:SetSpacing(0)
  1466.     AimbotList:EnableHorizontal(false)
  1467.     AimbotList:EnableVerticalScrollbar(true)
  1468.     AimbotList:AddItem(Aimbot)
  1469.    
  1470.     ColumnSheet:AddSheet("Aimbot", AimbotList, "icon16/application_xp_terminal.png")
  1471.    
  1472.     //Starting the Friends panel
  1473.     local FriendsPanel = vgui.Create("DPanel")
  1474.     FriendsPanel:SetSize(379, 465)
  1475.     FriendsPanel.Paint = function()
  1476.         draw.RoundedBox( 0, 0, 0, FriendsPanel:GetWide(), FriendsPanel:GetTall(), Color( 240, 240, 240, 255 ) )
  1477.     end
  1478.    
  1479.     local title = vgui.Create("DLabel", FriendsPanel)
  1480.     title:SetColor(Color(0, 0, 0, 255))
  1481.     title:SetFont("CatagoryHeader")
  1482.     title:SetText("Friends")
  1483.     title:SizeToContents()
  1484.     title:SetPos(FriendsPanel:GetWide() / 2 - title:GetWide() / 2, 3)
  1485.    
  1486.     local Friends = {}
  1487.     local Enemies = {}
  1488.    
  1489.     local players = player.GetAll()
  1490.     for k = 1, #players do
  1491.         local v = players[k]
  1492.         if v != AHack.Ply then
  1493.             if table.HasValue(AHack.Friends.List, v:SteamID()) then
  1494.                 table.insert(Friends, v)
  1495.             else
  1496.                 table.insert(Enemies, v)
  1497.             end
  1498.         end
  1499.     end
  1500.    
  1501.     y = 40
  1502.     local EnemiesList = vgui.Create("DListView", FriendsPanel) //Need this up here so FriendsList can reference it.
  1503.     local FriendsList = vgui.Create("DListView", FriendsPanel)
  1504.     FriendsList:SetSize(150, 200)
  1505.     FriendsList:SetPos(FriendsPanel:GetWide() * 0.25 - FriendsList:GetWide() / 2, y)
  1506.     FriendsList:SetMultiSelect(false)
  1507.     FriendsList:AddColumn("Friends")
  1508.     for k = 1, #Friends do
  1509.         FriendsList:AddLine(Friends[k]:Nick())
  1510.     end
  1511.     FriendsList.DoDoubleClick = function(panel, index, line)
  1512.         table.insert(Enemies, Friends[index])
  1513.         table.remove(Friends, index)
  1514.        
  1515.         FriendsList:Clear()
  1516.         EnemiesList:Clear()
  1517.         for k = 1, #Friends do
  1518.             FriendsList:AddLine(Friends[k]:Nick())
  1519.         end
  1520.         for k = 1, #Enemies do
  1521.             EnemiesList:AddLine(Enemies[k]:Nick())
  1522.         end
  1523.        
  1524.         AHack.Friends.List = {}
  1525.         for k = 1, #Friends do
  1526.             table.insert(AHack.Friends.List, Friends[k]:SteamID())
  1527.         end
  1528.         //AHack.SaveData()
  1529.     end
  1530.    
  1531.     EnemiesList:SetSize(150, 200)
  1532.     EnemiesList:SetPos(FriendsPanel:GetWide() * 0.75 - EnemiesList:GetWide() / 2, y)
  1533.     EnemiesList:SetMultiSelect(false)
  1534.     EnemiesList:AddColumn("Enemies")
  1535.     for k = 1, #Enemies do
  1536.         EnemiesList:AddLine(Enemies[k]:Nick())
  1537.     end
  1538.     EnemiesList.DoDoubleClick = function(panel, index, line)
  1539.         table.insert(Friends, Enemies[index])
  1540.         table.remove(Enemies, index)
  1541.        
  1542.         FriendsList:Clear()
  1543.         EnemiesList:Clear()
  1544.         for k = 1, #Friends do
  1545.             FriendsList:AddLine(Friends[k]:Nick())
  1546.         end
  1547.         for k = 1, #Enemies do
  1548.             EnemiesList:AddLine(Enemies[k]:Nick())
  1549.         end
  1550.        
  1551.         AHack.Friends.List = {}
  1552.         for k = 1, #Friends do
  1553.             table.insert(AHack.Friends.List, Friends[k]:SteamID())
  1554.         end
  1555.         //AHack.SaveData()
  1556.     end
  1557.    
  1558.     y = y + EnemiesList:GetTall() + 20
  1559.     ToggleOption("Use", FriendsPanel, "AHack_Friends_Active")
  1560.     ToggleOption("Reverse", FriendsPanel, "AHack_Friends_Reverse")
  1561.    
  1562.     if y > 465 then
  1563.         FriendsPanel:SetTall(y)
  1564.     end
  1565.    
  1566.     local FriendsPanelList = vgui.Create( "DPanelList" )
  1567.     FriendsPanelList:SetSize(379, 465)
  1568.     FriendsPanelList:SetSpacing(0)
  1569.     FriendsPanelList:EnableHorizontal(false)
  1570.     FriendsPanelList:EnableVerticalScrollbar(true)
  1571.     FriendsPanelList:AddItem(FriendsPanel)
  1572.    
  1573.     ColumnSheet:AddSheet("Friends", FriendsPanelList, "icon16/group.png")
  1574.  
  1575.     //Starting the ESP panel
  1576.     local ESP = vgui.Create("DPanel")
  1577.     ESP:SetSize(379, 465)
  1578.     ESP.Paint = function()
  1579.         draw.RoundedBox( 0, 0, 0, ESP:GetWide(), ESP:GetTall(), Color( 240, 240, 240, 255 ) )
  1580.     end
  1581.    
  1582.     local title = vgui.Create("DLabel", ESP)
  1583.     title:SetColor(Color(0, 0, 0, 255))
  1584.     title:SetFont("CatagoryHeader")
  1585.     title:SetText("ESP")
  1586.     title:SizeToContents()
  1587.     title:SetPos(ESP:GetWide() / 2 - title:GetWide() / 2, 3)
  1588.    
  1589.     y = 40
  1590.     ToggleOption("Active", ESP, "AHack_ESP_Active")
  1591.     ToggleOption("Player Info", ESP, "AHack_ESP_Players")
  1592.     ToggleOption("NPC Info", ESP, "AHack_ESP_NPCs")
  1593.     MultiOption("Name", ESP, "AHack_ESP_Name", {"Off", "Above", "Below"})  
  1594.     MultiOption("Weapon", ESP, "AHack_ESP_Weapons", {"Off", "Above", "Below"}) 
  1595.     MultiOption("Health", ESP, "AHack_ESP_Health", {"Off", "Above", "Below"})  
  1596.     MultiOption("Distance", ESP, "AHack_ESP_Distance", {"Off", "Above", "Below"})
  1597.     MultiOption("Show Traitors", ESP, "AHack_ESP_ShowTraitors", {"Off", "Above", "Below"})
  1598.     ToggleOption("Bounding Box", ESP, "AHack_ESP_Box")
  1599.     ToggleOption("Body Info", ESP, "AHack_ESP_Bodies")
  1600.     ToggleOption("2D Radar", ESP, "AHack_ESP_Radar")
  1601.     SetNumberOption("Radar Scale", ESP, "AHack_ESP_RadarScale", 1, 100, 0)
  1602.     SetNumberOption("Max Distance", ESP, "AHack_ESP_MaxDistance", 0, 8000, 0)
  1603.     ToggleOption("Team Based", ESP, "AHack_ESP_TeamBased")
  1604.    
  1605.     if y > 465 then
  1606.         ESP:SetTall(y)
  1607.     end
  1608.    
  1609.     ESPList = vgui.Create( "DPanelList" )
  1610.     ESPList:SetSize(379, 465)
  1611.     ESPList:SetSpacing(0)
  1612.     ESPList:EnableHorizontal(false)
  1613.     ESPList:EnableVerticalScrollbar(true)
  1614.     ESPList:AddItem(ESP)
  1615.    
  1616.     ColumnSheet:AddSheet("ESP", ESPList, "icon16/pencil.png")
  1617.    
  1618.     //Starting the Chams panel
  1619.     local Chams = vgui.Create("DPanel")
  1620.     Chams:SetSize(379, 465)
  1621.     Chams.Paint = function()
  1622.         draw.RoundedBox( 0, 0, 0, Chams:GetWide(), Chams:GetTall(), Color( 240, 240, 240, 255 ) )
  1623.     end
  1624.    
  1625.     local title = vgui.Create("DLabel", Chams)
  1626.     title:SetColor(Color(0, 0, 0, 255))
  1627.     title:SetFont("CatagoryHeader")
  1628.     title:SetText("Chams")
  1629.     title:SizeToContents()
  1630.     title:SetPos(Chams:GetWide() / 2 - title:GetWide() / 2, 3)
  1631.    
  1632.     y = 40
  1633.     ToggleOption("Active", Chams, "AHack_Chams_Active")
  1634.     ToggleOption("Draw Players", Chams, "AHack_Chams_Players")
  1635.     ToggleOption("Draw NPCs", Chams, "AHack_Chams_NPCs")
  1636.     ToggleOption("Draw Weapons", Chams, "AHack_Chams_Weapons")
  1637.     ToggleOption("Draw Bodies", Chams, "AHack_Chams_Bodies")
  1638.     ToggleOption("Team Based", Chams, "AHack_Chams_TeamBased")
  1639.     SetNumberOption("Max Distance", Chams, "AHack_Chams_MaxDistance", 0, 8000, 0)
  1640.    
  1641.     if y > 465 then
  1642.         Chams:SetTall(y)
  1643.     end
  1644.    
  1645.     ChamsList = vgui.Create( "DPanelList" )
  1646.     ChamsList:SetSize(379, 465)
  1647.     ChamsList:SetSpacing(0)
  1648.     ChamsList:EnableHorizontal(false)
  1649.     ChamsList:EnableVerticalScrollbar(true)
  1650.     ChamsList:AddItem(Chams)
  1651.    
  1652.     ColumnSheet:AddSheet("Chams", ChamsList, "icon16/eye.png")
  1653.    
  1654.     //Starting the Finder panel
  1655.     local Finder = vgui.Create("DPanel")
  1656.     Finder:SetSize(379, 465)
  1657.     Finder.Paint = function()
  1658.         draw.RoundedBox( 0, 0, 0, Finder:GetWide(), Finder:GetTall(), Color( 240, 240, 240, 255 ) )
  1659.     end
  1660.    
  1661.     local title = vgui.Create("DLabel", Finder)
  1662.     title:SetColor(Color(0, 0, 0, 255))
  1663.     title:SetFont("CatagoryHeader")
  1664.     title:SetText("Entity Finder")
  1665.     title:SizeToContents()
  1666.     title:SetPos(Finder:GetWide() / 2 - title:GetWide() / 2, 3)
  1667.    
  1668.     local ToShow = {}
  1669.     local Others = {}
  1670.    
  1671.     local All = ents.GetAll()
  1672.     for k = 1, #All do
  1673.         local v = All[k]
  1674.         if table.HasValue(AHack.Entities.List, v:GetClass()) then
  1675.             if not table.HasValue(ToShow, v:GetClass()) then
  1676.                 table.insert(ToShow, v:GetClass())
  1677.             end
  1678.         elseif not table.HasValue(Others, v:GetClass()) then
  1679.             table.insert(Others, v:GetClass())
  1680.         end
  1681.     end
  1682.    
  1683.     y = 40
  1684.     local IgnoreList = vgui.Create("DListView", Finder) //Need this up here so ToShowList can reference it.
  1685.     local ToShowList = vgui.Create("DListView", Finder)
  1686.     ToShowList:SetSize(150, 200)
  1687.     ToShowList:SetPos(Finder:GetWide() * 0.25 - ToShowList:GetWide() / 2, y)
  1688.     ToShowList:SetMultiSelect(false)
  1689.     ToShowList:AddColumn("To Show")
  1690.     for k = 1, #ToShow do
  1691.         ToShowList:AddLine(ToShow[k])
  1692.     end
  1693.     ToShowList.DoDoubleClick = function(panel, index, line)
  1694.         table.insert(Others, ToShow[index])
  1695.         table.remove(ToShow, index)
  1696.        
  1697.         ToShowList:Clear()
  1698.         IgnoreList:Clear()
  1699.         for k = 1, #ToShow do
  1700.             ToShowList:AddLine(ToShow[k])
  1701.         end
  1702.         for k = 1, #Others do
  1703.             IgnoreList:AddLine(Others[k])
  1704.         end
  1705.        
  1706.         AHack.Entities.List = {}
  1707.         for k = 1, #ToShow do
  1708.             table.insert(AHack.Entities.List, ToShow[k])
  1709.         end
  1710.         //AHack.SaveData()
  1711.     end
  1712.    
  1713.     IgnoreList:SetSize(150, 200)
  1714.     IgnoreList:SetPos(Finder:GetWide() * 0.75 - IgnoreList:GetWide() / 2, y)
  1715.     IgnoreList:SetMultiSelect(false)
  1716.     IgnoreList:AddColumn("Others")
  1717.     for k = 1, #Others do
  1718.         IgnoreList:AddLine(Others[k])
  1719.     end
  1720.     IgnoreList.DoDoubleClick = function(panel, index, line)
  1721.         table.insert(ToShow, Others[index])
  1722.         table.remove(Others, index)
  1723.        
  1724.         ToShowList:Clear()
  1725.         IgnoreList:Clear()
  1726.         for k = 1, #ToShow do
  1727.             ToShowList:AddLine(ToShow[k])
  1728.         end
  1729.         for k = 1, #Others do
  1730.             IgnoreList:AddLine(Others[k])
  1731.         end
  1732.        
  1733.         AHack.Entities.List = {}
  1734.         for k = 1, #ToShow do
  1735.             table.insert(AHack.Entities.List, ToShow[k])
  1736.         end
  1737.         //AHack.SaveData()
  1738.     end
  1739.    
  1740.     y = y + IgnoreList:GetTall() + 20
  1741.     ToggleOption("Active", Finder, "AHack_Entities_Active")
  1742.    
  1743.     if y > 465 then
  1744.         Finder:SetTall(y)
  1745.     end
  1746.    
  1747.     local FinderList = vgui.Create( "DPanelList" )
  1748.     FinderList:SetSize(379, 465)
  1749.     FinderList:SetSpacing(0)
  1750.     FinderList:EnableHorizontal(false)
  1751.     FinderList:EnableVerticalScrollbar(true)
  1752.     FinderList:AddItem(Finder)
  1753.    
  1754.     ColumnSheet:AddSheet("Finder", FinderList, "icon16/magnifier.png")
  1755.    
  1756.     //Starting the Misc panel
  1757.     local Misc = vgui.Create("DPanel")
  1758.     Misc:SetSize(379, 465)
  1759.     Misc.Paint = function()
  1760.         draw.RoundedBox( 0, 0, 0, Misc:GetWide(), Misc:GetTall(), Color( 240, 240, 240, 255 ) )
  1761.     end
  1762.    
  1763.     local title = vgui.Create("DLabel", Misc)
  1764.     title:SetColor(Color(0, 0, 0, 255))
  1765.     title:SetFont("CatagoryHeader")
  1766.     title:SetText("Misc")
  1767.     title:SizeToContents()
  1768.     title:SetPos(Misc:GetWide() / 2 - title:GetWide() / 2, 3)
  1769.    
  1770.     y = 40
  1771.     ToggleOption("Show Admins", Misc, "AHack_Misc_ShowAdmins")
  1772.     ToggleOption("Crosshair", Misc, "AHack_Misc_Cross")
  1773.     SetNumberOption("Corsshair Size", Misc, "AHack_Misc_CrossSize", 0, 1000, 0)
  1774.     ToggleOption("No Recoil", Misc, "AHack_Misc_NoRecoil")
  1775.     ToggleOption("Spectators", Misc, "AHack_Misc_ShowSpectators")
  1776.     ToggleOption("Auto Reload", Misc, "AHack_Misc_AutoReload")
  1777.     ToggleOption("Bunny Hop", Misc, "AHack_Misc_BunnyHop")
  1778.     SetKeyOption("Key", Misc, "AHack_Misc_BunnyHop_Key")
  1779.     ToggleOption("Auto Pistol", Misc, "AHack_Misc_AutoPistol")
  1780.     ToggleOption("Buy Health", Misc, "AHack_Misc_BuyHealth")
  1781.     SetNumberOption("Minimum", Misc, "AHack_Misc_BuyHealth_Minimum", 0, 100, 0)
  1782.     ToggleOption("Traitor Finder", Misc, "AHack_Misc_TraitorFinder")
  1783.     ToggleOption("Show Deaths", Misc, "AHack_Misc_Deaths")
  1784.     ToggleOption("Sounds", Misc, "AHack_Misc_Sounds")
  1785.  
  1786.     if y > 465 then
  1787.         Misc:SetTall(y)
  1788.     end
  1789.    
  1790.     MiscList = vgui.Create( "DPanelList" )
  1791.     MiscList:SetSize(379, 465)
  1792.     MiscList:SetSpacing(0)
  1793.     MiscList:EnableHorizontal(false)
  1794.     MiscList:EnableVerticalScrollbar(true)
  1795.     MiscList:AddItem(Misc)
  1796.  
  1797.     ColumnSheet:AddSheet("Misc", MiscList, "icon16/package.png")
  1798.    
  1799.     local function ColorOption(name, parent, tab)
  1800.         local Options = vgui.Create("DColorMixer", parent)
  1801.         Options:SetSize(150, 100)
  1802.         Options:SetPos(parent:GetWide() * 0.75 - Options:GetWide() / 2, y)
  1803.         Options:SetColor(tab.color)//AHack.GetColorFromString(GetConVar(var):GetString()))
  1804.         Options:SetWangs(false)
  1805.         Options:SetPalette(false)
  1806.         Options.ValueChanged = function(panel, color)
  1807.             AHack.Ply:ConCommand(tab.var:GetName().." ".."Color("..color.r..","..color.g..","..color.b..","..color.a..")")
  1808.             tab.color = AHack.GetColorFromString(tab.var:GetString())
  1809.         end
  1810.        
  1811.         local text = vgui.Create("DLabel", parent)
  1812.         text:SetColor(Color(0, 0, 0, 255))
  1813.         text:SetFont("CatagoryText")
  1814.         text:SetText(name)
  1815.         text:SizeToContents()
  1816.         text:SetPos(parent:GetWide() / 4 - text:GetWide() / 2, y + Options:GetTall() / 2 - text:GetTall() / 2)
  1817.        
  1818.         y = y + Options:GetTall() + 10
  1819.     end
  1820.     //Starting the Style panel
  1821.     local Style = vgui.Create("DPanel")
  1822.     Style:SetSize(379, 465)
  1823.     Style.Paint = function()
  1824.         draw.RoundedBox( 0, 0, 0, Style:GetWide(), Style:GetTall(), Color( 240, 240, 240, 255 ) )
  1825.     end
  1826.    
  1827.     local title = vgui.Create("DLabel", Style)
  1828.     title:SetColor(Color(0, 0, 0, 255))
  1829.     title:SetFont("CatagoryHeader")
  1830.     title:SetText("Style")
  1831.     title:SizeToContents()
  1832.     title:SetPos(Style:GetWide() / 2 - title:GetWide() / 2, 3)
  1833.    
  1834.     y = 50
  1835.     ColorOption("Bounding Box", Style, AHack.Style.Vars["BoundingBox"])
  1836.     ColorOption("ESP Text", Style, AHack.Style.Vars["ESPText"])
  1837.     ColorOption("Crosshair", Style, AHack.Style.Vars["Crosshair"])
  1838.     ColorOption("TTT Body Text", Style, AHack.Style.Vars["BodyText"])
  1839.     ColorOption("Chams", Style, AHack.Style.Vars["Chams"])
  1840.     ColorOption("TTT Body Chams", Style, AHack.Style.Vars["BodyChams"])
  1841.    
  1842.     if y > 465 then
  1843.         Style:SetTall(y)
  1844.     end
  1845.    
  1846.     StyleList = vgui.Create( "DPanelList" )
  1847.     StyleList:SetSize(379, 465)
  1848.     StyleList:SetSpacing(0)
  1849.     StyleList:EnableHorizontal(false)
  1850.     StyleList:EnableVerticalScrollbar(true)
  1851.     StyleList:AddItem(Style)
  1852.    
  1853.     ColumnSheet:AddSheet("Style", StyleList, "icon16/color_wheel.png")
  1854. end)
  1855.  
  1856.  
  1857. //Just some fonts
  1858. surface.CreateFont("TitleFont", {font = "Arial", size = 20})
  1859. surface.CreateFont("CatagoryHeader", {font = "CloseCaption_Normal", size = 34})
  1860. surface.CreateFont("CatagoryText", {font = "CloseCaption_Normal", size = 28})
  1861. surface.CreateFont("ESPFont", {font = "CloseCaption_Normal", weight = 1000, size = 15})
  1862.  
  1863. --[[
  1864.     DPropertySheet - Slightly edited so it looks good.
  1865. --]]
  1866. local PANEL = {}
  1867. AccessorFunc( PANEL, "ActiveButton", "ActiveButton" )
  1868.  
  1869. --[[---------------------------------------------------------
  1870. Name: Init
  1871. -----------------------------------------------------------]]
  1872. function PANEL:Init()
  1873.     self.Navigation = vgui.Create( "DScrollPanel", self )
  1874.     self.Navigation:Dock( LEFT )
  1875.     self.Navigation:SetWidth( 100 )
  1876.     self.Navigation:DockMargin( 0, 0, 10, 0 )
  1877.  
  1878.     self.Content = vgui.Create( "Panel", self )
  1879.     self.Content:Dock( FILL )
  1880.  
  1881.     self.Items = {}
  1882. end
  1883.  
  1884. function PANEL:UseButtonOnlyStyle()
  1885.     self.ButtonOnly = true
  1886. end
  1887.  
  1888. --[[---------------------------------------------------------
  1889. Name: AddSheet
  1890. -----------------------------------------------------------]]
  1891. function PANEL:AddSheet( label, panel, material )
  1892.     if ( !IsValid( panel ) ) then return end
  1893.  
  1894.     local Sheet = {}
  1895.  
  1896.     if ( self.ButtonOnly ) then
  1897.         Sheet.Button = vgui.Create( "DImageButton", self.Navigation )
  1898.     else
  1899.         Sheet.Button = vgui.Create( "DButton", self.Navigation )
  1900.     end
  1901.     Sheet.Button:SetImage( material )
  1902.     Sheet.Button.Target = panel
  1903.     Sheet.Button:Dock( TOP )
  1904.     Sheet.Button:SetText( label )
  1905.     Sheet.Button:DockMargin( 0, 0, 0, 5 )
  1906.  
  1907.     Sheet.Button.DoClick = function ()
  1908.         self:SetActiveButton( Sheet.Button )
  1909.     end
  1910.  
  1911.     Sheet.Panel = panel
  1912.     Sheet.Panel:SetParent( self.Content )
  1913.     Sheet.Panel:SetVisible( false )
  1914.  
  1915.     if ( self.ButtonOnly ) then
  1916.         Sheet.Button:SizeToContents()
  1917.         Sheet.Button:SetColor( Color( 150, 150, 150, 255 ) )
  1918.     end
  1919.  
  1920.     table.insert( self.Items, Sheet )
  1921.  
  1922.     if ( !IsValid( self.ActiveButton ) ) then
  1923.         self:SetActiveButton( Sheet.Button )
  1924.     end
  1925. end
  1926.  
  1927. --[[---------------------------------------------------------
  1928. Name: SetActiveTab
  1929. -----------------------------------------------------------]]
  1930. function PANEL:SetActiveButton( active )
  1931.     if ( self.ActiveButton == active ) then return end
  1932.  
  1933.     if ( self.ActiveButton && self.ActiveButton.Target ) then  
  1934.         self.ActiveButton.Target:SetVisible( false )
  1935.         self.ActiveButton:SetSelected( false )
  1936.         self.ActiveButton:SetColor( Color( 0, 0, 0, 255 ) )
  1937.     end
  1938.     self.ActiveButton = active
  1939.     active.Target:SetVisible( true )
  1940.     active:SetSelected( true )
  1941.     active:SetColor( Color( 150, 150, 150, 255 ) )
  1942.  
  1943.     self.Content:InvalidateLayout()
  1944. end
  1945.  
  1946. derma.DefineControl( "DColumnSheet", "", PANEL, "Panel" )
  1947.  
  1948. AHack.Message("Hack Loaded")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top