Advertisement
Guest User

Edited Hera Hack

a guest
May 19th, 2013
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 81.26 KB | None | 0 0
  1. --[[
  2. Copyright :: All Rights Reserved
  3. Registered :: 2013-03-01 21:30:12
  4. Title :: Troll.lua
  5. Category :: Lua file
  6. Fingerprint :: 1e26103c9e432855c65de4fb7b5455a6e369b88d790c436686f38267c7f44517
  7. MCN :: CY4Z8-E8CTL-8HNB5
  8. ]]
  9.  
  10. --[[
  11.  
  12. -================================-
  13.  
  14.  
  15. Troll v4 - A Garry's Mod aimbot [Multi-Hack]
  16.  
  17.  
  18. -================================-
  19.  
  20. ]]--
  21.  
  22.  
  23. /************************************
  24. Name: Localizing
  25. Purpose: Make the cheat run faster
  26. ************************************/
  27.  
  28. //if ( Troll ) then _G.Troll = nil end -- noob !!
  29.  
  30. local g = table.Copy(_G)
  31. local Troll = {}
  32. Troll.hooks = {}
  33. Troll.concommands = {}
  34. Troll.convars = {}
  35. Troll.timers = {}
  36. Troll.spectators = {}
  37. Troll.admins = {}
  38. Troll.version = "4.2.7"
  39. Troll.log = {}
  40. Troll.files = {"Troll.lua","log.txt","gmcl_cvar3_win32.dll","gmcl_Troll_win32.dll"}
  41. Troll.traitors = {}
  42.  
  43. Troll.bones = {
  44. {"Head", "ValveBiped.Bip01_Head1"},
  45. {"Neck", "ValveBiped.Bip01_Neck1"},
  46. {"Spine", "ValveBiped.Bip01_Spine"},
  47. {"Spine1", "ValveBiped.Bip01_Spine1"},
  48. {"Spine2", "ValveBiped.Bip01_Spine2"},
  49. {"Spine4", "ValveBiped.Bip01_Spine4"},
  50. {"Pelvis", "ValveBiped.Bip01_Pelvis"},
  51. {"R Upperarm", "ValveBiped.Bip01_R_UpperArm"},
  52. {"R Forearm", "ValveBiped.Bip01_R_Forearm"},
  53. {"R Hand", "ValveBiped.Bip01_R_Hand"},
  54. {"L Upperarm", "ValveBiped.Bip01_L_UpperArm"},
  55. {"L Forearm", "ValveBiped.Bip01_L_Forearm"},
  56. {"L Hand", "ValveBiped.Bip01_L_Hand"},
  57. {"R Thigh", "ValveBiped.Bip01_R_Thigh"},
  58. {"R Calf", "ValveBiped.Bip01_R_Calf"},
  59. {"R Foot", "ValveBiped.Bip01_R_Foot"},
  60. {"R Toes", "ValveBiped.Bip01_R_Toe0"},
  61. {"L Thigh", "ValveBiped.Bip01_L_Thigh"},
  62. {"L Calf", "ValveBiped.Bip01_L_Calf"},
  63. {"L Foot", "ValveBiped.Bip01_L_Foot"},
  64. {"L Toes", "ValveBiped.Bip01_L_Toe0"},
  65. }
  66.  
  67. Troll.espbones = {
  68. { S = "ValveBiped.Bip01_Head1", E = "ValveBiped.Bip01_Neck1" },
  69. { S = "ValveBiped.Bip01_Neck1", E = "ValveBiped.Bip01_Spine4" },
  70. { S = "ValveBiped.Bip01_Spine4", E = "ValveBiped.Bip01_Spine2" },
  71. { S = "ValveBiped.Bip01_Spine2", E = "ValveBiped.Bip01_Spine1" },
  72. { S = "ValveBiped.Bip01_Spine1", E = "ValveBiped.Bip01_Spine" },
  73. { S = "ValveBiped.Bip01_Spine", E = "ValveBiped.Bip01_Pelvis" },
  74. { S = "ValveBiped.Bip01_Spine4", E = "ValveBiped.Bip01_L_UpperArm" },
  75. { S = "ValveBiped.Bip01_L_UpperArm", E = "ValveBiped.Bip01_L_Forearm" },
  76. { S = "ValveBiped.Bip01_L_Forearm", E = "ValveBiped.Bip01_L_Hand" },
  77. { S = "ValveBiped.Bip01_Spine4", E = "ValveBiped.Bip01_R_UpperArm" },
  78. { S = "ValveBiped.Bip01_R_UpperArm", E = "ValveBiped.Bip01_R_Forearm" },
  79. { S = "ValveBiped.Bip01_R_Forearm", E = "ValveBiped.Bip01_R_Hand" },
  80. { S = "ValveBiped.Bip01_Pelvis", E = "ValveBiped.Bip01_L_Thigh" },
  81. { S = "ValveBiped.Bip01_L_Thigh", E = "ValveBiped.Bip01_L_Calf" },
  82. { S = "ValveBiped.Bip01_L_Calf", E = "ValveBiped.Bip01_L_Foot" },
  83. { S = "ValveBiped.Bip01_L_Foot", E = "ValveBiped.Bip01_L_Toe0" },
  84. { S = "ValveBiped.Bip01_Pelvis", E = "ValveBiped.Bip01_R_Thigh" },
  85. { S = "ValveBiped.Bip01_R_Thigh", E = "ValveBiped.Bip01_R_Calf" },
  86. { S = "ValveBiped.Bip01_R_Calf", E = "ValveBiped.Bip01_R_Foot" },
  87. { S = "ValveBiped.Bip01_R_Foot", E = "ValveBiped.Bip01_R_Toe0" },
  88. }
  89.  
  90. Troll.aimmodels = {
  91. ["models/combine_scanner.mdl"] = "Scanner.Body",
  92. ["models/hunter.mdl"] = "MiniStrider.body_joint",
  93. ["models/combine_turrets/floor_turret.mdl"] = "Barrel",
  94. ["models/dog.mdl"] = "Dog_Model.Eye",
  95. ["models/antlion.mdl"] = "Antlion.Body_Bone",
  96. ["models/antlion_guard.mdl"] = "Antlion_Guard.Body",
  97. ["models/antlion_worker.mdl"] = "Antlion.Head_Bone",
  98. ["models/zombie/fast_torso.mdl"] = "ValveBiped.HC_BodyCube",
  99. ["models/zombie/fast.mdl"] = "ValveBiped.HC_BodyCube",
  100. ["models/headcrabclassic.mdl"] = "HeadcrabClassic.SpineControl",
  101. ["models/headcrabblack.mdl"] = "HCBlack.body",
  102. ["models/headcrab.mdl"] = "HCFast.body",
  103. ["models/zombie/poison.mdl"] = "ValveBiped.Headcrab_Cube1",
  104. ["models/zombie/classic.mdl"] = "ValveBiped.HC_Body_Bone",
  105. ["models/zombie/classic_torso.mdl"] = "ValveBiped.HC_Body_Bone",
  106. ["models/zombie/zombie_soldier.mdl"] = "ValveBiped.HC_Body_Bone",
  107. ["models/combine_strider.mdl"] = "Combine_Strider.Body_Bone",
  108. ["models/lamarr.mdl"] = "HeadcrabClassic.SpineControl",
  109. }
  110. Troll.prediction = {
  111. ["weapon_crossbow"] = 3485,
  112. ["weapon_pistol"] = 40000,
  113. ["weapon_357"] = 20500,
  114. ["weapon_smg"] = 39000,
  115. ["weapon_ar2"] = 39000,
  116. ["weapon_shotgun"] = 35000,
  117. ["weapon_rpg"] = 0,
  118. }
  119.  
  120. Troll.props = {
  121. "models/props/de_tides/gate_large.mdl",
  122. "models/props_c17/FurnitureCouch001a.mdl",
  123. "models/props_c17/furnitureStove001a.mdl",
  124. "models/props_junk/sawblade001a.mdl",
  125. "models/props_junk/TrashDumpster01a.mdl",
  126. "models/props_combine/breendesk.mdl",
  127. "models/props_c17/Lockers001a.mdl",
  128. "models/props/de_train/lockers001a.mdl",
  129. "models/props/de_train/lockers_long.mdl",
  130. "models/props_canal/canal_bars004.mdl",
  131. "models/props_c17/FurnitureCouch001a.mdl",
  132. };
  133.  
  134. Troll.laser = {
  135. "weapon_pocket",
  136. "weapon_crowbar",
  137. "keys",
  138. "pocket",
  139. "weapon_toolgun",
  140. "weapon_physgun",
  141. "weapon_camera",
  142. "camera",
  143. }
  144.  
  145. Troll.dev = { -- for module shit
  146. "STEAM_0:0:40143824",
  147. "STEAM_0:1:58058392",
  148. }
  149.  
  150. local colors = {}
  151. red = Color(255,0,0,255);
  152. black = Color(0,0,0,255);
  153. green = Color(0,255,0,255);
  154. white = Color(255,255,255,255);
  155. blue = Color(0,0,255,255);
  156. cyan = Color(0,255,255,255);
  157. pink = Color(255,0,255,255);
  158. blue = Color(0,0,255,255);
  159. grey = Color(100,100,100,255);
  160. gold = Color(255,228,0,255);
  161. lblue = Color(155,205,248);
  162. lgreen = Color(174,255,0);
  163. iceblue = Color(116,187,251,255);
  164. local COLOR_VISIBLE = Color(0,255,0,150)
  165. local COLOR_NONVISIBLE = Color(255,0,0,150)
  166. local COLOR_FROZEN = Color(0,0,255,150)
  167. local COLOR_FROZEN_NV = Color(255,255,0,150)
  168.  
  169. local _G = table.Copy( _G )
  170. local _R = _G.debug.getregistry()
  171.  
  172. local math = _G.math
  173. local string = _G.string
  174. local hook = _G.hook
  175. local table = _G.table
  176. local timer = _G.timer
  177. local surface = _G.surface
  178. local concommand = _G.concommand
  179. local cvars = _G.cvars
  180. local ents = _G.ents
  181. local player = _G.player
  182. local team = _G.team
  183. local util = _G.util
  184. local draw = _G.draw
  185. local usermessage = _G.usermessage
  186. local vgui = _G.vgui
  187. local http = _G.http
  188. local cam = _G.cam
  189. local render = _G.render
  190.  
  191. local MsgN = _G.MsgN
  192. local Msg = _G.Msg
  193. local Vector = _G.Vector
  194. local Angle = _G.Angle
  195. local pairs = _G.pairs
  196. local ipairs = _G.ipairs
  197. local CreateSound = _G.CreateSound
  198. local setmetatable = _G.setmetatable
  199. local Sound = _G.Sound
  200. local print = _G.print
  201. local pcall = _G.pcall
  202. local type = _G.type
  203. local LocalPlayer = _G.LocalPlayer
  204. local KeyValuesToTable = _G.KeyValuesToTable
  205. local TableToKeyValues = _G.TableToKeyValues
  206. local Color = _G.Color
  207. local CreateClientConVar = _G.CreateClientConVar
  208. local ErrorNoHalt = _G.ErrorNoHalt
  209. local IsValid = _G.IsValid
  210. local CreateMaterial = _G.CreateMaterial
  211. local tonumber = _G.tonumber
  212. local tostring = _G.tostring
  213. local CurTime = _G.CurTime
  214. local FrameTime = _G.FrameTime
  215. local ScrW = _G.ScrW
  216. local ScrH = _G.ScrH
  217. local SetClipboardText = _G.SetClipboardText
  218. local GetHostName = _G.GetHostName
  219. local unpack = _G.unpack
  220. local AddConsoleCommand = _G.AddConsoleCommand
  221. local require = _G.require
  222. local include = _G.include
  223.  
  224. local MOVETYPE_OBSERVER = _G.MOVETYPE_OBSERVER
  225. local MOVETYPE_NONE = _G.MOVETYPE_NONE
  226. local TEXT_ALIGN_LEFT = _G.TEXT_ALIGN_LEFT
  227. local TEXT_ALIGN_TOP = _G.TEXT_ALIGN_TOP
  228. local TEXT_ALIGN_RIGHT = _G.TEXT_ALIGN_RIGHT
  229. local TEXT_ALIGN_BOTTOM = _G.TEXT_ALIGN_BOTTOM
  230. local IN_JUMP = _G.IN_JUMP
  231. local IN_FORWARD = _G.IN_FORWARD
  232. local IN_BACK = _G.IN_BACK
  233. local IN_MOVERIGHT = _G.IN_MOVERIGHT
  234. local IN_MOVELEFT = _G.IN_MOVELEFT
  235. local IN_SPEED = _G.IN_SPEED
  236. local IN_DUCK = _G.IN_DUCK
  237. local TEAM_SPECTATOR = 1002
  238.  
  239. -- old [copy]
  240. local old_filecdir = file.CreateDir;
  241. local old_filedel = file.Delete;
  242. local old_fileexist = file.Exists;
  243. local old_fileexistex = file.ExistsEx;
  244. local old_filefind = file.Find;
  245. local old_filefinddir = file.FindDir;
  246. local old_filefindil = file.FindInLua;
  247. local old_fileisdir = file.IsDir;
  248. local old_fileread = file.Read;
  249. local old_filerename = file.Rename;
  250. local old_filesize = file.Size;
  251. local old_filetfind = file.TFind;
  252. local old_filetime = file.Time;
  253. local old_filewrite = file.Write;
  254. local old_dbginfo = debug.getinfo;
  255. local old_dbginfo = debug.getupvalue;
  256. local old_timerc = timer.Create;
  257. local old_cve = ConVarExists;
  258. local old_gcv = GetConVar;
  259. local old_gcvn = GetConVarNumber;
  260. local old_gcvs = GetConVarString;
  261. local old_rcc = RunConsoleCommand;
  262. local old_hookadd = hook.Add;
  263. local old_hookrem = hook.Remove;
  264. local old_ccadd = concommand.Add;
  265. local old_ccrem = concommand.Remove;
  266. local old_cvaracc = cvars.AddChangeCallback;
  267. local old_cvargcvc = cvars.GetConVarCallbacks;
  268. local old_cvarchange = cvars.OnConVarChanged;
  269. local old_require = require;
  270. local old_eccommand = engineConsoleCommand;
  271. local old_rs = RunString;
  272. local old_ccmd = _R.Player.ConCommand;
  273. local old_include = include;
  274. local old_usermsginc = usermessage.IncomingMessage;
  275.  
  276. --Fonts--
  277. surface.CreateFont("ESPFont",{font = "ScoreboardText", size = 17, weight = 400, antialias = 0})
  278. surface.CreateFont("ESPFont_Small",{font = "Default", size = 12, weight = 200, antialias = 0})
  279. surface.CreateFont("Logo",{font = "akbar", size = 21, weight = 400, antialias = 0})
  280. surface.CreateFont("Troll_ScoreboardText",{font = "ScoreboardText", size = 15, weight = 700, antialias = 0})
  281. surface.CreateFont("Troll_coolvetica",{font = "coolvetica", size = 16, weight = 500, antialias = 0})
  282. surface.CreateFont("Troll_hvh",{font = "ScoreboardTextt", size = 15, weight = 1000, antialias = 1})
  283. surface.CreateFont("Troll_coolvetica2",{font = "coolvetica", size = 20, weight = 500, antialias = 1})
  284.  
  285.  
  286. ----------------
  287.  
  288. ----------------
  289.  
  290.  
  291.  
  292. --Materials--
  293. function Troll:CreateMaterial()
  294. local BaseInfo = {
  295. ["$basetexture"] = "models/debug/debugwhite",
  296. ["$model"] = 1,
  297. ["$translucent"] = 1,
  298. ["$alpha"] = 1,
  299. ["$nocull"] = 1,
  300. ["$ignorez"] = 1
  301. }
  302. local mat
  303. if GetConVarString("Troll_ESP_Chams_Material") == "Solid" then
  304. mat = CreateMaterial( "Troll_solid", "VertexLitGeneric", BaseInfo )
  305. elseif GetConVarString("Troll_ESP_Chams_Material") == "Wireframe" then
  306. mat = CreateMaterial( "Troll_wire", "Wireframe", BaseInfo )
  307. end
  308. return mat
  309. end
  310.  
  311. /*****
  312. Troll:IsDev
  313. *****/
  314. function Troll:IsDev(ply)
  315. if table.HasValue(Troll.dev,ply:SteamID()) then
  316. return true
  317. else
  318. return false
  319. end
  320. end
  321.  
  322. /*******************************************
  323. Name: Print/Chat functions
  324. Purpose: Notify the user of what's going on
  325. ********************************************/
  326. function Troll.Print(msg)
  327. print("[Troll] "..msg)
  328. end
  329.  
  330. function Troll.Notify(dosound,col,msg)
  331. if col then
  332. col = col
  333. end
  334. chat.AddText(
  335. iceblue, "[Troll] ",
  336. col, msg)
  337. if dosound == sound then
  338. local beep = Sound( "/buttons/button17.wav" )
  339. local beepsound = CreateSound( LocalPlayer(), beep )
  340. beepsound:Play()
  341. end
  342. end
  343.  
  344. /**************************************
  345. Name: Logger
  346. Purpose: Logs functions and shit
  347. **************************************/ -- ..string.char(92).."Troll"
  348. if !old_fileexist("Troll","DATA") then
  349. old_filecdir("Troll");
  350. Troll.Notify(false,lgreen,"Created directory data/Troll/")
  351. end
  352. function Troll:Log(msg)
  353. if !old_fileexist("Troll/log.txt","DATA") then
  354. Troll.Notify(false,lblue,"Started log in data/Troll/log.txt")
  355. old_filewrite("Troll/log.txt","Log started "..os.date().." \n")
  356. end
  357. table.insert(Troll.log,"["..os.date("%H:%M:%S").."]: "..msg)
  358. file.Append("Troll/log.txt","["..os.date().."]: "..msg.."\n")
  359. end
  360.  
  361. /***********************************************
  362. Name: Hook functions
  363. Purpose: Add hooks and protect from anticheats
  364. ************************************************/
  365.  
  366. -- Troll:RegisterHook
  367. function Troll:RegisterHook(Type,Function)
  368. Name = Type.." | "..math.random(1,1000),math.random(1,2000),math.random(1,3000) -- Simple hook names
  369. Troll.Print("[ADDED] Hook: ["..Type.."] | Name: "..Name.."")
  370. table.insert(Troll.hooks,Name)
  371. return old_hookadd(Type,Name,Function)
  372. end
  373.  
  374. -- Troll:RemoveHook
  375. function Troll:RemoveHook(Type,Function)
  376. Troll.Print("[REMOVED] Hook: ["..Type.."]")
  377. return old_hookrem(Type,Function)
  378. end
  379.  
  380. /**************
  381. Random String
  382. **************/
  383. function Troll:RandomString( len )
  384. local ret = ""
  385. for i = 1 , len do
  386. ret = ret .. string.char( math.random( 65 , 116 ) )
  387. end
  388. return ret
  389. end
  390.  
  391. /**********************
  392. Name: Timer shit
  393. Purpose: Anything timer
  394. ***********************/
  395. function Troll:AddTimer( sec, rep, func )
  396. local index = Troll:RandomString( 10 )
  397. Troll.timers[ index ] = sec
  398. old_timerc( index, sec, rep, func )
  399. end
  400.  
  401. /******************************************
  402. Name: ConCommand Shit
  403. Purpose: Anything related to concommands
  404. ********************************************/
  405.  
  406. function Troll:AddCMD(Name,Function)
  407. table.insert(Troll.concommands,Name)
  408. Troll.Print("[ADDED] ConCommand: "..Name)
  409. return old_ccadd(Name,Function)
  410. end
  411.  
  412. function Troll:RemoveCMD(Name)
  413. table.Empty(Troll.concommands)
  414. Troll.Print("[REMOVED] ConCommand: "..Name)
  415. return old_ccrem(Name)
  416. end
  417.  
  418. /*******************************************
  419. Name: ConVars
  420. Purpose: Anything with ConVars
  421. ********************************************/
  422.  
  423. function Troll:CreateConVar(convar,str,save,data)
  424. table.insert(Troll.convars,"Troll_"..convar)
  425. return CreateClientConVar("Troll_"..convar,str,true,false), Troll.Print("[ADDED] ConVar: Troll_"..convar.." ["..str.."]")
  426. end
  427.  
  428. /***************************************
  429. Name: RunConsoleCommand shit
  430. Purpose: Detours, Loggers, blockers
  431. ****************************************/
  432. Troll.dontlog = {
  433. "+jump",
  434. "-jump",
  435. "+attack",
  436. "-attack",
  437. "impulse"
  438. }
  439. Troll.badcmds = {
  440. "__ac",
  441. "__imacheater",
  442. "gm_possess",
  443. "__uc_", -- RIOT
  444. "_____b__c",
  445. "___m",
  446. "sc",
  447. "bg",
  448. "bm",
  449. "kickme",
  450. "gw_iamacheater",
  451. "imafaggot",
  452. "birdcage_browse",
  453. "reportmod",
  454. "_fuckme",
  455. "st_openmenu",
  456. "_NOPENOPE",
  457. "__ping",
  458. "ar_check",
  459. "GForceRecoil", -- Fake cmd, but fuck you RIOT servers
  460. "~__ac_auth",
  461. "blade_client_check",
  462. "blade_client_detected_message",
  463. "disconnect",
  464. "exit",
  465. "retry",
  466. "kill",
  467. "dac_imcheating", -- fuck u bich
  468. "dac_pleasebanme", -- fuck u bich
  469. "excl_banme", -- fuck u bitch
  470. }
  471.  
  472. /*========================================
  473.  
  474. Detours, logggers, and other shit
  475.  
  476. ==========================================*/
  477.  
  478. -- RunConsoleCommand log
  479. function RunConsoleCommand(cmd,...)
  480. if !table.HasValue(Troll.dontlog, cmd) and !table.HasValue(Troll.convars,cmd) then
  481. Troll.Print("RunConsoleCommand: "..cmd.." ["..debug.getinfo(2).short_src.."]")
  482. --Troll:Log("RunConsoleCommand: "..cmd.." ["..debug.getinfo(2).short_src.."]")
  483. table.insert(Troll.log,"["..os.date("%H:%M:%S").."]: RunConsoleCommand: "..cmd.." ["..debug.getinfo(2).short_src.."]")
  484. end
  485. if !table.HasValue(Troll.badcmds,cmd) then
  486. return old_rcc(cmd,...)
  487. else
  488. Troll.Notify(sound,red,"Blocked command: "..cmd.." ["..debug.getinfo(2).short_src.."]")
  489. Troll:Log("BLOCKED COMMAND: "..cmd.." ["..debug.getinfo(2).short_src.."]")
  490. return
  491. end
  492. end
  493.  
  494. // ConCommand log
  495. function _R.Player.ConCommand(pl,cmd)
  496. if !table.HasValue(Troll.dontlog, cmd) and !table.HasValue(Troll.concommands,cmd) and !table.HasValue(Troll.badcmds, cmd) then
  497. Troll.Print("ConCommand: "..cmd.." ["..debug.getinfo(2).short_src.."]")
  498. Troll:Log("ConCommand: "..cmd.." ["..debug.getinfo(2).short_src.."]")
  499. return old_ccmd(pl, cmd)
  500. else
  501. Troll.Notify(sound, red, "Blocked ConCommand: "..cmd.." ["..debug.getinfo(2).short_src.."]")
  502. Troll:Log("BLOCKED ConCommand: "..cmd.." ["..debug.getinfo(2).short_src.."]")
  503. return
  504. end
  505. end
  506.  
  507. // concommand.Add log
  508. function concommand.Add(cmd)
  509. if !table.HasValue(Troll.concommands, cmd) then
  510. Troll.Print("concommand.Add: "..cmd.." ["..debug.getinfo(2).short_src.."]")
  511. Troll:Log("concommand.Add: "..cmd.." ["..debug.getinfo(2).short_src.."]")
  512. end
  513. return old_ccadd(cmd)
  514. end
  515.  
  516. // concommand.Remove log
  517. function concommand.Remove(cmd)
  518. if !table.HasValue(Troll.concommands, cmd) then
  519. Troll.Print("concommand.Remove: "..cmd.." ["..debug.getinfo(2).short_src.."]")
  520. Troll:Log("concommand.Remove: "..cmd.." ["..debug.getinfo(2).short_src.."]")
  521. end
  522. return old_ccrem(cmd)
  523. end
  524.  
  525. // RunString log
  526. function RunString(s)
  527. Troll.Print("RunString: "..tostring(s).." ["..debug.getinfo(2).short_src.."]")
  528. Troll:Log("RunString: "..tostring(s).." ["..debug.getinfo(2).short_src.."]")
  529. return old_rs(s)
  530. end
  531.  
  532. // include log
  533. /*
  534. function include(fn)
  535. if !table.HasValue(Troll.files, fn) then
  536. Troll.Print("Include: "..fn.." ["..debug.getinfo(2).short_src.."]")
  537. Troll:Log("Include: "..fn.." ["..debug.getinfo(2).short_src.."]")
  538. return old_include(fn)
  539. else
  540. Troll.Print("BLOCKED Include: "..fn.." ["..debug.getinfo(2).short_src.."]")
  541. Troll:Log("BLOCKED Include: "..fn.." ["..debug.getinfo(2).short_src.."]")
  542. return;
  543. end
  544. end
  545. */
  546.  
  547. // file.Delete log
  548. function file.Delete(fn)
  549. if !table.HasValue(Troll.files, fn) then
  550. Troll.Print("file.Delete: "..fn.." ["..debug.getinfo(2).short_src.."]")
  551. Troll:Log("file.Delete: "..fn.." ["..debug.getinfo(2).short_src.."]")
  552. return old_filedel(fn)
  553. else
  554. Troll.Print("BLOCKED file.Delete: "..fn.." ["..debug.getinfo(2).short_src.."]")
  555. Troll:Log("BLOCKED file.Delete: "..fn.." ["..debug.getinfo(2).short_src.."]")
  556. return;
  557. end
  558. end
  559.  
  560. // file.Exists log
  561. function file.Exists(fn, ad)
  562. if !table.HasValue(Troll.files, fn) then
  563. Troll.Print("file.Exists: "..fn.." ["..debug.getinfo(2).short_src.."]")
  564. Troll:Log("file.Exists: "..fn.." ["..debug.getinfo(2).short_src.."]")
  565. return old_fileexist(fn, ad)
  566. else
  567. Troll.Print("BLOCKED file.Exists: "..fn.." ["..debug.getinfo(2).short_src.."]")
  568. Troll:Log("BLOCKED file.Exists: "..fn.." ["..debug.getinfo(2).short_src.."]")
  569. return;
  570. end
  571. end
  572.  
  573. // file.Find log
  574. function file.Find(fn)
  575. if !table.HasValue(Troll.files, fn) then
  576. Troll.Print("file.Find: "..fn.." ["..debug.getinfo(2).short_src.."]")
  577. Troll:Log("file.Find: "..fn.." ["..debug.getinfo(2).short_src.."]")
  578. return old_filefind(fn)
  579. else
  580. Troll.Print("BLOCKED file.Find: "..fn.." ["..debug.getinfo(2).short_src.."]")
  581. Troll:Log("BLOCKED file.Find: "..fn.." ["..debug.getinfo(2).short_src.."]")
  582. return;
  583. end
  584. end
  585.  
  586. // file.Read log
  587. function file.Read(fn, ad)
  588. if !table.HasValue(Troll.files, fn) then
  589. Troll.Print("file.Read: "..fn.." ["..debug.getinfo(2).short_src.."]")
  590. Troll:Log("file.Read: "..fn.." ["..debug.getinfo(2).short_src.."]")
  591. return old_fileread(fn, ad)
  592. else
  593. Troll.Print("BLOCKED file.Read: "..fn.." ["..debug.getinfo(2).short_src.."]")
  594. Troll:Log("BLOCKED file.Read: "..fn.." ["..debug.getinfo(2).short_src.."]")
  595. return;
  596. end
  597. end
  598.  
  599. // file.Write log
  600. function file.Write(fn, data)
  601. Troll.Print("file.Write: "..fn.." ["..debug.getinfo(2).short_src.."]")
  602. Troll:Log("file.Write: "..fn.." ["..debug.getinfo(2).short_src.."]")
  603. return old_filewrite(fn, data)
  604. end
  605.  
  606. // timer.Create log (useless)
  607. function timer.Create( index, sec, rep, func)
  608. Troll.Print("timer.Create: "..index.." ["..debug.getinfo(2).short_src.."]")
  609. Troll:Log("timer.Create: "..index.." ["..debug.getinfo(2).short_src.."]")
  610. return old_timerc( index, sec, rep, func )
  611. end
  612.  
  613. // usermessage.IncomingMessage log
  614. /*
  615. function usermessage.IncomingMessage(name, um, ...)
  616. if ( name == "ttt_role" ) then
  617. for k , v in pairs( Troll.traitors ) do
  618. Troll.traitors = {}
  619. end
  620. end
  621. Troll.Print("usermessage.IncomingMessage: "..name.." ["..debug.getinfo(2).short_src.."]")
  622. Troll:Log("usermessage.IncomingMessage: "..name.." ["..debug.getinfo(2).short_src.."]")
  623. return old_usermsginc(name, um, ...);
  624. end
  625. */
  626.  
  627. // ConVarExists log
  628. function ConVarExists(cvar)
  629. if !table.HasValue(Troll.convars,cvar) then
  630. Troll.Print("ConVarExists: "..cvar.." ["..debug.getinfo(2).short_src.."]")
  631. Troll:Log("ConVarExists: "..cvar.." ["..debug.getinfo(2).short_src.."]")
  632. return old_cve(cvar)
  633. else
  634. Troll.Print("BLOCKED ConVarExists: "..cvar.." ["..debug.getinfo(2).short_src.."]")
  635. Troll:Log("BLOCKED ConVarExists: "..cvar.." ["..debug.getinfo(2).short_src.."]")
  636. return;
  637. end
  638. end
  639.  
  640.  
  641. /**************************
  642. Name: Derma shit
  643. Purpose: Anything Derma
  644. ***************************/
  645. function Troll:AddCheckBox( text, cvar, parent, x, y, tt )
  646. local checkbox = vgui.Create( "DCheckBoxLabel", parent )
  647. checkbox:SetPos( x, y )
  648. checkbox:SetText( text )
  649. checkbox:SetConVar( cvar )
  650. checkbox:SetTextColor(white)
  651. checkbox:SetTooltip( tt or "No Tool Tip" )
  652. checkbox:SizeToContents()
  653. end
  654.  
  655. // Troll:AddSlider for the derma
  656. function Troll:AddSlider( text, cvar, parent, min, max, decimals, x, y, wide, tt )
  657. local slider = vgui.Create( "DNumSlider" )
  658. slider:SetParent( parent )
  659. slider:SetPos( x, y )
  660. slider:SetWide( wide )
  661. slider:SetText( text )
  662. --slider:SetTextColor(BLACK)
  663. slider:SetMin( min )
  664. slider:SetMax( max )
  665. slider:SetDecimals( decimals )
  666. slider:SetConVar( cvar )
  667. slider:SetTooltip( tt or "No Tool Tip" )
  668. end
  669.  
  670. Gradient = surface.GetTextureID( "gui/gradient" )
  671. function Troll:DrawBox( x, y, wide, tall, dropsize )
  672. draw.RoundedBoxEx( 4, x, y, wide, dropsize, iceblue, true, true, false, false )
  673. draw.RoundedBoxEx( 4, x, y + dropsize, wide, tall - dropsize, Color( 0, 0, 0, 100 ), false, false, true, true )
  674. end
  675.  
  676. /*************************
  677. Name: CreatePos
  678. Purpose: Create a position
  679. Credits: BaconBot
  680. ***************************/
  681. function Troll:CreatePos(v)
  682. local ply = LocalPlayer()
  683. local ang = Angle( 0, LocalPlayer():EyeAngles().y, 0 )
  684. local nom = v:GetPos()
  685. local center = v:LocalToWorld( v:OBBCenter() )
  686. local min, max = v:OBBMins(), v:OBBMaxs()
  687. local dim = max - min local z = max + min
  688. local frt = ( v:GetForward() ) * ( dim.y / 2 )
  689. local rgt = ( v:GetRight() ) * ( dim.x / 2 )
  690. local top = ( v:GetUp() ) * ( dim.z / 2 )
  691. local bak = ( v:GetForward() * -1 ) * ( dim.y / 2 )
  692. local lft = ( v:GetRight() * -1 ) * ( dim.x / 2 )
  693. local btm = ( v:GetUp() * -1 ) * ( dim.z / 2 )
  694. local s = 1
  695. local FRT = center + frt / s + rgt / s + top / s; FRT = FRT:ToScreen()
  696. local BLB = center + bak / s + lft / s + btm / s; BLB = BLB:ToScreen()
  697. local FLT = center + frt / s + lft / s + top / s; FLT = FLT:ToScreen()
  698. local BRT = center + bak / s + rgt / s + top / s; BRT = BRT:ToScreen()
  699. local BLT = center + bak / s + lft / s + top / s; BLT = BLT:ToScreen()
  700. local FRB = center + frt / s + rgt / s + btm / s; FRB = FRB:ToScreen()
  701. local FLB = center + frt / s + lft / s + btm / s; FLB = FLB:ToScreen()
  702. local BRB = center + bak / s + rgt / s + btm / s; BRB = BRB:ToScreen()
  703. local z = 100
  704. if ( v:Health() <= 50 ) then z = 100 end
  705. local x, y = ( ( v:Health() / 100 ) ), 1
  706. if ( v:Health() <= 0 ) then x = 1 end
  707. local FRT3 = center + frt + rgt + top / x; FRT3 = FRT3; FRT3 = FRT3:ToScreen()
  708. local BLB3 = center + bak + lft + btm / x; BLB3 = BLB3; BLB3 = BLB3:ToScreen()
  709. local FLT3 = center + frt + lft + top / x; FLT3 = FLT3; FLT3 = FLT3:ToScreen()
  710. local BRT3 = center + bak + rgt + top / x; BRT3 = BRT3; BRT3 = BRT3:ToScreen()
  711. local BLT3 = center + bak + lft + top / x; BLT3 = BLT3; BLT3 = BLT3:ToScreen()
  712. local FRB3 = center + frt + rgt + btm / x; FRB3 = FRB3; FRB3 = FRB3:ToScreen()
  713. local FLB3 = center + frt + lft + btm / x; FLB3 = FLB3; FLB3 = FLB3:ToScreen()
  714. local BRB3 = center + bak + rgt + btm / x; BRB3 = BRB3; BRB3 = BRB3:ToScreen()
  715. local x, y, z = 1.1, 0.9, 1
  716. local FRT2 = center + frt / y + rgt / z + top / x; FRT2 = FRT2:ToScreen()
  717. local BLB2 = center + bak / y + lft / z + btm / x; BLB2 = BLB2:ToScreen()
  718. local FLT2 = center + frt / y + lft / z + top / x; FLT2 = FLT2:ToScreen()
  719. local BRT2 = center + bak / y + rgt / z + top / x; BRT2 = BRT2:ToScreen()
  720. local BLT2 = center + bak / y + lft / z + top / x; BLT2 = BLT2:ToScreen()
  721. local FRB2 = center + frt / y + rgt / z + btm / x; FRB2 = FRB2:ToScreen()
  722. local FLB2 = center + frt / y + lft / z + btm / x; FLB2 = FLB2:ToScreen()
  723. local BRB2 = center + bak / y + rgt / z + btm / x; BRB2 = BRB2:ToScreen()
  724. local maxX = math.max( FRT.x,BLB.x,FLT.x,BRT.x,BLT.x,FRB.x,FLB.x,BRB.x )
  725. local minX = math.min( FRT.x,BLB.x,FLT.x,BRT.x,BLT.x,FRB.x,FLB.x,BRB.x )
  726. local maxY = math.max( FRT.y,BLB.y,FLT.y,BRT.y,BLT.y,FRB.y,FLB.y,BRB.y )
  727. local minY = math.min( FRT.y,BLB.y,FLT.y,BRT.y,BLT.y,FRB.y,FLB.y,BRB.y )
  728. local minYhp2 = math.min( FRT.y,BLB.y,FLT.y,BRT.y,BLT.y,FRB.y,FLB.y,BRB.y )
  729. local maxXhp = math.max( FRT3.x,BLB3.x,FLT3.x,BRT3.x,BLT3.x,FRB3.x,FLB3.x,BRB3.x )
  730. local minXhp = math.min( FRT3.x,BLB3.x,FLT3.x,BRT3.x,BLT3.x,FRB3.x,FLB3.x,BRB3.x )
  731. local maxYhp = math.max( FRT3.y,BLB3.y,FLT3.y,BRT3.y,BLT3.y,FRB3.y,FLB3.y,BRB3.y )
  732. local minYhp = math.min( FRT3.y,BLB3.y,FLT3.y,BRT3.y,BLT3.y,FRB3.y,FLB3.y,BRB3.y )
  733. local maxX2 = math.max( FRT2.x,BLB2.x,FLT2.x,BRT2.x,BLT2.x,FRB2.x,FLB2.x,BRB2.x )
  734. local minX2 = math.min( FRT2.x,BLB2.x,FLT2.x,BRT2.x,BLT2.x,FRB2.x,FLB2.x,BRB2.x )
  735. local maxY2 = math.max( FRT2.y,BLB2.y,FLT2.y,BRT2.y,BLT2.y,FRB2.y,FLB2.y,BRB2.y )
  736. local minY2 = math.min( FRT2.y,BLB2.y,FLT2.y,BRT2.y,BLT2.y,FRB2.y,FLB2.y,BRB2.y )
  737. local mon = nom + Vector( 0, 0, LocalPlayer():OBBMaxs()[3] )
  738. local BOXPOS1 = Vector( 16, 16, 0 )
  739. BOXPOS1:Rotate( ang )
  740. BOXPOS1 = ( nom + BOXPOS1 ):ToScreen()
  741. local BOXPOS2 = Vector( 16, -16, 0 )
  742. BOXPOS2:Rotate( ang )
  743. BOXPOS2 = ( nom + BOXPOS2 ):ToScreen()
  744. local BOXPOS3 = Vector( -16, -16, 0 )
  745. BOXPOS3:Rotate( ang )
  746. BOXPOS3 = ( nom + BOXPOS3 ):ToScreen()
  747. local BOXPOS4 = Vector( -16, 16, 0 )
  748. BOXPOS4:Rotate( ang )
  749. BOXPOS4 = ( nom + BOXPOS4 ):ToScreen()
  750. local BOXPOS5 = Vector( 16, 16, 0 )
  751. BOXPOS5:Rotate( ang )
  752. BOXPOS5 = ( mon + BOXPOS5 ):ToScreen()
  753. local BOXPOS6 = Vector( 16, -16, 0 )
  754. BOXPOS6:Rotate( ang )
  755. BOXPOS6 = ( mon + BOXPOS6 ):ToScreen()
  756. local BOXPOS7 = Vector( -16, -16, 0 )
  757. BOXPOS7:Rotate( ang )
  758. BOXPOS7 = ( mon + BOXPOS7 ):ToScreen()
  759. local BOXPOS8 = Vector( -16, 16, 0 )
  760. BOXPOS8:Rotate( ang )
  761. BOXPOS8 = ( mon + BOXPOS8 ):ToScreen()
  762. return maxX, minX, maxY, minY, maxX2, minX2, maxY2, minY2, minYhp, maxYhp, BOXPOS1, BOXPOS2, BOXPOS3, BOXPOS4, BOXPOS5, BOXPOS6, BOXPOS7, BOXPOS8
  763. end
  764.  
  765.  
  766. /**************************
  767. Name: GetServerGM
  768. Purpose: Check server's GM
  769. ***************************/
  770.  
  771. function GetServerGM( notify,name )
  772. if notify == true then
  773. Troll.Print("This server is using the gamemode '"..GAMEMODE.Name.."'.")
  774. end
  775. if ( string.find( string.lower( GAMEMODE.Name ), name ) ) then
  776. return true
  777. end
  778. return false
  779. end
  780.  
  781. /*************************************
  782. Name: PlayerVisible
  783. Purpose: Check if a player is visible
  784. *************************************/
  785. local function CanSee(ent)
  786. local tr = {};
  787. tr.start = LocalPlayer():GetShootPos();
  788. tr.endpos = ent:GetPos() + Vector(0, 0, 5)
  789. tr.filter = {LocalPlayer(), ent};
  790. tr.mask = MASK_SHOT;
  791. local trace = util.TraceLine(tr) ;
  792. if (trace.Fraction == 1) then
  793. return true;
  794. else
  795. return false;
  796. end
  797. end
  798.  
  799. /**********************************
  800. Name: GetColors
  801. Purpose: Make a cool color!
  802. ***********************************/
  803. local function GetColorCrosshair()
  804. if LocalPlayer():GetEyeTrace().Entity:IsPlayer() then
  805. return 0,255,0,255
  806. end
  807. if LocalPlayer():GetEyeTrace().Entity:IsNPC() then
  808. return 0,0,255,255
  809. end
  810. return team.GetColor(LocalPlayer():Team())
  811. end
  812.  
  813. local function GetColorVisible(e)
  814. if CanSee(e) then
  815. return 0,255,0,255
  816. end
  817. if !CanSee(e) then
  818. return 255,0,0,255
  819. end
  820. end
  821.  
  822. /*********************
  823. Name: IsVehicle
  824. Purpose: Find vehicles
  825. *********************/
  826. function Troll.IsVehicle( e )
  827. local ply = LocalPlayer()
  828. if ( string.find( e:GetClass(), "prop_vehicle_" ) && ply:GetMoveType() ~= 0 ) then
  829. return true
  830. end
  831. return false
  832. end
  833.  
  834. /***************************
  835. Name: SetColors
  836. Purpose: Set Colors
  837. ****************************/
  838. function Troll:IsCustomEnt( entclass )
  839. return table.HasValue( Troll.ents, entclass )
  840. end
  841.  
  842. function SetColors(e)
  843. local ply, class, model = LocalPlayer(), e:GetClass(), e:GetModel()
  844. local col
  845. if ( e:IsPlayer() ) then
  846. col = Color(0,255,0,255)
  847. elseif ( e:IsNPC() ) then
  848. col = Color( 255, 0, 0, 20 )
  849. elseif Troll:IsCustomEnt( e:GetClass() ) then
  850. col = Color( 0, 200, 255, 50 )
  851. else
  852. col = Color( 255, 255, 255, 255 )
  853. end
  854. return col
  855. end
  856.  
  857. /******************************
  858. Name: Get Admin Type
  859. Purpose: Get Admin Type..
  860. *******************************/
  861. local function GetAdminType(e)
  862. if e:IsAdmin() && !e:IsSuperAdmin() then
  863. return " [A] "
  864. elseif( e:IsSuperAdmin() ) then
  865. return " [SA] "
  866. end
  867. return " "
  868. end
  869.  
  870. function Troll:CheckUpdate()
  871. Troll.Print("Checking cheat version...")
  872. http.Fetch("https://dl.dropbox.com/u/150309237/Troll/version.txt", function(body, len, headers, code)
  873. if body == Troll.version then
  874. Troll.Notify(sound,green,"Your version of Troll is up to date! You are currently running veresion "..Troll.version)
  875. else
  876. Troll.Notify(sound,red,"Your version of Troll is outdated! Please update to version "..body)
  877. end
  878. end)
  879. end
  880. Troll:CheckUpdate()
  881.  
  882. function Troll:DoUpdate()
  883. Troll.Notify(false,green, "Please visit https://dl.dropbox.com/u/150309237/Troll/Troll.lua for the latest update of the cheat.")
  884. end
  885.  
  886. /****************************
  887. Name: Create ConVars
  888. Purpose: Create ConVars..
  889. *****************************/
  890.  
  891. Troll:CreateConVar("ESP_Info",0)
  892. Troll:CreateConVar("ESP_Box",0)
  893. Troll:CreateConVar("ESP_Box_Type","3d")
  894. Troll:CreateConVar("ESP_Skeleton",0)
  895. Troll:CreateConVar("ESP_Laser",0)
  896. Troll:CreateConVar("ESP_Crosshair",0)
  897. Troll:CreateConVar("ESP_Crosshair_Type","Swastika")
  898. Troll:CreateConVar("ESP_Chams",0)
  899. Troll:CreateConVar("ESP_Chams_Material","Solid")
  900. Troll:CreateConVar("ESP_Ents",0)
  901. Troll:CreateConVar("ESP_Distance",1000)
  902. Troll:CreateConVar("ESP_Info_Type","info")
  903. Troll:CreateConVar("ESP_Text","outlined")
  904. Troll:CreateConVar("ESP_XRay",0)
  905. Troll:CreateConVar("ESP_PropTrace",0)
  906. Troll:CreateConVar("ESP_HealthBar",0)
  907.  
  908. Troll:CreateConVar("MISC_Bunnyhop",0)
  909. Troll:CreateConVar("MISC_TTT",0)
  910. Troll:CreateConVar("MISC_ChatSpam",0)
  911. Troll:CreateConVar("MISC_ChatSpam_Msg","visit www.sethhack.seth.im.me.co.cc.net.org.dk.uk.com.gov")
  912. Troll:CreateConVar("MISC_AntiAFK",0)
  913. Troll:CreateConVar("MISC_CSNoclip",0)
  914. Troll:CreateConVar("MISC_CSNoclip_Speed",10)
  915. Troll:CreateConVar("MISC_Thirdperson",0)
  916. Troll:CreateConVar("MISC_RPGod",0)
  917. Troll:CreateConVar("MISC_Namechanger",0)
  918. Troll:CreateConVar("MISC_ShowNotifications",0)
  919. Troll:CreateConVar("MISC_SpeedHack_Speed",3.5)
  920. Troll:CreateConVar("MISC_ShowSpec",0)
  921. Troll:CreateConVar("MISC_ShowAdmins",0)
  922. Troll:CreateConVar("MISC_Thirdperson_dist",200)
  923. Troll:CreateConVar("MISC_Flashlight",0)
  924. Troll:CreateConVar("MISC_Fullbright",0)
  925. Troll:CreateConVar("MISC_RemoveSkybox",0)
  926. Troll:CreateConVar("MISC_NoHands",0)
  927.  
  928. Troll:CreateConVar("AIM_Friendly",0)
  929. Troll:CreateConVar("AIM_Steam",0)
  930. Troll:CreateConVar("AIM_Admins",0)
  931. Troll:CreateConVar("AIM_Auto",0)
  932. Troll:CreateConVar("AIM_NoRecoil",0)
  933. Troll:CreateConVar("AIM_Offset",0)
  934. Troll:CreateConVar("AIM_AimSpot","Head")
  935. Troll:CreateConVar("AIM_Trigger",0)
  936. Troll:CreateConVar("AIM_SH",0)
  937. Troll:CreateConVar("AIM_Anti",0)
  938. Troll:CreateConVar("AIM_Anti_Type","Invert")
  939. Troll:CreateConVar("AIM_Anti_Angle_X","-181")
  940. Troll:CreateConVar("AIM_Anti_Angle_Z","180")
  941. Troll:CreateConVar("AIM_AntiSnap",0)
  942. Troll:CreateConVar("AIM_AntiSnap_Speed",5)
  943. Troll:CreateConVar("AIM_Fov",180)
  944. Troll:CreateConVar("AIM_Reload",0)
  945. Troll:CreateConVar("AIM_TargetBones",0)
  946. Troll:CreateConVar("AIM_CheckLos",0)
  947. Troll:CreateConVar("AIM_IgnoreNoWep",0)
  948. Troll:CreateConVar("AIM_Prediction",0)
  949. Troll:CreateConVar("AIM_SpawnProtection",0)
  950. //Troll:CreateConVar("AIM_AutoWall",0)
  951. Troll:CreateConVar("MISC_RapidFire",0)
  952. Troll:CreateConVar("AIM_Method","Distance")
  953. Troll:CreateConVar("AIM_Silent",0)
  954. Troll:CreateConVar("AIM_AAA",0)
  955.  
  956. /***********************************
  957. concommands to find entities and shit
  958. **************************************/
  959.  
  960. Troll:AddCMD("_ents",function()
  961. PrintTable(ents.GetAll())
  962. end)
  963.  
  964. /**********************
  965. Set some ConVars to 0
  966. **********************/
  967. old_rcc("Troll_MISC_ChatSpam","0")
  968. old_rcc("Troll_MISC_CSNoclip","0")
  969. old_rcc("Troll_MISC_NameChanger","0")
  970.  
  971.  
  972. --[[
  973. CHAMS
  974. ]]--
  975.  
  976. -- OnScreen and IsCloseEnough check
  977. function OnScreen(ent)
  978. local a, f = debug.getregistry().Player["GetAimVector"](LocalPlayer()):Angle() - (ent:GetPos() - LocalPlayer():GetShootPos()):Angle(), debug.getregistry().Player["GetFOV"](LocalPlayer())
  979. return (math.NormalizeAngle(a.y) < f + 2 && math.NormalizeAngle(a.p) < f + 2)
  980. end
  981. function IsCloseEnough(ent)
  982. local dist = ent:GetPos():Distance( LocalPlayer():GetPos() )
  983. if( dist <= GetConVarNumber("Troll_ESP_Distance") and ent:GetPos() != Vector( 0, 0, 0 ) ) then
  984. return true
  985. end
  986. return false
  987. end
  988.  
  989. function Chams()
  990. local mat = Troll:CreateMaterial()
  991. if GetConVarNumber("Troll_ESP_Chams") == 1 then
  992. for k,v in pairs(ents.GetAll()) do
  993. local col;
  994. if IsValid(v) and (IsCloseEnough(v) and v:IsPlayer() and v:Alive() and v:Health() > 0) or (IsCloseEnough(v) and v:IsWeapon()) or (IsCloseEnough(v) and v:IsNPC()) then
  995. if (v:IsPlayer()) then
  996. col = team.GetColor(v:Team())
  997. elseif (v:IsWeapon()) then
  998. col = Color(255,0,0,255)
  999. elseif (v:IsNPC()) then
  1000. col = Color(0,255,0,255)
  1001. else
  1002. col = Color(255,255,255,255)
  1003. end
  1004. cam.Start3D(EyePos(),EyeAngles())
  1005. //render.SuppressEngineLighting( true )
  1006. render.SetColorModulation(col.r / 255, col.g / 255, col.b / 255);
  1007. render.SetBlend(col.a / 255);
  1008. render.MaterialOverride( mat )
  1009. v:DrawModel()
  1010. //render.SuppressEngineLighting( false )
  1011. render.SetColorModulation(1,1,1)
  1012. render.MaterialOverride( )
  1013. v:DrawModel()
  1014. cam.End3D()
  1015. end
  1016. end
  1017. end
  1018. end
  1019.  
  1020. --[[
  1021. ESP
  1022. ]]--
  1023.  
  1024. Troll.ents = { -- ents to be picked up by entity esp, add more if you want.
  1025. "ent_pot",
  1026. "npc_vendor",
  1027. "weapon_perp_glock",
  1028. "ent_item",
  1029. "ent_prop_item",
  1030. "sent_spawnpoint",
  1031. "spawned_weapon",
  1032. "spawned_shipment",
  1033. "weed_plant",
  1034. "gift",
  1035. "spawned_money",
  1036. "base_item",
  1037. "weapon_ak47_dayz",
  1038. "weapon_mp5_dayz",
  1039. "weapon_deagle_dayz",
  1040. "sapphire_money_printer",
  1041. "amethyst_money_printer",
  1042. "topaz_money_printer",
  1043. "emerald_money_printer",
  1044. "msc_scrapnug",
  1045. "food_rawant",
  1046. "ent_resource",
  1047. "food_rawhead",
  1048. "gmodz_item", -- TPS DayZ
  1049. "drug_plant",
  1050. }
  1051.  
  1052. local function GetBoxColor(e)
  1053. local LockedTarg = GetTargets();
  1054. if Aimon == 1 and LockedTarg != nil and LockedTarg == e then
  1055. return Color(0,0,255)
  1056. elseif CanSee(e) then
  1057. return Color(0,255,0)
  1058. elseif !CanSee(e) then
  1059. return Color(255,0,0)
  1060. else
  1061. return Color(255,255,255)
  1062. end
  1063. end
  1064.  
  1065. function ESP()
  1066. for k, e in pairs( player.GetAll() ) do
  1067. local TeamColor = team.GetColor(e:Team())
  1068. local HPColor;
  1069. local Dist = e:GetPos():Distance(LocalPlayer():GetPos());
  1070. local wep = "Unknown"
  1071. local SteamID = e:SteamID()
  1072. local Name = e:Nick()
  1073. local InfoCol = white
  1074. local maxX, minX, maxY, minY, maxX2, minX2, maxY2, minY2, minYhp, maxYhp, BOXPOS1, BOXPOS2, BOXPOS3, BOXPOS4, BOXPOS5, BOXPOS6, BOXPOS7, BOXPOS8 = Troll:CreatePos( e )
  1075. if( e:Health() <= 100 ) then
  1076. HPColor = Color( 255, e:Health() * 2.55, e:Health() * 2.55, 255 ); // thanks fr1kin/stgn
  1077. else
  1078. HPColor = white
  1079. end
  1080.  
  1081. -- AIMBOT SHIT --
  1082.  
  1083. -- WATERMARK --
  1084. function Troll:PulsateColor(col)
  1085. return (math.cos(CurTime()*col)+1)/2
  1086. end
  1087. --draw.SimpleTextOutlined("Troll v"..Troll.version,"Logo",1285,15,Color( 0, 255, Troll:PulsateColor(3)*255, 255 ),4,1,1,black)
  1088.  
  1089. if ( e:IsPlayer() && e:Alive() && e != LocalPlayer() ) then
  1090. if e:GetActiveWeapon() != nil then
  1091. if type(e:GetActiveWeapon()) == "Weapon" then
  1092. if e:GetActiveWeapon() and e:GetActiveWeapon():IsValid() then
  1093. wep = e:GetActiveWeapon():GetPrintName()
  1094.  
  1095. -- ESP INFO --
  1096. if GetConVarNumber("Troll_ESP_Info") == 1 && IsCloseEnough(e) then
  1097. if GetConVarString("Troll_ESP_Text") == "outlined" then
  1098. draw.SimpleTextOutlined( Name..GetAdminType(e), "Troll_coolvetica", maxX2, minY2, TeamColor,4,1,1,Color(0,0,0))
  1099. draw.SimpleTextOutlined( "H: " .. e:Health(), "ESPFont_Small", maxX2, minY2 + 10, HPColor, 4,1, 1, black )
  1100. draw.SimpleTextOutlined( "D: " .. math.floor(Dist), "ESPFont_Small", maxX2, minY2 + 20, InfoCol, 4, 1, 1, black )
  1101. draw.SimpleTextOutlined( "W: " .. wep, "ESPFont_Small", maxX2, minY2 + 30, InfoCol, 4, 1, 1, black)
  1102. elseif GetConVarString("Troll_ESP_Text") == "normal" then
  1103. draw.SimpleTextOutlined( Name..GetAdminType(e), "Troll_coolvetica", maxX2, minY2, TeamColor,4,1,1,Color(0,0,0))
  1104. draw.SimpleText( "H: " .. e:Health(), "ESPFont_Small", maxX2, minY2 + 10, HPColor, 4, 1 )
  1105. draw.SimpleText( "D: " .. math.floor(Dist), "ESPFont_Small", maxX2, minY2 + 20, InfoCol, 4, 1 )
  1106. draw.SimpleText( "W: " .. wep, "ESPFont_Small", maxX2, minY2 + 30, InfoCol, 4, 1 )
  1107. end
  1108. if e:GetFriendStatus() == "friend" then
  1109. draw.SimpleTextOutlined( "[Friend]", "ESPFont_Small", maxX2, minY2 - 10, iceblue, 4, 1,1,black)
  1110. end
  1111. end
  1112.  
  1113. -- ESP BOX --
  1114. if GetConVarNumber("Troll_ESP_Box") == 1 && IsCloseEnough(e) then
  1115. if GetConVarString("Troll_ESP_Box_Type") == "2d" then
  1116. surface.SetDrawColor(GetBoxColor(e))
  1117. surface.DrawLine( maxX, maxY, maxX, minY )
  1118. surface.DrawLine( maxX, minY, minX, minY )
  1119. surface.DrawLine( minX, minY, minX, maxY )
  1120. surface.DrawLine( minX, maxY, maxX, maxY )
  1121. elseif GetConVarString("Troll_ESP_Box_Type") == "3d" then
  1122. surface.SetDrawColor(GetBoxColor(e))
  1123. -- thanks nano
  1124. surface.DrawLine( BOXPOS1.x, BOXPOS1.y, BOXPOS2.x, BOXPOS2.y )
  1125. surface.DrawLine( BOXPOS2.x, BOXPOS2.y, BOXPOS3.x, BOXPOS3.y )
  1126. surface.DrawLine( BOXPOS3.x, BOXPOS3.y, BOXPOS4.x, BOXPOS4.y )
  1127. surface.DrawLine( BOXPOS4.x, BOXPOS4.y, BOXPOS1.x, BOXPOS1.y )
  1128.  
  1129. surface.DrawLine( BOXPOS5.x, BOXPOS5.y, BOXPOS6.x, BOXPOS6.y )
  1130. surface.DrawLine( BOXPOS6.x, BOXPOS6.y, BOXPOS7.x, BOXPOS7.y )
  1131. surface.DrawLine( BOXPOS7.x, BOXPOS7.y, BOXPOS8.x, BOXPOS8.y )
  1132. surface.DrawLine( BOXPOS8.x, BOXPOS8.y, BOXPOS5.x, BOXPOS5.y )
  1133.  
  1134. surface.DrawLine( BOXPOS1.x, BOXPOS1.y, BOXPOS5.x, BOXPOS5.y )
  1135. surface.DrawLine( BOXPOS2.x, BOXPOS2.y, BOXPOS6.x, BOXPOS6.y )
  1136. surface.DrawLine( BOXPOS3.x, BOXPOS3.y, BOXPOS7.x, BOXPOS7.y )
  1137. surface.DrawLine( BOXPOS4.x, BOXPOS4.y, BOXPOS8.x, BOXPOS8.y )
  1138. end
  1139. end
  1140. -- ESP SKELETON --
  1141. if GetConVarNumber("Troll_ESP_Skeleton") == 1 && IsCloseEnough(e) then
  1142. for k, v in pairs( Troll.espbones ) do
  1143. local sPos, ePos = e:GetBonePosition( e:LookupBone( v.S ) ):ToScreen(), e:GetBonePosition( e:LookupBone( v.E ) ):ToScreen()
  1144. if e:IsPlayer() and !e:IsNPC() then
  1145. surface.SetDrawColor(team.GetColor(e:Team()))
  1146. end
  1147. surface.DrawLine(sPos.x,sPos.y,ePos.x,ePos.y)
  1148. end
  1149. end
  1150. -- ESP TRACER --
  1151. if GetConVarNumber("Troll_ESP_Laser") == 1 and LocalPlayer():Alive() then
  1152. local LaserColor = Color(255,0,0,255)
  1153. if Aimon == 1 and LockedTarg != nil and LockedTarg != LocalPlayer() then
  1154. LaserColor = Color(0,255,0,255)
  1155. else
  1156. LaserColor = LaserColor
  1157. end
  1158. local ViewModel = LocalPlayer():GetViewModel()
  1159. local Attach = ViewModel:LookupAttachment("1")
  1160. if ( Attach == 0 ) then Attach = ViewModel:LookupAttachment("muzzle") end
  1161. if !LocalPlayer():Alive() then return end;
  1162. if( LocalPlayer():Alive() || LocalPlayer():GetActiveWeapon() == NULL ) then
  1163. if( !table.HasValue( Troll.laser, LocalPlayer():GetActiveWeapon():GetClass() ) ) then
  1164. local tr = util.TraceLine(util.GetPlayerTrace(LocalPlayer()));
  1165. cam.Start3D( EyePos() , EyeAngles())
  1166. -- Laser
  1167. StartPos = ViewModel:GetAttachment( Attach ).Pos
  1168. EndPos = LocalPlayer():GetEyeTrace().HitPos
  1169. render.SetMaterial( Material( "trails/laser" ) )
  1170. render.DrawBeam(StartPos, EndPos , 3, 0, 0, LaserColor)
  1171. -- End
  1172. render.SetMaterial(Material("Sprites/light_glow02_add_noz"))
  1173. render.DrawQuadEasy(tr.HitPos, (EyePos() - tr.HitPos), 10, 10, LaserColor, 0 )
  1174. cam.End3D()
  1175. end
  1176. end
  1177. end
  1178.  
  1179. -- ESP CROSSHAIR --
  1180. if GetConVarNumber("Troll_ESP_Crosshair") == 1 and GetConVarNumber("Troll_MISC_Thirdperson") == 0 then
  1181. if GetConVarString("Troll_ESP_Crosshair_Type") == "Spinning" then
  1182. local x, y = ScrW() / 2, ScrH() / 2
  1183. local Speed
  1184. if Aimon == 1 and AimbotTarget != nil and AimbotTarget != LocalPlayer() then
  1185. Speed = 5
  1186. else
  1187. Speed = 1
  1188. end
  1189. surface.SetDrawColor(GetColorCrosshair())
  1190. CHPosx = math.Clamp(LocalPlayer():GetEyeTrace().HitPos:ToScreen().x,0,ScrW())
  1191. CHPosy = math.Clamp(LocalPlayer():GetEyeTrace().HitPos:ToScreen().y,0,ScrH())
  1192. mathsin = math.sin(CurTime()*Speed)*4
  1193. mathcos = math.cos(CurTime()*Speed)*4
  1194. mathsin2 = math.sin(CurTime()*Speed+0.1)*4
  1195. mathcos2 = math.cos(CurTime()*Speed+0.1)*4
  1196. mathsin3 = math.sin(CurTime()*Speed-0.1)*4
  1197. mathcos3 = math.cos(CurTime()*Speed-0.1)*4
  1198. surface.DrawLine( CHPosx+mathcos*2,CHPosy+mathsin*2,CHPosx+mathcos*5,CHPosy+mathsin*5 );
  1199. surface.DrawLine( CHPosx-mathcos*2,CHPosy-mathsin*2,CHPosx-mathcos*5,CHPosy-mathsin*5 );
  1200. surface.DrawLine( CHPosx+mathsin*2,CHPosy-mathcos*2,CHPosx+mathsin*5,CHPosy-mathcos*5 );
  1201. surface.DrawLine( CHPosx-mathsin*2,CHPosy+mathcos*2,CHPosx-mathsin*5,CHPosy+mathcos*5 );
  1202. elseif GetConVarString("Troll_ESP_Crosshair_Type") == "Swastika" then
  1203. surface.SetDrawColor(red)
  1204. surface.DrawLine(ScrW()/2, ScrH()/2, ScrW()/2 + 20, ScrH()/2)
  1205. surface.DrawLine(ScrW()/2 + 20, ScrH()/2, ScrW()/2 + 20, ScrH()/2 + 20)
  1206. surface.DrawLine(ScrW()/2 , ScrH()/2, ScrW()/2 - 20, ScrH()/2)
  1207. surface.DrawLine(ScrW()/2 - 20 , ScrH()/2, ScrW()/2 - 20, ScrH()/2 - 20)
  1208. surface.DrawLine(ScrW()/2, ScrH()/2, ScrW()/2, ScrH()/2 - 20)
  1209. surface.DrawLine(ScrW()/2, ScrH()/2 - 20, ScrW()/2 + 20, ScrH()/2 - 20)
  1210. surface.DrawLine(ScrW()/2, ScrH()/2, ScrW()/2, ScrH()/2 + 20)
  1211. surface.DrawLine(ScrW()/2, ScrH()/2 + 20, ScrW()/2 - 20, ScrH()/2 + 20)
  1212. elseif GetConVarString("Troll_ESP_Crosshair_Type") == "Basic" then
  1213. local x, y, s = ScrW() / 2, ScrH() / 2, 10
  1214. surface.SetDrawColor(GetColorCrosshair())
  1215. surface.DrawLine( x, y - s, x, y + s )
  1216. surface.DrawLine( x - s, y, x + s, y )
  1217. elseif GetConVarString("Troll_ESP_Crosshair_Type") == "Diagonal" then
  1218. local x, y, w = ScrW() / 2, ScrH() / 2, 7
  1219. surface.SetDrawColor(GetColorCrosshair())
  1220. surface.DrawLine(x - w, y - w, x + w, y + w)
  1221. surface.DrawLine(x - w, y + w, x + w, y - w)
  1222. end
  1223. end
  1224.  
  1225. -- NOCLIP MARKER --
  1226. if GetConVarNumber("Troll_MISC_CSNoclip") == 1 then
  1227. local me_pos = LocalPlayer():EyePos():ToScreen()
  1228. draw.SimpleText("YOU ARE HERE", "ESPFont_Small", me_pos.x,me_pos.y +10, red, 4, 1 ) // skiddie shit
  1229. end
  1230. end
  1231. end
  1232. end
  1233. end
  1234. end
  1235. for _, v in ipairs( ents.GetAll() ) do
  1236. if( v:IsValid() and Troll:IsCustomEnt( v:GetClass() ) ) then
  1237. if GetConVarNumber("Troll_ESP_Ents") == 1 then
  1238. local wepn = v:GetClass()
  1239. local wname = string.Replace(wepn,"weapon_","")
  1240. wname = string.Replace(wname,"_"," ")
  1241. wname = string.upper(wname)
  1242. local entpos = v:GetPos():ToScreen()
  1243. draw.SimpleText(wname, "ESPFont_Small", entpos.x,entpos.y +10, red, 4, 1 )
  1244. surface.SetDrawColor(255,0,255,255)
  1245. end
  1246. end
  1247. end
  1248. end
  1249.  
  1250. function XRay()
  1251. local mat = Troll:CreateMaterial()
  1252. cam.Start3D(EyePos(), EyeAngles())
  1253. for k,v in pairs(ents.FindByClass("prop_*")) do
  1254. if (!CanSee(v)) then
  1255. PropColor = COLOR_NONVISIBLE
  1256. else
  1257. PropColor = COLOR_VISIBLE
  1258. end
  1259. if v:GetVelocity():Length() == 0 then
  1260. PropColor = COLOR_FROZEN
  1261. end
  1262. if v:GetVelocity():Length() == 0 and (!CanSee(v)) then
  1263. PropColor = COLOR_FROZEN_NV
  1264. end
  1265. if GetConVarNumber("Troll_ESP_XRay") == 1 then
  1266. if IsValid(v) and table.HasValue(Troll.props,v:GetModel()) and IsCloseEnough(v) then
  1267. render.SuppressEngineLighting( true )
  1268. render.SetColorModulation(PropColor.r / 255, PropColor.g / 255, PropColor.b / 255)
  1269. render.SetBlend(PropColor.a / 255);
  1270. render.MaterialOverride( mat )
  1271. v:DrawModel()
  1272. render.SuppressEngineLighting( false )
  1273. render.SetColorModulation(1,1,1)
  1274. render.MaterialOverride()
  1275. v:DrawModel()
  1276. v:SetRenderMode(RENDERMODE_TRANSALPHA)
  1277. else
  1278. v:SetColor(Color(255, 255, 255, 255))
  1279. end
  1280. end
  1281. end
  1282. cam.End3D()
  1283. end
  1284.  
  1285.  
  1286.  
  1287. /*****************************************
  1288. Name: Aimbot/Aim functions
  1289. Purpose: Aim for you, because you suck
  1290. Credits: isis
  1291. *******************************************/
  1292.  
  1293.  
  1294. local shouldFire = 0
  1295. // So ugly, ugh.
  1296. // There's better ways of doing this, but making a "toggle" function seemed best.
  1297. function RapidFire()
  1298. if GetConVarNumber("Troll_MISC_RapidFire") == 1 and input.IsMouseDown(MOUSE_LEFT) then
  1299. if shouldFire == 0 then
  1300. shouldFire = 1
  1301. else
  1302. shouldFire = 0
  1303. end
  1304. if shouldFire == 0 then
  1305. old_rcc("+attack")
  1306. else
  1307. old_rcc("-attack")
  1308. end
  1309. elseif shouldFire == 0 then
  1310. old_rcc("-attack")
  1311. if shouldFire == 0 then
  1312. shouldFire = 1
  1313. else
  1314. shouldFire = 0
  1315.  
  1316. end
  1317. end
  1318. end
  1319.  
  1320.  
  1321. /****************************************
  1322. Aimbot functions
  1323. ****************************************/
  1324.  
  1325. /********
  1326. bonescan
  1327. hermes v1
  1328. *******/
  1329.  
  1330. -- get owned
  1331. function IsSpawnProtected(ent)
  1332. if ((GAMEMODE.Name):lower()):find("stronghold") then
  1333. local entcol = ent:GetColor(r, g, b, a)
  1334. if entcol.a < 255 then
  1335. return true
  1336. else
  1337. return false
  1338. end
  1339. end
  1340. end
  1341.  
  1342. function AimSpot(ent)
  1343. if GetConVarNumber("Troll_AIM_TargetBones") == 0 then
  1344. local eyes = ent:LookupAttachment("eyes")
  1345. if GetConVarNumber("Troll_AIM_AAA") == 1 and (ent:EyeAngles().p < -89) then
  1346. return ent:LocalToWorld( ent:OBBCenter())
  1347. elseif(eyes ~= 0) then
  1348. eyes = ent:GetAttachment(eyes)
  1349. if(eyes and eyes.Pos) then
  1350. return eyes.Pos, eyes.Ang
  1351. end
  1352. end
  1353. end
  1354.  
  1355. local bonename = Troll.aimmodels[ent:GetModel()]
  1356. if(not bonename) then
  1357. for k, v in pairs(Troll.bones) do
  1358. if(v[1] == GetConVarString("Troll_AIM_AimSpot")) then
  1359. bonename = v[2]
  1360. end
  1361. end
  1362. bonename = bonename or "ValveBiped.Bip01_Head1"
  1363. end
  1364. local aimbone = ent:LookupBone(bonename);
  1365. if(aimbone) then
  1366. local pos, ang = ent:GetBonePosition(aimbone)
  1367. return pos, ang;
  1368. end
  1369. return ent:LookupBone("ValveBiped.Bip01_Head1")
  1370. --return ent:LocalToWorld(ent:OBBCenter())
  1371. end
  1372.  
  1373. function Exception(ent)
  1374. if (ent == LocalPlayer()) then return false end
  1375. if (ent:Team() == TEAM_SPECTATOR) then return false end
  1376. if (ent:GetMoveType() == MOVETYPE_OBSERVER) then return false end
  1377. if (!ent:Alive() ) then return false end
  1378. if (ent:InVehicle()) then return false end
  1379. if (GetConVarNumber("Troll_AIM_Friendly") == 0 && ent:Team() == LocalPlayer():Team()) then return false end
  1380. if (ent:IsPlayer() and (ent:IsAdmin() or ent:IsSuperAdmin()) and GetConVarNumber("Troll_AIM_Admins") == 0) then return false end
  1381. if (GetConVarNumber("Troll_AIM_Steam") == 0 && ent:GetFriendStatus() == "friend" ) then return false end
  1382. if (GetConVarNumber("Troll_AIM_SH") == 1 && IsSpawnProtected(ent)) then return false end
  1383. if (ent:IsPlayer() and GetConVarNumber("Troll_AIM_IgnoreNoWep") == 1 and not IsValid(ent:GetActiveWeapon())) then return false end
  1384. if (GetConVarNumber("Troll_AIM_SpawnProtection") == 1 and ent:GetColor(r, g, b, a).a < 255) then return false end
  1385. return true
  1386. end
  1387.  
  1388. function HasLOS(ent)
  1389. if(GetConVarNumber("Troll_AIM_CheckLOS") == 0) then return true end
  1390. local trace = util.TraceLine( {
  1391. start = LocalPlayer():GetShootPos(),
  1392. endpos = AimSpot(ent),
  1393. filter = { LocalPlayer(), e },
  1394. mask = MASK_SHOT + CONTENTS_WINDOW
  1395. } )
  1396. if (( trace.Fraction >= 0.99 )) then return true end
  1397. return false
  1398. end
  1399.  
  1400. function InFov( ent )
  1401. local fov = GetConVarNumber("Troll_AIM_Fov")
  1402. if( fov != 180 ) then
  1403. local lpang = LocalPlayer():GetAngles()
  1404. local ang = ( ent:GetBonePosition( ent:LookupBone("ValveBiped.Bip01_Head1") ) - LocalPlayer():EyePos() ):Angle()
  1405. local ady = math.abs( math.NormalizeAngle( lpang.y - ang.y ) )
  1406. local adp = math.abs( math.NormalizeAngle( lpang.p - ang.p ) )
  1407. if( ady > fov || adp > fov ) then return false end
  1408. end
  1409. return true
  1410. end
  1411.  
  1412. /*
  1413. local p, t = Vector(0, 0, 0), Vector(0, 0, 0)
  1414. if ( distance < 4000 && speed > 0 ) then p = self():GetVelocity() * distance / (speed * distance * 0.125) end
  1415. if ( weapon:IsWeapon() && prediction[weapon:GetClass()] != 0 ) then t = target:GetVelocity() * distance / (prediction[weapon:GetClass()] || 150000) end
  1416.  
  1417. vector = vector - p + t
  1418. end
  1419. */
  1420.  
  1421. function AimPrediction( pos , pl )
  1422. if IsValid( pl ) and type( pl:GetVelocity() ) == "Vector" and pl.GetPos and type( pl:GetPos() ) == "Vector" then
  1423. local distance = LocalPlayer():GetPos():Distance( pl:GetPos() )
  1424. local weapon = ( LocalPlayer().GetActiveWeapon and ( IsValid( LocalPlayer():GetActiveWeapon() ) and LocalPlayer():GetActiveWeapon():GetClass() ) )
  1425. if weapon and Troll.prediction[ weapon ] then
  1426. local time = distance / Troll.prediction[ weapon ]
  1427. return pos + pl:GetVelocity() * time
  1428. end
  1429. end
  1430. return pos
  1431. end
  1432.  
  1433. function NormalizeAng(angle)
  1434. if type(angle) == "Angle" then
  1435. return Angle(math.NormalizeAngle(angle.p) , math.NormalizeAngle(angle.y) , math.NormalizeAngle(angle.r))
  1436. end
  1437. return angle
  1438. end
  1439.  
  1440. function GetTargets()
  1441. local target;
  1442. if target == nil then target = LocalPlayer() else target = target end
  1443. local ply = LocalPlayer()
  1444. local angA, angB = 0
  1445. local x, y = ScrW(), ScrH()
  1446. local distance = math.huge;
  1447. for k, v in pairs(player.GetAll()) do
  1448. if (v != LocalPlayer() and v:Alive() and HasLOS(v) and Exception(v) and InFov(v)) then
  1449. local ePos, oldPos, myAngV = v:EyePos():ToScreen(), target:EyePos():ToScreen(), ply:GetAngles()
  1450. local thedist = v:GetPos():DistToSqr(LocalPlayer():GetPos());
  1451. angA = math.Dist( x / 2, y / 2, oldPos.x, oldPos.y )
  1452. angB = math.Dist( x / 2, y / 2, ePos.x, ePos.y )
  1453. if GetConVarString("Troll_AIM_Method") == "Closest To Crosshair" then
  1454. if ( angB <= angA ) then
  1455. target = v;
  1456. elseif target == ply then
  1457. target = v;
  1458. end
  1459. elseif GetConVarString("Troll_AIM_Method") == "Distance" then
  1460. if (thedist < distance) then
  1461. distance = thedist;
  1462. target = v;
  1463. end
  1464. end
  1465. end
  1466. end
  1467. return target
  1468. end
  1469.  
  1470. local function Aimbot(ucmd)
  1471.  
  1472.  
  1473.  
  1474.  
  1475. local asspeed = GetConVarNumber("Troll_AIM_AntiSnap_Speed") / 10
  1476. local aimang = Angle(0,0,0)
  1477. if Aimon == 1 then
  1478. local target = GetTargets()
  1479. if target != nil and target != LocalPlayer() then
  1480.  
  1481. -- Offset
  1482. local Aimspot;
  1483. if GetConVarNumber("Troll_AIM_Prediction") == 1 then
  1484. Aimspot = AimPrediction(AimSpot(target)) - Vector(0,0,GetConVarNumber("Troll_AIM_Offset"))
  1485. Aimspot = Aimspot + target:GetVelocity() * ( 1 / 66 ) - LocalPlayer():GetVelocity() * ( 1 / 66 )
  1486. else
  1487. Aimspot = (AimSpot(target)) - Vector(0,0,GetConVarNumber("Troll_AIM_Offset"))
  1488. Aimspot = Aimspot + target:GetVelocity() / 50 - LocalPlayer():GetVelocity() / 50
  1489. end
  1490. Angel = (Aimspot - LocalPlayer():GetShootPos()):GetNormal():Angle()
  1491. Angel.p = math.NormalizeAngle( Angel.p )
  1492. Angel.y = math.NormalizeAngle( Angel.y )
  1493.  
  1494. -- Anti snap
  1495. if GetConVarNumber("Troll_AIM_AntiSnap") == 1 then
  1496. Angle1 = LocalPlayer():EyeAngles()
  1497. local Smooth1 = math.Approach(Angle1.p, Angel.p, asspeed)
  1498. local Smooth2 = math.Approach(Angle1.y , Angel.y, asspeed)
  1499. aimang = Angle (Smooth1, Smooth2, 0)
  1500. else
  1501. -- Normal
  1502. aimang = Angle( Angel.p, Angel.y, 0 )
  1503. end
  1504. -- faggot
  1505. _G.debug.getregistry()["CUserCmd"].SetViewAngles(ucmd, aimang)
  1506. if GetConVarNumber("Troll_AIM_Auto") == 1 then
  1507. ucmd:SetButtons(bit.bor(ucmd:GetButtons(),IN_ATTACK))
  1508. end
  1509. if GetConVarNumber("Troll_AIM_SH") == 1 then
  1510. ucmd:SetButtons(bit.bor(ucmd:GetButtons(),IN_ATTACK2))
  1511. end
  1512. end
  1513. end
  1514. end
  1515.  
  1516.  
  1517. Troll:AddCMD("+Troll_Aim",function()
  1518. Aimon = 1
  1519. end)
  1520.  
  1521. Troll:AddCMD("-Troll_Aim",function()
  1522. Aimon = 0
  1523. end)
  1524. /**************************
  1525. Name: Anti-Aim
  1526. Purpose: HVH feature
  1527. **************************/
  1528. Troll:RegisterHook("CreateMove",function(cmd, u)
  1529. local caim
  1530. local getangs = cmd:GetViewAngles()
  1531. if GetConVarNumber("Troll_AIM_Anti") == 1 then
  1532. if GetConVarString("Troll_AIM_Anti_Type") == "Invert" then
  1533. if (!LocalPlayer():KeyDown(IN_ATTACK)) then
  1534. cmd:SetViewAngles(Angle(181, getangs.y, 180))
  1535. end
  1536. elseif GetConVarString("Troll_AIM_Anti_Type") == "Spin" then
  1537. if (!LocalPlayer():KeyDown(IN_ATTACK) and !LocalPlayer():KeyDown(IN_ATTACK2)) then
  1538. caim = Angle(0,math.random(-89,89),0)
  1539. cmd:SetViewAngles(NormalizeAng(caim))
  1540. end
  1541. elseif GetConVarString("Troll_AIM_Anti_Type") == "Random Pitch" then
  1542. if (!LocalPlayer():KeyDown(IN_ATTACK)) then
  1543. cmd:SetViewAngles(Angle(math.random(181,180), getangs.y, 180))
  1544. end
  1545. elseif GetConVarString("Troll_AIM_Anti_Type") == "Invert/Spin" then
  1546. if (!LocalPlayer():KeyDown(IN_ATTACK) and !LocalPlayer():KeyDown(IN_ATTACK2)) then
  1547. caim = math.random(-89,89)
  1548. cmd:SetViewAngles(Angle(181, NormalizeAng(caim), 180))
  1549. end
  1550. elseif GetConVarString("Troll_AIM_Anti_Type") == "Var" then
  1551. if (!LocalPlayer():KeyDown(IN_ATTACK) and !LocalPlayer():KeyDown(IN_ATTACK2)) then
  1552. cmd:SetViewAngles(Angle(GetConVarNumber("Troll_AIM_Anti_Angle_X"),getangs.y,GetConVarNumber("Troll_AIM_Anti_Angle_Z")))
  1553. end
  1554. end
  1555. end
  1556. end)
  1557.  
  1558. local LastReload = 0
  1559. local dontreload = {"weapon_physgun" , "gmod_tool" , "weapon_gravgun", "weapon_keys", "weapon_pocket", "pocket", "rp_pocket", "rp_keys", "keys"}
  1560. function AutoReload()
  1561. if (GetConVarNumber("Troll_AIM_Reload") == 1 and LocalPlayer():Alive() and IsValid( LocalPlayer():GetActiveWeapon() ) and !table.HasValue( dontreload, LocalPlayer():GetActiveWeapon():GetClass() ) ) then
  1562. if( LocalPlayer():GetActiveWeapon():Clip1() <= 0 and CurTime() > ( LastReload + 5 ) ) then
  1563. old_rcc( "+reload" )
  1564. LastReload = CurTime()
  1565. Troll:AddTimer( .2, 1, function()
  1566. old_rcc( "-reload" )
  1567. end )
  1568. end
  1569. end
  1570. end
  1571.  
  1572. local function StartFire()
  1573. old_rcc("+attack")
  1574. end
  1575.  
  1576. local function StopFire()
  1577. old_rcc("-attack")
  1578. end
  1579. -- thx hyperion
  1580. function TriggerBot()
  1581. if(GetConVarNumber("Troll_AIM_Trigger") == 1) then
  1582. local pos = LocalPlayer():GetShootPos()
  1583. local ang = LocalPlayer():GetAimVector()
  1584. local tracedata = {};
  1585. tracedata.start = pos
  1586. tracedata.endpos = pos+(ang*9999999999999)
  1587. local trace = util.TraceLine(tracedata)
  1588. if(trace.HitNonWorld) then
  1589. target = trace.Entity
  1590. if(target:IsPlayer()) then
  1591. StartFire()
  1592. timer.Simple(0.1, StopFire)
  1593. end
  1594. end
  1595. end
  1596. end
  1597.  
  1598. /****************************
  1599. Name: Misc
  1600. Purpose: Misc features
  1601. *****************************/
  1602. local Speedhacking = false
  1603. -- i use a private module for my convar forcing, so anyone else will use cvar3
  1604. Troll:AddCMD("+Troll_Speed",function()
  1605. Speedhacking = true
  1606. if Troll:IsDev(LocalPlayer()) then
  1607. -- //Troll.ForceCVar(GetConVar("sv_cheats"):SetValue(1))
  1608. -- //Troll.ForceCVar(GetConVar("host_timescale"):SetValue(GetConVarNumber("Troll_MISC_SpeedHack_Speed")))
  1609. //old_rcc("sp00f_bs_host_timescale",GetConVarNumber("Troll_MISC_SpeedHack_Speed"));
  1610. else
  1611. //GetConVar("sv_cheats"):SetValue(1)
  1612. //GetConVar("host_timescale"):SetValue(GetConVarNumber("Troll_MISC_SpeedHack_Speed"))
  1613. end
  1614. end)
  1615.  
  1616. Troll:AddCMD("-Troll_Speed",function()
  1617. Speedhacking = false
  1618. if Troll:IsDev(LocalPlayer()) then
  1619. //--Troll.ForceCVar(GetConVar("sv_cheats"):SetValue(0))
  1620. //--Troll.ForceCVar(GetConVar("host_timescale"):SetValue(1))
  1621. //old_rcc("sp00f_bs_host_timescale",1)
  1622. else
  1623. //GetConVar("sv_cheats"):SetValue(0)
  1624. //GetConVar("host_timescale"):SetValue(1)
  1625. end
  1626. end)
  1627.  
  1628. /*
  1629. local next_change = GetConVarNumber("sv_namechange_cooldown_seconds") + 0.5
  1630. function NameChanger()
  1631. local ply = LocalPlayer()
  1632. local e = player.GetAll()[ math.random( 1, #player.GetAll() ) ]
  1633. local curtime = CurTime()
  1634. if GetConVarNumber("Troll_MISC_Namechanger") == 1 and Troll:IsDev(LocalPlayer()) then
  1635. if next_change < curtime then
  1636. if ( !e:IsAdmin() && e != ply ) then
  1637. Troll:AddTimer( 1, 1 , function()
  1638. if ((GAMEMODE.Name):lower()):find("darkrp") then
  1639. LocalPlayer():ConCommand("say /rpname ".. e:Nick() .. " %" ) // 'can't rp name ~'
  1640. else
  1641. LocalPlayer():ConCommand( "bs_namechange " .. e:Nick() .. " ~" )
  1642. Troll.Notify(false,Color(255,255,255),"Changed your name to "..e:Nick().." ~")
  1643. end
  1644. end)
  1645. end
  1646. end
  1647. end
  1648. end
  1649. Troll:AddTimer( next_change , 0 , function() NameChanger() end )
  1650. */
  1651.  
  1652. Troll:RegisterHook("CreateMove",function(cmd)
  1653. if GetConVarNumber("Troll_MISC_BunnyHop") == 1 and bit.band( cmd:GetButtons(), IN_JUMP ) ~= 0 then
  1654. if !LocalPlayer():IsOnGround() then
  1655. cmd:SetButtons( bit.band( cmd:GetButtons(), bit.bnot( IN_JUMP ) ) )
  1656. end
  1657. end
  1658. end)
  1659.  
  1660. function Misc()
  1661. if GetConVarNumber("Troll_AIM_NoRecoil") == 1 then
  1662. if LocalPlayer():GetActiveWeapon().Primary then
  1663. LocalPlayer():GetActiveWeapon().Primary.Recoil = 0
  1664. end
  1665. end
  1666. if GetConVarNumber("Troll_MISC_ChatSpam") == 1 then
  1667. LocalPlayer():ConCommand("say "..GetConVarString("Troll_MISC_ChatSpam_Msg").."["..math.random(1,999).."]")
  1668. end
  1669. if GetConVarNumber("Troll_MISC_RPGod") == 1 then
  1670. if LocalPlayer():Health() < 100 then
  1671. LocalPlayer():ConCommand("say /buyhealth") -- spam buyhealth
  1672. end
  1673. end
  1674. if GetConVarNumber("Troll_MISC_Flashlight") == 1 then
  1675. old_rcc("impulse","100")
  1676. end
  1677. if GetConVarNumber("Troll_MISC_Fullbright") == 1 then
  1678. // GetConVar("mat_fullbright"):SetValue(1)
  1679. else
  1680. // GetConVar("mat_fullbright"):SetValue(0)
  1681. end
  1682. if GetConVarNumber("Troll_MISC_CSNoclip") == 1 then
  1683. CS_NC = LocalPlayer():EyePos();
  1684. end
  1685. if GetConVarNumber("Troll_MISC_RemoveSkybox") == 1 then
  1686. //GetConVar("gl_clear"):SetValue(1)
  1687. //GetConVar("r_drawskybox"):SetValue(0)
  1688. //GetConVar("r_3dsky"):SetValue(0)
  1689. else
  1690. //GetConVar("gl_clear"):SetValue(0)
  1691. //GetConVar("r_drawskybox"):SetValue(1)
  1692. //GetConVar("r_3dsky"):SetValue(1)
  1693. end
  1694. end
  1695.  
  1696. Troll:RegisterHook("CalcView",function(ply, pos, angles, fov)
  1697. if GetConVarNumber("Troll_MISC_Thirdperson") == 1 and LocalPlayer():Alive() then
  1698. local view = {}
  1699. view.origin = pos-(angles:Forward()*GetConVarNumber("Troll_MISC_Thirdperson_Dist"))
  1700. view.angles = angles
  1701. view.fov = fov
  1702. return view
  1703. elseif(GetConVarNumber("Troll_MISC_CSNoclip") == 1 and CS_NC) then
  1704. local ang = angles:Forward()
  1705. if LocalPlayer():KeyDown( IN_FORWARD ) and GetConVarNumber("Troll_MISC_CSNoclip") == 1 then
  1706. CS_NC = CS_NC + LocalPlayer():GetAimVector() * speed
  1707. end
  1708. if LocalPlayer():KeyDown( IN_BACK ) and GetConVarNumber("Troll_MISC_CSNoclip") == 1 then
  1709. CS_NC = CS_NC - LocalPlayer():GetAimVector() * speed
  1710. end
  1711. if LocalPlayer():KeyDown( IN_MOVERIGHT ) and GetConVarNumber("Troll_MISC_CSNoclip") == 1 then
  1712. CS_NC = CS_NC + ang:Angle():Right() * speed
  1713. end
  1714. if LocalPlayer():KeyDown( IN_MOVELEFT ) and GetConVarNumber("Troll_MISC_CSNoclip") == 1 then
  1715. CS_NC = CS_NC - ang:Angle():Right() * speed
  1716. end
  1717. if LocalPlayer():KeyDown( IN_JUMP ) and GetConVarNumber("Troll_MISC_CSNoclip") == 1 then
  1718. CS_NC = CS_NC + Vector( 0, 0, speed )
  1719. end
  1720. if LocalPlayer():KeyDown( IN_SPEED ) and GetConVarNumber("Troll_MISC_CSNoclip") == 1 then
  1721. speed = ( GetConVarNumber("Troll_MISC_CSNoclip_Speed") * 3 * ( FrameTime() / 2 ) ) * 100
  1722. elseif LocalPlayer():KeyDown( IN_DUCK ) and GetConVarNumber("Troll_MISC_CSNoclip") == 1 then
  1723. speed = ( GetConVarNumber("Troll_MISC_CSNoclip_Speed") / 3 * ( FrameTime() / 2 ) ) * 100
  1724. else
  1725. speed = ( GetConVarNumber("Troll_MISC_CSNoclip_Speed") * ( FrameTime() / 2 ) ) * 100
  1726. end
  1727. local view = {}
  1728. view.origin = CS_NC
  1729. view.angles = angles
  1730. view.fov = fov
  1731. return view
  1732. else
  1733. CS_NC = LocalPlayer():EyePos()
  1734. end
  1735. return GAMEMODE:CalcView(ply, pos, angles, fov)
  1736. end)
  1737. Troll:RegisterHook("ShouldDrawLocalPlayer",function()
  1738. if GetConVarNumber("Troll_MISC_Thirdperson") == 1 then
  1739. return true -- pro
  1740. end
  1741. end)
  1742. function CSNoclip(ucmd)
  1743. if GetConVarNumber("Troll_MISC_CSNoclip") == 1 then
  1744. ucmd:SetForwardMove(0);
  1745. ucmd:SetSideMove(0);
  1746. ucmd:SetUpMove(0);
  1747. end
  1748. end
  1749.  
  1750.  
  1751. function ShowNotifi()
  1752. -- now spectating
  1753. for k, v in pairs(player.GetAll()) do
  1754. if (IsValid(v:GetObserverTarget()) and v:GetObserverTarget():IsPlayer() and v:GetObserverTarget() == LocalPlayer()) then
  1755. if(not table.HasValue(Troll.spectators, v)) then
  1756. table.insert(Troll.spectators, v);
  1757. if GetConVarNumber("Troll_MISC_ShowSpec") == 1 then
  1758. Troll.Notify(true,red,""..v:Nick().." is now spectating you!")
  1759. surface.PlaySound("buttons/blip1.wav")
  1760. end
  1761. end
  1762. end
  1763. end
  1764. -- no longer spectating
  1765. for k, v in pairs(Troll.spectators) do
  1766. if (not IsValid(v) or not IsValid(v:GetObserverTarget()) or not v:GetObserverTarget():IsPlayer() or (v:GetObserverTarget() ~= LocalPlayer())) then
  1767. table.remove(Troll.spectators, k);
  1768. if GetConVarNumber("Troll_MISC_ShowSpec") == 1 then
  1769. Troll.Notify(true,green,""..v:Nick().." is no longer spectating you!")
  1770. end
  1771. end
  1772. end
  1773. -- admin join
  1774. if GetConVarNumber("Troll_MISC_ShowAdmins") == 1 then
  1775. for k, v in pairs(player.GetAll()) do
  1776. if (v:IsAdmin() and not table.HasValue(Troll.admins, v)) then
  1777. table.insert(Troll.admins, v);
  1778. Troll.Notify(true,white,"Admin " .. v:Nick() .. " has joined!")
  1779. surface.PlaySound("buttons/blip1.wav");
  1780. end
  1781. end
  1782. end
  1783. end
  1784.  
  1785.  
  1786. local commands = { "forward" , "back" , "jump" , "moveleft" , "moveright", "duck" }
  1787. function AntiAfk()
  1788. if GetConVarNumber("Troll_MISC_AntiAFK") == 1 then
  1789. local command1 = table.Random( commands )
  1790. local command2 = table.Random( commands )
  1791. Troll:AddTimer( 1, 1, function()
  1792. old_rcc( "+"..command1 )
  1793. old_rcc( "+"..command2 )
  1794. end )
  1795. Troll:AddTimer( 2, 1, function()
  1796. old_rcc("-"..command1 )
  1797. old_rcc("-"..command2 )
  1798. end )
  1799. end
  1800. end
  1801. Troll:AddTimer( 5 , 0 , function() AntiAfk() end )
  1802.  
  1803. // Traitor finder functions
  1804. local PlayerIsTraitor = false
  1805. timer.Simple( 3, function()
  1806. if ( gmod.GetGamemode().Name ) == "Trouble in Terrorist Town" then
  1807. local UsedWeapons = {}
  1808. local MapWeapons = {}
  1809. function IsATraitor( ply )
  1810. for k, v in pairs( Troll.traitors ) do
  1811. if v == ply then
  1812. return true
  1813. else
  1814. return false
  1815. end
  1816. end
  1817. end
  1818. Troll.tweps = {
  1819. "weapon_ttt_c4",
  1820. "weapon_ttt_knife",
  1821. "weapon_ttt_phammer",
  1822. "weapon_ttt_sipistol",
  1823. "weapon_ttt_flaregun",
  1824. "weapon_ttt_push",
  1825. "weapon_ttt_radio",
  1826. "weapon_ttt_teleport",
  1827. "(Disguise)",
  1828. }
  1829. timer.Create("TTT", 0.8, 0, function()
  1830. if GetConVarNumber("Troll_MISC_TTT") == 1 then
  1831. if !IsATraitor( ply ) then
  1832. for k, v in pairs( ents.FindByClass( "player" ) ) do
  1833. if IsValid( v ) then
  1834. if (!v:IsDetective()) then
  1835. if v:Team() ~= TEAM_SPECTATOR then
  1836. for wepk, wepv in pairs( Troll.tweps ) do
  1837. for entk, entv in pairs( ents.FindByClass( wepv ) ) do
  1838. if IsValid( entv ) then
  1839. cookie.Set( entv, 100 - wepk )
  1840. if !table.HasValue( UsedWeapons, cookie.GetNumber( entv ) ) then
  1841. if !table.HasValue( MapWeapons, cookie.GetNumber( entv ) ) then
  1842. local EntPos = ( entv:GetPos() - Vector(0,0,35) )
  1843. if entv:GetClass() == wepv then
  1844. if v:GetPos():Distance( EntPos ) <= 1 then
  1845. table.insert( Troll.traitors, v )
  1846. Troll.Notify(sound,red,v:Nick() .. " has traitor weapon: " .. wepv )
  1847. old_rcc("say",v:Nick() .. " is a traitor and I can prove it!")
  1848. if !table.HasValue( UsedWeapons, cookie.GetNumber( entv ) ) then
  1849. table.insert( UsedWeapons, cookie.GetNumber( entv ) )
  1850. else
  1851. if !table.HasValue( MapWeapons, cookie.GetNumber( entv ) ) then
  1852. table.insert( MapWeapons, cookie.GetNumber( entv ) )
  1853. end
  1854. end
  1855. end
  1856. end
  1857. end
  1858. end
  1859. end
  1860. end
  1861. end
  1862. end
  1863. end
  1864. end
  1865. end
  1866. end
  1867. end
  1868. end )
  1869.  
  1870. Troll:RegisterHook("HUDPaint",function()
  1871. if GetConVarNumber("Troll_MISC_TTT") == 1 then
  1872. for k, e in pairs( Troll.traitors ) do
  1873. local maxX, minX, maxY, minY, maxX2, minX2, maxY2, minY2, minYhp, maxYhp = Troll:CreatePos( e )
  1874. if IsValid( e ) then
  1875. if e:Team() ~= TEAM_SPECTATOR then
  1876. if ( !e:IsDetective() ) then
  1877. PlayerIsTraitor = true
  1878. draw.SimpleTextOutlined( "[TRAITOR]", "ESPFont", maxX2, minY2 -20, red, 4, 1, 1, black )
  1879. end
  1880. end
  1881. end
  1882. end
  1883. end
  1884. end)
  1885.  
  1886. Troll:RegisterHook("TTTPrepareRound",function()
  1887. timer.Simple( 2, function()
  1888. for k, v in pairs( Troll.traitors ) do
  1889. table.remove( Troll.traitors, k )
  1890. Troll.traitors = {}
  1891. end
  1892. for k, v in pairs( UsedWeapons ) do
  1893. table.remove( UsedWeapons, k )
  1894. UsedWeapons = {}
  1895. end
  1896. for k, v in pairs( MapWeapons ) do
  1897. table.remove( MapWeapons, k )
  1898. MapWeapons = {}
  1899. end
  1900. end )
  1901. end )
  1902. end
  1903. end )
  1904.  
  1905. /*************************
  1906. MENU FUNCTIONS
  1907. *************************/
  1908. Troll:AddCMD("+Troll_Menu", function()
  1909. Menu = vgui.Create("DFrame")
  1910. Menu:SetSize(450,360)
  1911. Menu:SetTitle(" :: Troll :: Version "..Troll.version.." ::") -- Ignore the spacing.
  1912. Menu:Center()
  1913. Menu:MakePopup()
  1914. Menu.Paint = function()
  1915. local mW, mH, x, y = Menu:GetWide(), Menu:GetTall(), ScrW() / 2, ScrH() / 2
  1916. draw.RoundedBox( 0, 0, 0, mW, mH, Color(255,0,0,50 ) ) -- old color: 116,187,251,50
  1917. surface.SetDrawColor(black);
  1918. surface.DrawOutlinedRect( 0, 0, mW , mH )
  1919. surface.DrawOutlinedRect( 0, 25, mW, mH )
  1920. end
  1921.  
  1922. local Sheet = vgui.Create("DPropertySheet",Menu)
  1923. Sheet:SetPos( 0, 25 )
  1924. Sheet:SetSize( 450, 350 )
  1925. Sheet.Paint = function()
  1926. draw.RoundedBox( 0, 0, 0, Sheet:GetWide(), Sheet:GetTall(), Color(0,0,0,150) )
  1927. end
  1928.  
  1929. // fuck;
  1930. local Page1 = vgui.Create("DLabel")
  1931. Page1:SetParent( Sheet )
  1932. Page1:SetPos( 0 , 10 )
  1933. Page1:SetText("")
  1934. Page1.Paint = function()
  1935. draw.SimpleTextOutlined("Troll v"..Troll.version.." - ","Logo",100,3,cyan,TEXT_ALIGN_LEFT,TEXT_ALIGN_LEFT,2,black)
  1936. draw.SimpleTextOutlined("Updates","Logo",190,60,lgreen,TEXT_ALIGN_LEFT,TEXT_ALIGN_LEFT,2,black)
  1937. end
  1938. local Page2 = vgui.Create("DLabel")
  1939. Page2:SetParent( Sheet )
  1940. Page2:SetPos( 0 , 10 )
  1941. Page2:SetText("")
  1942. Page2.Paint = function()
  1943. end
  1944. local Page3 = vgui.Create("DLabel")
  1945. Page3:SetParent( Sheet )
  1946. Page3:SetPos( 0 , 10 )
  1947. Page3:SetText("")
  1948. Page3.Paint = function()
  1949. end
  1950. local Page4 = vgui.Create("DLabel")
  1951. Page4:SetParent( Sheet )
  1952. Page4:SetPos( 0 , 10 )
  1953. Page4:SetText("")
  1954. Page4.Paint = function()
  1955. end
  1956. local Page5 = vgui.Create("DLabel")
  1957. Page5:SetParent( Sheet )
  1958. Page5:SetPos( 0 , 10 )
  1959. Page5:SetText("")
  1960. Page5.Paint = function()
  1961. end
  1962. -----------------------
  1963. --[[ MAIN TAB SHIT ]]--
  1964. -----------------------
  1965. // LOAD SHIT
  1966. local ReloadHooksButton = vgui.Create("DButton",Page1)
  1967. ReloadHooksButton:SetText("Reload Hooks")
  1968. ReloadHooksButton:SetPos( 10, 30 )
  1969. ReloadHooksButton:SetSize( 200, 25)
  1970. ReloadHooksButton.DoClick = function()
  1971. Troll.hooks:reload()
  1972. Troll.Notify(green,"Reloaded hooks")
  1973. end
  1974.  
  1975. local UnloadCheat = vgui.Create("DButton",Page1)
  1976. UnloadCheat:SetText("Unload Cheat")
  1977. UnloadCheat:SetPos( 220, 30 )
  1978. UnloadCheat:SetSize( 200, 25)
  1979. UnloadCheat.DoClick = function()
  1980. Troll:unload()
  1981. Troll.Notify(red,"UNLOADED ENTIRE CHEAT!")
  1982. end
  1983.  
  1984. // UPDATE SHIT
  1985. local CheckUpdate = vgui.Create("DButton",Page1)
  1986. CheckUpdate:SetText("Check for updates")
  1987. CheckUpdate:SetPos( 10,90 )
  1988. CheckUpdate:SetSize( 200, 25)
  1989. CheckUpdate.DoClick = function()
  1990. Troll:CheckUpdate()
  1991. end
  1992.  
  1993. local DoUpdate = vgui.Create("DButton",Page1)
  1994. DoUpdate:SetText("Update the cheat")
  1995. DoUpdate:SetPos( 220,90 )
  1996. DoUpdate:SetSize( 200, 25)
  1997. DoUpdate.DoClick = function()
  1998. Troll:DoUpdate()
  1999. end
  2000.  
  2001. // Log viewer
  2002. local LogPanel = vgui.Create("DPanelList",Page1)
  2003. LogPanel:SetPos( 10,100 )
  2004. LogPanel:SetSize( Sheet:GetWide()-22, 195)
  2005. LogPanel:SetSpacing( 5 )
  2006. LogPanel:EnableHorizontal( false )
  2007. LogPanel:EnableVerticalScrollbar( false )
  2008. local DLog = vgui.Create("DListView", LogPanel)
  2009. DLog:SetPos(2,24) DLog:SetMultiSelect(false)
  2010. DLog:SetSize(LogPanel:GetWide()-19,LogPanel:GetTall()-28)
  2011. DLog:AddColumn("Log")
  2012. DLog:SetMultiline( true )
  2013. for i=#Troll.log,1,-1 do
  2014. DLog:AddLine(Troll.log[i])
  2015. end
  2016.  
  2017. local ClearLogs = vgui.Create("DButton",Page1)
  2018. ClearLogs:SetText("Clear log")
  2019. ClearLogs:SetPos( 120, 290 )
  2020. ClearLogs:SetSize( 200, 20)
  2021. ClearLogs.DoClick = function()
  2022. Troll.log = {};
  2023. Troll.Notify(false,Color(255,255,255),"Cleared log.")
  2024. end
  2025.  
  2026. -------------------------
  2027. --[[ AIMBOT TAB SHIT ]]--
  2028. -------------------------
  2029. Troll:AddCheckBox("Autoshoot","Troll_AIM_Auto",Page2,10,10,"Autoshoot when locked")
  2030. Troll:AddCheckBox("Friendly Fire","Troll_AIM_Friendly",Page2,10,30,"Target your own team")
  2031. Troll:AddCheckBox("Target Steam Friends","Troll_AIM_Steam",Page2,10,50,"Target Steam Friends")
  2032. Troll:AddCheckBox("Target Admins","Troll_AIM_Admins",Page2,10,70,"Target Admins")
  2033. Troll:AddCheckBox("No-Recoil","Troll_AIM_NoRecoil",Page2,10,90,"Remove Recoil")
  2034. Troll:AddCheckBox("Triggerbot","Troll_AIM_Trigger",Page2,10,110,"Auto-shoots when looking at a player")
  2035. Troll:AddCheckBox("Stronghold mode","Troll_AIM_SH",Page2,10,130,"Aims down sights when locked, to reduce spread.")
  2036. Troll:AddCheckBox("Anti-Aim","Troll_AIM_Anti",Page2,10,150,"HvH feature, makes it 'harder' for others to aimbot you.")
  2037. Troll:AddCheckBox("Anti Anti-Aim","Troll_AIM_AAA",Page2,10,170,"HvH feature, target center if target has anti-aim [Must have 'Target Bone' on]")
  2038. Troll:AddCheckBox("Anti-Snap","Troll_AIM_AntiSnap",Page2,200,10,"Changes the speed of the aimbot, making it look more legit")
  2039. Troll:AddCheckBox("Auto Reload","Troll_AIM_Reload",Page2,200,30,"Reload when you run out of ammo")
  2040. Troll:AddCheckBox("Target Bones","Troll_AIM_TargetBones",Page2,200,50,"Target custom bone instead of eye position")
  2041. Troll:AddCheckBox("Ignore Weaponless Players","Troll_AIM_IgnoreNoWep",Page2,200,70,"Ignore players that don't have a weapon")
  2042. Troll:AddCheckBox("Check LOS","Troll_AIM_CheckLos",Page2,200,90,"Check line-of-sight")
  2043. Troll:AddCheckBox("Prediction","Troll_AIM_Prediction",Page2,200,110,"Predict time/distance making the aimbot more accurate")
  2044. Troll:AddCheckBox("Anti Spawn Protection","Troll_AIM_SpawnProtection",Page2,200,130,"Ignore spawn protected players.")
  2045. --Troll:AddCheckBox("Auto Wall","Troll_AIM_AutoWall",Page2,200,150,"Shoot through penetrable surfaces, works best with Mad Cow's weapons")
  2046.  
  2047. Troll:AddSlider("Anti-Aim Angle X","Troll_AIM_Anti_Angle_X",Page2,-181,180,1,10,190,350,"Anti-Aim Angle X (For advanced users only)")
  2048. Troll:AddSlider("Anti-Aim Angle Z","Troll_AIM_Anti_Angle_Z",Page2,-181,180,1,10,210,350,"Anti-Aim Angle Z (For advanced users only)")
  2049. Troll:AddSlider("Field Of View","Troll_AIM_Fov",Page2,0,180,1,10,230,350,"FOV in which the aimbot will target players")
  2050. Troll:AddSlider("Anti-Snap Speed","Troll_AIM_AntiSnap_Speed",Page2,0,50,1,10,250,350,"Changes your anti-snap speed")
  2051. Troll:AddSlider("Aimbot Offset","Troll_AIM_Offset",Page2,-25,25,1,10,270,350,"Offsets your aimspot")
  2052.  
  2053. local AimLabel1 = vgui.Create("DLabel")
  2054. AimLabel1:SetParent( Page2 )
  2055. AimLabel1:SetPos(350,265)
  2056. AimLabel1:SetText("Aimspot")
  2057. AimLabel1:SetTextColor(Color(255,255,255,255))
  2058. AimLabel1:SizeToContents()
  2059.  
  2060. local AimList = vgui.Create( "DComboBox", Page2)
  2061. AimList:SetPos(350,280)
  2062. AimList:SetSize( 82, 20 )
  2063. for k, v in pairs(Troll.bones) do
  2064. AimList:AddChoice(v[1]);
  2065. end
  2066. AimList.OnSelect = function(self)
  2067. Troll.Notify(false,lblue,"Set aimspot to bone "..self:GetValue()..".")
  2068. old_rcc("Troll_AIM_AimSpot",self:GetValue())
  2069. end
  2070.  
  2071. local AimLabel2 = vgui.Create("DLabel")
  2072. AimLabel2:SetParent( Page2 )
  2073. AimLabel2:SetPos(350,225)
  2074. AimLabel2:SetText("Anti-Aim Type")
  2075. AimLabel2:SetTextColor(Color(255,255,255,255))
  2076. AimLabel2:SizeToContents()
  2077.  
  2078. local AAList = vgui.Create( 'DComboBox', Page2 )
  2079. AAList:SetPos( 350, 240 )
  2080. AAList:SetSize( 82, 20 )
  2081. AAList:AddChoice("Invert")
  2082. AAList:AddChoice("Spin")
  2083. AAList:AddChoice("Random Pitch")
  2084. AAList:AddChoice("Invert/Spin")
  2085. AAList:AddChoice("Var")
  2086. AAList.OnSelect = function( self )
  2087. old_rcc("Troll_AIM_Anti_Type",self:GetValue())
  2088. end
  2089.  
  2090. local AimLabel3 = vgui.Create("DLabel")
  2091. AimLabel3:SetParent( Page2 )
  2092. AimLabel3:SetPos(350,185)
  2093. AimLabel3:SetText("Aimbot Method")
  2094. AimLabel3:SetTextColor(Color(255,255,255,255))
  2095. AimLabel3:SizeToContents()
  2096.  
  2097. local AimMethod = vgui.Create( 'DComboBox', Page2 )
  2098. AimMethod:SetPos( 350, 200 )
  2099. AimMethod:SetSize( 82, 20 )
  2100. --AimMethod:AddChoice("Closest To Crosshair")
  2101. AimMethod:AddChoice("Distance")
  2102. AimMethod.OnSelect = function( self )
  2103. old_rcc("Troll_AIM_Method",self:GetValue())
  2104. end
  2105.  
  2106.  
  2107. -------------------------------------
  2108. --[[ ESP | WALLHACK | VISUAL TAB ]]--
  2109. -------------------------------------
  2110. Troll:AddCheckBox("[ESP] Info","Troll_ESP_Info",Page3,10,10,"Show player's info on the ESP")
  2111. Troll:AddCheckBox("[ESP] Chams","Troll_ESP_Chams",Page3,10,30,"Show a player's model through walls")
  2112. Troll:AddCheckBox("[ESP] Bounding Box","Troll_ESP_Box",Page3,10,50,"Draw a box around players")
  2113. Troll:AddCheckBox("[ESP] Show Skeleton","Troll_ESP_Skeleton",Page3,10,70,"Show player's bones")
  2114. Troll:AddCheckBox("[ESP] Entity Finder","Troll_ESP_Ents",Page3,10,90,"Show entities on the ESP")
  2115. Troll:AddCheckBox("[ESP] Prop XRay","Troll_ESP_Xray",Page3,10,110,"Show common propkilling props through walls")
  2116.  
  2117. Troll:AddCheckBox("[VIS] Crosshair","Troll_ESP_Crosshair",Page3,150,10,"Draw a crosshair on your screen")
  2118. Troll:AddCheckBox("[VIS] Laser Sight","Troll_ESP_Laser",Page3,150,30,"Draw a laser from your gun to your aimspot")
  2119. --Troll:AddCheckBox("[VIS] Laser Tracer (Prop)","Troll_ESP_PropTrace",Page3,150,50,"Draw a laser from a prop to where it's moving")
  2120.  
  2121. Troll:AddSlider("ESP Distance","Troll_ESP_Distance",Page3,0,10000,1,10,260,300,"Distance in which the ESP will render")
  2122.  
  2123.  
  2124. local ChamsList = vgui.Create( "DComboBox", Page3)
  2125. ChamsList:SetPos(350,280)
  2126. ChamsList:SetSize( 82, 20 )
  2127. ChamsList:AddChoice("Solid")
  2128. ChamsList:AddChoice("Wireframe")
  2129. ChamsList.OnSelect = function(self)
  2130. Troll.Notify(false,lblue,"Set chams type to "..self:GetValue()..".")
  2131. old_rcc("Troll_ESP_Chams_Material",self:GetValue())
  2132. end
  2133.  
  2134. local TextList = vgui.Create( 'DComboBox', Page3 )
  2135. TextList:SetPos( 350, 240 )
  2136. TextList:SetSize( 82, 20 )
  2137. TextList:AddChoice( 'Outlined' )
  2138. TextList:AddChoice( 'Non-Outlined' )
  2139. TextList.OnSelect = function( self )
  2140. if self:GetValue() == 'Outlined' then
  2141. old_rcc("Troll_ESP_Text","outlined")
  2142. elseif self:GetValue() == 'Non-Outlined' then
  2143. old_rcc("Troll_ESP_Text","normal")
  2144. end
  2145. end
  2146.  
  2147. local CrosshairList = vgui.Create( "DComboBox", Page3)
  2148. CrosshairList:SetPos(350,200)
  2149. CrosshairList:SetSize( 82, 20 )
  2150. CrosshairList:AddChoice("Swastika")
  2151. CrosshairList:AddChoice("Spinning")
  2152. CrosshairList:AddChoice("Basic")
  2153. CrosshairList:AddChoice("Diagonal")
  2154. CrosshairList.OnSelect = function(self)
  2155. Troll.Notify(false,lblue,"Set crosshair type to "..self:GetValue()..".")
  2156. old_rcc("Troll_ESP_Crosshair_Type",self:GetValue())
  2157. end
  2158.  
  2159. local BoxList = vgui.Create( "DComboBox", Page3)
  2160. BoxList:SetPos(350,160)
  2161. BoxList:SetSize( 82, 20 )
  2162. BoxList:AddChoice("3d")
  2163. BoxList:AddChoice("2d")
  2164. BoxList.OnSelect = function(self)
  2165. Troll.Notify(false,lblue,"Set bounding box type to "..self:GetValue()..".")
  2166. old_rcc("Troll_ESP_Box_Type",self:GetValue())
  2167. end
  2168.  
  2169. local ESPLabel1 = vgui.Create("DLabel")
  2170. ESPLabel1:SetParent( Page3 )
  2171. ESPLabel1:SetPos(350,265)
  2172. ESPLabel1:SetText("Chams Material")
  2173. ESPLabel1:SetTextColor(Color(255,255,255,255))
  2174. ESPLabel1:SizeToContents()
  2175.  
  2176. local ESPLabel2 = vgui.Create("DLabel")
  2177. ESPLabel2:SetParent( Page3 )
  2178. ESPLabel2:SetPos(350,225)
  2179. ESPLabel2:SetText("Text Type")
  2180. ESPLabel2:SetTextColor(Color(255,255,255,255))
  2181. ESPLabel2:SizeToContents()
  2182.  
  2183. local ESPLabel3 = vgui.Create("DLabel")
  2184. ESPLabel3:SetParent( Page3 )
  2185. ESPLabel3:SetPos(350,185)
  2186. ESPLabel3:SetText("Crosshair Type")
  2187. ESPLabel3:SetTextColor(Color(255,255,255,255))
  2188. ESPLabel3:SizeToContents()
  2189.  
  2190. local ESPLabel4 = vgui.Create("DLabel")
  2191. ESPLabel4:SetParent( Page3 )
  2192. ESPLabel4:SetPos(350,145)
  2193. ESPLabel4:SetText("Box Type")
  2194. ESPLabel4:SetTextColor(Color(255,255,255,255))
  2195. ESPLabel4:SizeToContents()
  2196.  
  2197. ---------------------------
  2198. --[[ MISC TAB SETTINGS ]]--
  2199. ---------------------------
  2200. Troll:AddCheckBox("Traitor Finder","Troll_MISC_TTT",Page4,10,10,"Find traitors in TTT")
  2201. Troll:AddCheckBox("Bunnyhop","Troll_MISC_BunnyHop",Page4,10,30,"Bunnyhop by holding 'Space'")
  2202. Troll:AddCheckBox("Chat Spam","Troll_MISC_ChatSpam",Page4,10,50,"Spam a pre-determined message in the chat")
  2203. Troll:AddCheckBox("Anti-AFK","Troll_MISC_AntiAFK",Page4,10,70,"Makes you move randomly to avoid AFK kickers")
  2204. Troll:AddCheckBox("Name Changer","Troll_MISC_Namechanger",Page4,10,90,"Steal player's names")
  2205. Troll:AddCheckBox("DarkRP Godmode","Troll_MISC_RPGod",Page4,10,110,"Spams /buyhealth when you lose HP")
  2206. Troll:AddCheckBox("Show Spectators","Troll_MISC_ShowSpec",Page4,10,130,"Tells you in chat when someone is spectating you.")
  2207. Troll:AddCheckBox("Show Admins","Troll_MISC_ShowAdmins",Page4,10,150,"Tells you in chat when an admin joins.")
  2208. Troll:AddCheckBox("Thirdperson","Troll_MISC_Thirdperson",Page4,10,170,"Allows you to see your player (thirdperson).")
  2209. Troll:AddCheckBox("Flashlight Spam","Troll_MISC_Flashlight",Page4,200,10,"Spams the flashlight.")
  2210. Troll:AddCheckBox("Fullbright","Troll_MISC_Fullbright",Page4,200,30,"Forces the fullbright command")
  2211. Troll:AddCheckBox("Clientside Noclip","Troll_MISC_CSNoclip",Page4,200,50,"Allows you to noclip clientside")
  2212. Troll:AddCheckBox("Remove Skybox","Troll_MISC_RemoveSkybox",Page4,200,70,"Removes the skybox (Makes it black)")
  2213. Troll:AddCheckBox("Rapid Fire","Troll_MISC_RapidFire",Page4,200,90,"Shoot rapidly with any weapon")
  2214.  
  2215. Troll:AddSlider("Clientside Noclip Speed","Troll_MISC_CSNoclip_Speed",Page4,0,100,1,10,220,350,"Sets the speed of the clientside noclip")
  2216. Troll:AddSlider("Thirdperson Distance","Troll_MISC_Thirdperson_Dist",Page4,0,600,1,10,240,350,"Sets the distance of the thirdperson")
  2217. Troll:AddSlider("Speedhack Speed","Troll_MISC_Speedhack_Speed",Page4,0,10,1,10,260,350,"Sets the speed of the speedhack")
  2218.  
  2219. -------------------------
  2220. --[[ CHANGELOG PAGE ]]--
  2221. ------------------------
  2222. //local InfoPage = vgui.Create("DLabel")
  2223. //http.Fetch("https://dl.dropbox.com/u/150309237/Troll/infopage.txt", function(body, len, headers, code)
  2224. ////InfoPage:SetPos( 10, 5 )
  2225. //InfoPage:SetParent( Page5 )
  2226. //InfoPage:SetText( body )
  2227. //InfoPage:SizeToContents()
  2228. //InfoPage:SetTextColor( Color( 255, 255, 255, 255 ) )
  2229. //end )
  2230.  
  2231. // Add sheets
  2232. Sheet:AddSheet("Main",Page1,"gui/silkicons/user",false,false,"Main cheat settings")
  2233. Sheet:AddSheet("Aimbot",Page2, "gui/silkicons/bomb", false, false, "Aimbot Settings")
  2234. Sheet:AddSheet("ESP | Wallhack | Visual",Page3,"gui/silkicons/group",false,false,"ESP/Wallhack Settings")
  2235. Sheet:AddSheet("Miscellaneous",Page4,"gui/silkicons/brick_add",false,false,"Miscellaneous Settings")
  2236. Sheet:AddSheet("Information",Page5,"gui/silkicons/plugin",false,false,"Update notes and changelogs")
  2237. end) -- End of +Troll_Menu function
  2238. Troll:AddCMD("-Troll_Menu",function()
  2239. Menu:SetVisible(false)
  2240. end)
  2241.  
  2242. Troll:AddCMD("Troll_Menu_Toggle",function()
  2243. Menu:SetVisible(true)
  2244. end)
  2245.  
  2246.  
  2247. /**********************
  2248. Name: Hooks
  2249. Purpose: Hook shit
  2250. ***********************/
  2251.  
  2252. function hooks_hudpaint()
  2253. ESP();
  2254. end
  2255.  
  2256. function hooks_postdraw()
  2257. Chams();
  2258. end
  2259.  
  2260. function hooks_think()
  2261. Misc();
  2262. ShowNotifi();
  2263. AutoReload();
  2264. RapidFire();
  2265. end
  2266.  
  2267. function hooks_renderscreenspaceeffects()
  2268. XRay();
  2269. end
  2270.  
  2271. function hooks_calcview()
  2272. end
  2273.  
  2274. function hooks_createmove(ucmd)
  2275. Aimbot(ucmd);
  2276. CSNoclip(ucmd);
  2277. TriggerBot(cmd);
  2278. end
  2279.  
  2280. function Troll.hooks:load()
  2281. Troll:RegisterHook("HUDPaint",hooks_hudpaint);
  2282. Troll:RegisterHook("PostDrawEffects",hooks_postdraw);
  2283. Troll:RegisterHook("Think",hooks_think);
  2284. Troll:RegisterHook("CalcView",hooks_calcview);
  2285. Troll:RegisterHook("RenderScreenspaceEffects",hooks_renderscreenspaceeffects);
  2286. Troll:RegisterHook("CreateMove",hooks_createmove);
  2287. end
  2288. Troll.hooks:load();
  2289.  
  2290. function Troll.hooks:unload()
  2291. Troll:RemoveHook("HUDPaint",hooks_hudpaint);
  2292. Troll:RemoveHook("CalcView",hooks_calcview);
  2293. Troll:RemoveHook("PostDrawEffects",hooks_postdraw);
  2294. Troll:RemoveHook("Think",hooks_think);
  2295. Troll:RemoveHook("RenderScreenspaceEffects",hooks_renderscreenspaceeffects);
  2296. Troll:RemoveHook("CreateMove",hooks_createmove);
  2297. end
  2298.  
  2299. function Troll.hooks:reload()
  2300. Troll:Log("Reloaded hooks")
  2301. Troll.hooks:unload();
  2302. Troll.hooks:load();
  2303. end
  2304.  
  2305. function Troll:unload()
  2306. Troll:Log("Unloaded.")
  2307. Troll.hooks:unload()
  2308. old_rcc("-Troll_Menu");
  2309. Troll:RemoveCMD("+Troll_Menu");
  2310. Troll:RemoveCMD("-Troll_Menu");
  2311. Troll:RemoveCMD("+Troll_Aim");
  2312. Troll:RemoveCMD("-Troll_Aim");
  2313. Troll:RemoveCMD("+Troll_Speed");
  2314. Troll:RemoveCMD("-Troll_Speed");
  2315. Troll:RemoveCMD("Troll_Menu_Toggle")
  2316. timer.Destroy("TTT")
  2317. end
  2318.  
  2319. /*******
  2320. RUN LAST
  2321. ********/
  2322.  
  2323. Troll.Notify(dosound,white,"loaded version "..Troll.version..".")
  2324. Troll:Log("Successfully loaded.")
  2325. GetServerGM(true,"NONE") -- print the server's gamemode name in console
  2326.  
  2327. // no point in autorunning skidcheck, i always have Troll loaded and typing 'skid' in console seemed easier
  2328. Troll:AddCMD("skid",function()
  2329. if Troll:IsDev(LocalPlayer()) then
  2330. include("SkidCheck.lua")
  2331. else
  2332. LocalPlayer():ChatPrint("retard.")
  2333. end
  2334. end)
  2335.  
  2336. // I'm a huge flaming faggot for doing this.
  2337. for k,v in pairs(player.GetAll()) do
  2338. if !Troll:IsDev(LocalPlayer()) then
  2339. if Troll:IsDev(v) then
  2340. Troll.Notify(true,green,"The developer of Troll is in this server. His name is "..v:Nick()..".")
  2341. end
  2342. end
  2343. end
  2344. // That was gay.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement