Advertisement
Guest User

Untitled

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