Guest User

paska 2

a guest
Apr 22nd, 2019
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 115.75 KB | None | 0 0
  1. --[[local info = debug.getinfo(debug.getinfo)
  2. if info.short_src:find("client/vehicle.lua") then
  3. print"disconnected because cac"
  4. RunConsoleCommand"disconnect"
  5. end]]
  6. --print(hooktype)
  7. local hooktype = hooktype or 1
  8.  
  9. if _G.ch and _G.ch.Unload then _G.ch:Unload() end
  10.  
  11. local ttt = GAMEMODE.Name:lower():find"terror"
  12. local murder = GAMEMODE.Name:lower():find"murder"
  13. local morbus = GAMEMODE.Name == "MORBUS"
  14.  
  15. local color_red = Color(255,0,0)
  16. local color_green = Color(0,255,0)
  17.  
  18. local me = LocalPlayer()
  19.  
  20. local getinfo
  21. local getupvalue
  22. local safehookadd
  23. local safeconcmdAdd
  24. --local concommandAdd
  25. --local concommandRemove
  26.  
  27. -- dont ask for it, you're not getting it
  28. if proxi then
  29. getupvalue = proxi.getupvalue
  30. getinfo = proxi.getinfo
  31. else
  32. getupvalue = debug.getupvalue
  33. getinfo = debug.getinfo
  34. end
  35.  
  36. --[[
  37. concommandAdd = function(name,callback)
  38. local commandsList = select(2,proxi.getupvalue(concommand.AutoComplete,2))
  39. commandsList[name] = callback
  40. end
  41. concommandRemove = function(name)
  42. local commandsList = select(2,proxi.getupvalue(concommand.AutoComplete,2))
  43. commandsList[name] = nil
  44. end]]
  45.  
  46. local cac = getinfo(debug.getinfo).short_src:find"client/vehicle.lua"
  47. if cac then CAC = getupvalue(debug.getinfo,1) end
  48.  
  49. local hookinfo = getinfo(hook.Add)
  50. local concmdinfo = getinfo(concommand.Add)
  51.  
  52. if hookinfo.short_src:find("client/vehicle.lua") then
  53. safehookadd = select(2,getupvalue(hook.Add,2)) -- work on bypass
  54. safeconcmdAdd = concommand.Add
  55. elseif concmdinfo.short_src:find"client/!cl_adminmod" then -- compactGamers thing
  56. safehookadd = select(2,getupvalue(hook.Add,3))
  57. safeconcmdAdd = select(2,getupvalue(concommand.Add,3))
  58. else
  59. safeconcmdAdd = concommand.Add
  60. safehookadd = hook.Add
  61. end
  62.  
  63. --[[
  64. plugins ?:
  65. - modularity
  66. - URL to code to update/run?
  67. - local copy in data?
  68.  
  69. todo:
  70. first time help:
  71. - popup menu so people learn functionality of cheat
  72. - button on main tab to open help menu again
  73. free aim:
  74. - currently doesnt do SHIT
  75. - calcview hook to allow "free aim"
  76. - createmove hook to set player aim
  77. ]]
  78.  
  79. local default = {
  80. aimbot = {
  81. onkey = false,
  82. enabled = false,
  83. dist = 1000,
  84. drawfov = false,
  85. fov = 45,
  86. freeaim = false,
  87. key = KEY_N,
  88. los = false,
  89. smooth = false,
  90. smoothstep = 1,
  91. --stick = false,
  92. type = 1
  93. },
  94. bhop = false,
  95. lazyguns = false,
  96. cams = {
  97. enabled = false,
  98. freecam = false,
  99. freespeed = 5
  100. },
  101. crosshair = {
  102. type = 1,
  103. enabled = false,
  104. color = color_white,
  105. size = 3,
  106. },
  107. esp = {
  108. armor = false,
  109. box = false,
  110. boxcol = Color(255,0,0),
  111. boxcoltype = 1,
  112. boxtype = 1,
  113. chams = false,
  114. color = Color(255,0,255),
  115. chamtype = 1,
  116. customcolor = false,
  117. dist = 4500,
  118. drpmon = false,
  119. friends = false,
  120. friendcol = Color(0,255,0),
  121. enabled = false,
  122. fade = false,
  123. halo = false,
  124. halocol = Color(255,0,255,255),
  125. halocoltype = 1,
  126. health = false,
  127. morbus = false,
  128. murroles = false,
  129. name = false,
  130. radar = {
  131. enabled = false,
  132. bgcol = Color(0,255,0),
  133. maxdist = 500,
  134. padding = 10,
  135. size = 300,
  136. type = 2,
  137. cardinals = true,
  138. },
  139. rank = false,
  140. showdist = false,
  141. sname = false,
  142. trace = false,
  143. traitors = false,
  144. weapon = false
  145. },
  146. entesp = {
  147. box = false,
  148. boxcol = Color(0,255,0),
  149. boxcoltype = 1,
  150. boxtype = 1,
  151. dist = 4500,
  152. enabled = false,
  153. fade = false,
  154. info = false,
  155. halo = false,
  156. halocol = Color(0,255,0,255),
  157. halocoltype= 1,
  158. },
  159. ents = {},
  160. friends = {},
  161. fullbright = false,
  162. keypad = false,
  163. net = {
  164. ["fpp_touchabilitydata"] = true,
  165. ["acrashscreen_ping"] = true,
  166. ["updatebuffs"] = true,
  167. ["chatbubbles"] = true,
  168. ["simfphys_*"] = true,
  169. ["darkrp_*"] = true,
  170. ["urpc"] = true,
  171. ["afk"] = true,
  172. },
  173. npcesp = {
  174. box = false,
  175. boxcol = Color(255,0,0),
  176. boxcoltype = 1,
  177. boxtype = 1,
  178. chams = false,
  179. color = Color(0,255,0),
  180. chamtype = 1,
  181. dist = 4500,
  182. enabled = false,
  183. fade = false,
  184. halo = false,
  185. halocol = Color(0,255,0,255),
  186. halocoltype= 1,
  187. health = false,
  188. name = false,
  189. showdist = false,
  190. weapon = false,
  191. },
  192. panic = false,
  193. player_die = false,
  194. spectators = false,
  195. triggerbot = false,
  196. }
  197.  
  198. local ch = _G.ch or {} _G.ch = ch
  199. ch.derma = ch.derma or {}
  200. ch.restores = ch.restores or {}
  201. ch.exploits = ch.exploits or {}
  202. ch.hooks = ch.hooks or {}
  203. ch.knownents = {}
  204. ch.vars = default
  205. ch.tips = {
  206. "Share with your friends ❤",
  207. "Made with love, 2017-2018 ❤",
  208. "This cheat was made with 256MB of VRAM!",
  209. "Certain entities have extra information on them!",
  210. "You can go up and down in freecam with SPACE and ALT!",
  211. "Close all menus with SHIFT+ESCAPE!",
  212. "Close the most recent popup with ESCAPE!",
  213. "You can make presets to save your settings!",
  214. "Setting friends blacklists them from the aimbot!",
  215. "You can right click on certain buttons to open an editor!",
  216. "Keypads are part of the ent esp too! ;D",
  217. }
  218.  
  219. local function unload()
  220. for k, v in next, ch.restores do
  221. ch:Restore(k)
  222. end
  223.  
  224. if IsValid(ch.derma.frame) then
  225. for k, v in next, ch.derma.frame.submenus do
  226. local pan = v
  227. if pan:IsValid() then
  228. pan:Close()
  229. end
  230. ch.derma.frame.submenus[k] = nil
  231. end
  232. ch.derma.frame:Close()
  233. ch.derma.frame:Remove()
  234. ch.derma.prop:Remove()
  235. end
  236.  
  237. for k, v in next, ch.hooks do
  238. ch:RemoveHook(k)
  239. end
  240.  
  241. concommand.Remove("hn_menu")
  242. concommand.Remove("+hn_menu")
  243. concommand.Remove("-hn_menu")
  244. concommand.Remove("hn_panic")
  245. concommand.Remove("hn_toggle")
  246. concommand.Remove("hn_exploit")
  247.  
  248. ch:Msg"successfully unloaded"
  249.  
  250. _G.ch = nil
  251. end
  252. local function reload()
  253. for k, v in next, ch.hooks do
  254. for k2, v2 in next, v do
  255. safehookadd(k,k2,v2)
  256. end
  257. end
  258.  
  259. ch.vars.ents = {}
  260. ch.vars.friends = {}
  261. ch.vars = default
  262. end
  263. local function showmenu()
  264. ch.derma.frame:SetVisible(true)
  265. ch.derma.frame:MakePopup()
  266. ch.derma.frame:SetTitle("honocheat - " .. table.Random(ch.tips))
  267. end
  268.  
  269. -- cheat functions
  270. do
  271. function ch:AddExploit(id, name, info, func)
  272. if not id or not name or not func then return end
  273. self.exploits[id:lower()] = {
  274. name = name,
  275. info = info,
  276. func = func
  277. }
  278.  
  279. self.derma:AddButton(self.derma.exploits,name,info,func)
  280. end
  281. function ch:Exploit(name)
  282. self.exploits[name].func()
  283. end
  284. function ch:AddHook(hookn, name, func, hookt)
  285. if not hookn or not name or not func then return end
  286.  
  287. hookt = hookt or hooktype or 1
  288. if hookt == 1 then -- hook.Add
  289. self.hooks[hookn] = self.hooks[hookn] or {}
  290. if self.hooks[hookn][name] then
  291. safehookadd(hookn, self.hooks[hookn][name].id,func)
  292. return
  293. end
  294.  
  295. local ran = ""
  296. for i=3, math.random(4, 16) do
  297. ran = ran..string.char(math.random(32,126))
  298. end
  299. self.hooks[hookn][name] = {
  300. id = ran,
  301. func = func,
  302. type = 1
  303. }
  304. safehookadd(hookn, ran, func)
  305. elseif hookt == 2 then -- """"random"""" hooks
  306. local n,ofunc
  307. if hook.GetTable()[hookn] then
  308. n,ofunc = next(hook.GetTable()[hookn])
  309. end
  310. if not n and not ofunc then
  311. --print(hookn,name,func)
  312. self:AddHook(hookn,name,func,1)
  313. else
  314. self.hooks[hookn][name] = {
  315. id = n,
  316. func = ofunc,
  317. type = 2
  318. }
  319.  
  320. hooks[hookn][n] = function(...)
  321. func(unpack(...))
  322. ofunc(unpack(...))
  323. end
  324. end
  325. elseif hookt == 3 then -- gamemode func
  326. local ofunc = GAMEMODE[hookn]
  327. self:Msg(hookn,ofunc)
  328. self.hooks[hookn][name] = {
  329. func = ofunc,
  330. type = 3
  331. }
  332. GAMEMODE[hookn] = function(...)
  333. func(unpack({...},2))
  334. ofunc(unpack({...}))
  335. end
  336. end
  337. end
  338. function ch:RemoveHook(hookn, name)
  339. if not name then
  340. for k,v in next, self.hooks[hookn] do
  341. if v.type == 1 then
  342. hook.Remove(hookn,v.id)
  343. elseif v.type == 2 then -- random hook
  344. hook.GetTable()[hookn][v.id] = v.func
  345. elseif v.type == 3 then -- gamemode
  346. GAMEMODE[hookn] = v.func
  347. end
  348. self:Msg("removed hook "..(hookn.."."..k))
  349. end
  350. return
  351. end
  352.  
  353. local tab = self.hooks[hookn][name]
  354. if v.type == 1 then
  355. hook.Remove(hookn, tab.id)
  356. elseif v.type == 2 then -- random hook
  357. hook.GetTable()[hookn][tab.id] = tab.func
  358. elseif v.type == 3 then -- gamemode
  359. GAMEMODE[hookn] = tab.func
  360. end
  361. self:Msg("removed hook "..(hookn.."."..name))
  362. end
  363. function ch:AddRestore(name, data, func)
  364. if not name or not data or not func then return end
  365. self.restores[name] = {
  366. func = func,
  367. data = data
  368. }
  369. end
  370. function ch:Restore(name)
  371. if not name then return end
  372. local t = self.restores[name]
  373. t.func(t.data)
  374. self:Msg("restored "..name)
  375. end
  376. function ch:AddESPEnt(find, usepatterns, func)
  377. if not find or not usepatterns then return end
  378. if isfunction(usepatterns) and not func then
  379. func = usepatterns
  380. usepatterns = false
  381. end
  382. ch.knownents[find] = {
  383. find = func,
  384. usepatterns = usepatterns
  385. }
  386. end
  387. function ch:ESPEnt(ent)
  388. if not ent or not isentity(ent) then return end
  389. local class = ent:GetClass()
  390. local tab = {}
  391. for k, v in next, self.knownents do
  392. if v.usepatterns and class:find(k) then
  393. tab = v.find(ent)
  394. elseif not v.usepatterns and class == k then
  395. tab = v.find(ent)
  396. end
  397. end
  398.  
  399. tab = tab or {}
  400. tab.name = tab.name or ent:GetClass()
  401. tab.extra = tab.extra or "ent not known to esp"
  402. tab.color = tab.color or color_white
  403.  
  404. return tab
  405. end
  406. function ch:AddConCommand(name, cb, ac)
  407. safeconcmdAdd(name,cb,ac)
  408. end
  409. end
  410.  
  411. -- misc bypasses
  412. do
  413. -- deagleLogs
  414. if util.NetworkStringToID("deaglelogs_sendcommanddata") ~= 0 then
  415. ch:AddRestore("deagleLogs", {
  416. cmdRun = concommand.Run
  417. },
  418. function(data)
  419. concommand.Run = data.cmdRun
  420. end)
  421.  
  422. concommand.Run = select(2,getupvalue(concommand.Run,5))
  423. end
  424.  
  425. -- qac
  426. -- fuck you qac, you're annoying; i can't restore you
  427. if util.NetworkStringToID("quack") ~= 0 and getinfo(concommand.Add).short_src:find"!!_cl_qac.lua" then
  428. local qac = select(2,getupvalue(concommand.Add,1))
  429. --[[ch:AddRestore("qac",{
  430. scan_func = qac.scan_func,
  431. validate_src = qac.validate_src
  432. },function(data)
  433. qac.scan_func = data.scan_func
  434. qac.validate_src = data.validate_src
  435. end)]]
  436.  
  437. function qac.scan_func() end
  438. function qac.validate_src() end
  439.  
  440. for k, v in next, qac.scanf do
  441. local tab = v[1]
  442. local name = v[2]
  443. tab[name] = select(2,getupvalue(tab[name],2))
  444. end
  445. end
  446.  
  447. -- vac anticheat
  448. --
  449. if util.NetworkStringToID("vac.clsv") ~= 0 then
  450. local vac = select(2,getupvalue(hook.Add,1))
  451. local g = select(2,getupvalue(hook.Add,2))
  452. ch:AddRestore("vac",{
  453. bad = vac.bad
  454. },
  455. function(data)
  456. vac.bad = data.bad
  457. end)
  458.  
  459. -- sends to server cheat info
  460. vac.bad = function() end
  461. safehookadd = g.hook.Add
  462. safeconcmdAdd = g.concommand.Add
  463. end
  464.  
  465. -- DBugR
  466. if DBugR then
  467. ch:AddRestore("DBugR",{
  468. netStart = net.Start
  469. }, function(data)
  470. net.Start = netStart
  471. end)
  472. local safehookadd = select(2,debug.getupvalue(hook.Add,1))
  473. local safeconcmdAdd = select(2,debug.getupvalue(concommand.Add,1))
  474. net.Start = select(2,debug.getupvalue(net.Start,2))
  475. end
  476. end
  477.  
  478. local cwitems = {
  479. weapons = Color(255,95,0),
  480. ammunition = Color(95,196,95),
  481. medical = Color(0,255,0),
  482. consumables = Color(95, 255, 95),
  483. reusables = Color(95, 0, 255),
  484. identification = Color(95, 0, 255),
  485. other = Color(128,128,128),
  486. junk = Color(128,128,128),
  487. miscellaneous = Color(128,128,128),
  488. }
  489.  
  490. local function isprinter(v)
  491. if not v:IsEntity() then return end
  492. for k,v in next, v:GetTable() do
  493. if k:lower():find("") then
  494. if isfunction(v) then
  495. return true, v
  496. elseif isnumber(v) then
  497. return true, v
  498. end
  499. end
  500. end
  501. return false
  502. end
  503.  
  504. -- esp ents
  505. do
  506. ch:AddESPEnt("coin",function(v)
  507. return {extra="$"..v:GetRealValue()}
  508. end)
  509. ch:AddESPEnt("cw_(.+)", true, function(v)
  510. local etype = v:GetClass():gsub("cw_(.-)","")
  511. local tab = {}
  512. tab.name = etype
  513. if etype == "item" and Clockwork.entity:HasFetchedItemData(v) then
  514. tab.extra = ((v.cwItemTable and v.cwItemTable("name")).. " - " ..(v.cwItemTable and v.cwItemTable("itemID")) or v:GetModel())
  515. tab.color = cwitems[v.cwItemTable("category"):lower():gsub("uu - ","")] or Color(255,255,255)
  516. elseif etype == "cash" then
  517. tab.extra = "$"..v:GetDTInt(0)
  518. elseif etype == "salesman" then
  519. tab.extra = v:GetNWString("name","salesman")
  520. elseif etype == "shipment" then
  521. tab.extra = v.GetItemTable and v:GetItemTable()("name") or "unknown"
  522. tab.color = cwitems[v.GetItemTable and v:GetItemTable()("category"):lower():gsub("uu - ","")] or Color(255,255,255)
  523. elseif etype == "radio" then
  524. tab.extra = v:GetNWString("frequency", "???")
  525. tab.color = v:IsOff() and color_red or color_green
  526. end
  527. return tab
  528. end)
  529. ch:AddESPEnt("bb_(.+)", true, function(v)
  530. local etype = v:GetClass():gsub("bb_(.-)","")
  531. local tab = {}
  532.  
  533. tab.name = etype
  534. if etype == "item" then
  535. local index = v:GetSharedVar"sh_Index"
  536. if index == 0 then return end
  537.  
  538. local itemtable = blackbox.item.Get(index)
  539. if not itemtable then return end
  540. tab.extra = itemtable.name
  541. tab.color = cwitems[itemtable.category:lower()] or Color(255,255,255)
  542. elseif etype == "cash" then
  543. tab.extra = "$"..v:GetSharedVar"sh_Amount"
  544. elseif etype == "salesman" then
  545. tab.extra = "asshole"
  546. elseif etype == "shipment" then
  547. local index = v:GetSharedVar"sh_Index"
  548. if index == 0 then return end
  549.  
  550. local itemtable = blackbox.item.Get(index)
  551. if not itemtable then return end
  552. tab.extra = itemtable.name
  553. tab.color = cwitems[itemtable.category:lower()] or Color(255,255,255)
  554. end
  555.  
  556. return tab
  557. end)
  558. ch:AddESPEnt("nut_(.+)", true, function(v)
  559. local etype = v:GetClass():gsub("nut_(.-)","")
  560. local tab = {}
  561. if etype == "item" then
  562. tab.name = "item"
  563. tab.extra = (v.getItemTable and v:getItemTable().name).. " - " ..v:getNetVar("id",v:GetModel())
  564. elseif etype == "money" then
  565. tab.name = "money"
  566. tab.extra = "$"..v:getAmount()
  567. elseif etype == "vendor" then
  568. tab.extra = v:getNetVar("name","")
  569. end
  570. return tab
  571. end)
  572. ch:AddESPEnt("spawned_(.+)", true, function(v)
  573. local class = v:GetClass()
  574. local tab = {}
  575. if class == "spawned_weapon" then
  576. local type = v:GetWeaponClass() or v:GetModel()
  577. local amount = v.dt.amount
  578.  
  579. tab.extra = amount.." "..type..(amount > 1 and "s" or "")
  580. elseif class == "spawned_shipment" then
  581. local type = CustomShipments[v:Getcontents()].name
  582. local amount = v:Getcount()
  583.  
  584. tab.extra = amount.." "..type..(amount > 1 and "s" or "")
  585. elseif class == "spawned_money" then
  586. tab.name = "money"
  587. tab.extra = DarkRP.formatMoney(v:Getamount())
  588. end
  589. return tab
  590. end)
  591. ch:AddESPEnt("Keypad", function(v)
  592. return {
  593. extra = v.code and "code: "..v.code or "no code",
  594. color = v.code and color_green or color_white
  595. }
  596. end)
  597. ch.knownents.Keypad_Wire = ch.knownents.Keypad
  598. ch:AddESPEnt("ttt_(.+)", true, function(v)
  599. local class = v:GetClass()
  600. local tab = {}
  601.  
  602. if class == "ttt_c4" then
  603. tab.name = "c4"
  604. tab.extra = util.SimpleTime(v:GetExplodeTime() - CurTime(), "%02i:%02i:%02i")
  605. elseif class == "ttt_health_station" then
  606. tab.name = "health station"
  607. tab.extra = (v:GetStoredHealth() or 0).. " heals"
  608. end
  609.  
  610. return tab
  611. end)
  612. ch:AddESPEnt("prop_ragdoll", function(v)
  613. if ttt and CORPSE.GetPlayerNick(v,false) ~= false then
  614. local nick = (CORPSE.GetPlayer(v) and CORPSE.GetPlayer(v):IsValid()) and CORPSE.GetPlayer(v):Nick() or CORPSE.GetPlayerNick(v,"unknown")
  615. local found = CORPSE.GetFound(v,false)
  616. return {
  617. name = (found and "" or "un").. "identified corpse",
  618. extra = nick.. "'s body"
  619. }
  620. end
  621. end)
  622. ch:AddESPEnt("ration", function(v)
  623. if not v.StoredMoney then return end
  624. local val = v.StoredMoney
  625.  
  626. return {
  627. name = "printer",
  628. extra = DarkRP.formatMoney(val),
  629. color = val > 1000 and color_green or color_white
  630. }
  631. end)
  632. ch:AddESPEnt("metaprinter", function(v)
  633. local val = v:GetStoredMoney()
  634. drawinfo.name = "printer"
  635. drawinfo.extra = DarkRP.formatMoney(val)
  636. drawinfo.color = val > 1000 and color_green or color_white
  637. end)
  638. ch.knownents.gamma_printer = ch.knownents.metaprinter
  639. ch:AddESPEnt("circl_printer", true, function(v)
  640. return {
  641. name = "printer",
  642. extra = DarkRP.formatMoney(v.Money),
  643. color = v.Money > 1000 and color_green or color_white
  644. }
  645. end)
  646. ch:AddESPEnt("bit_miner", true, function(v)
  647. return {
  648. name = "bit miner",
  649. extra = v:GetMinedCoins().. " bitcoins"
  650. }
  651. end)
  652. ch:AddESPEnt("money_clicker", function(v)
  653. local val = v:GetMoney()
  654. return {
  655. name = v:GetClickerName(),
  656. extra = DarkRP.formatMoney(val),
  657. color = val > 1000 and color_green or color_white
  658. }
  659. end)
  660. ch:AddESPEnt("tierp_printer", function(v)
  661. local val = v:GetMoney()
  662. drawinfo.name = v.GetTier and "printer t".. v:GetTier() or "printer"
  663. drawinfo.extra = DarkRP.formatMoney(val).. " - " ..math.ceil(math.max(v:GetPrintFinishTime()-CurTime(),0)).."s"
  664. drawinfo.color = val > 1000 and color_green or color_white
  665. end)
  666. ch.knownents["sapphire_printer[_p]?"] = ch.knownents.tierp_printer
  667. ch.knownents["sapphire_printer[_p]?"].usepatterns = true
  668. ch:AddESPEnt("^g_(.+)_printer", true, function(v)
  669. local val = v:Getstoredmoney()
  670. return {
  671. name = "printer",
  672. extra = DarkRP.formatMoney(val),
  673. color = val > 1000 and color_green or color_white
  674. }
  675. end)
  676. ch.knownents.mini_printer = ch.knownents["^g_(.+)_printer"]
  677. ch.knownents.mini_printer.usepatterns = false
  678. ch.knownents.standard_printer = ch.knownents.mini_printer
  679. ch:AddESPEnt("boost_printer", true, function(v)
  680. local val = v.PrintedMoney
  681. return {
  682. name = "printer",
  683. extra = DarkRP.formatMoney(val),
  684. color = val > 1000 and color_green or color_white
  685. }
  686. end)
  687. ch:AddESPEnt("commercial_printer", function(v)
  688. return {
  689. name = "printer",
  690. extra = DarkRP.formatMoney(v:Getprintamount()).. " - " ..string.format("%.0f",v:Gettimein()/v:Gettimereq()*100).. "%"
  691. }
  692. end)
  693. ch.knownents.portable_printer = ch.knownents.commercial_printer
  694. ch:AddESPEnt("bm2_bitminer_(.+)", true, function(v)
  695. local val = math.floor(v.GetBitcoinAmount and v:GetBitcoinAmount() * BM2CONFIG.BitcoinValue or -1)
  696. return {
  697. name = "bit miner",
  698. extra = DarkRP.formatMoney(val),
  699. color = val > 1000 and color_green or color_white
  700. }
  701. end)
  702. ch:AddESPEnt("vrondakis_printer", function(v)
  703. local val = v:GetNWInt("MoneyAmount", -1)
  704. return {
  705. name = v:GetNWString("PrinterName","printer"),
  706. extra = DarkRP.formatMoney(val),
  707. color = val > 1000 and color_green or color_white
  708. }
  709. end)
  710. ch:AddESPEnt("lp2_printer", true, function(v)
  711. local val = v.data.storageCur or -1
  712. return {
  713. name = "printer",
  714. extra = DarkRP.formatMoney(val),
  715. color = val > 1000 and color_green or color_white
  716. }
  717. end)
  718. ch:AddESPEnt("gstandard_printer",function(v)
  719. local val = v:Getstoredmoney()
  720. return {
  721. name = v.data.name,
  722. extra = DarkRP.formatMoney(val),
  723. color = val > 1000 and color_green or color_white
  724. }
  725. end)
  726. ch.knownents.gvip_printer = ch.knownents.gstandard_printer
  727. ch.knownents["gvip+_printer"] = ch.knownents.gstandard_printer
  728. ch.knownents.gdiamond_printer = ch.knownents.gstandard_printer
  729. ch.knownents.gextended_printer = ch.knownents.gstandard_printer
  730. ch:AddESPEnt("printr", function(v)
  731. local charge = v:GetPower()
  732. return {
  733. name = v.DisplayName.. " printer",
  734. extra = charge.. "% - " ..DarkRP.formatMoney(v.MoneyCount)
  735. }
  736. end)
  737. ch.knownents["printr(.+)"] = ch.knownents.printr
  738. ch.knownents["printr(.+)"].usepatterns = true
  739. end
  740.  
  741. ch.Unload = unload
  742. ch.Reload = reload
  743. ch.ShowMenu = showmenu
  744.  
  745. function ch:Msg(...)
  746. local msg = {...}
  747. if not msg then return end
  748. MsgC(Color(32,196,256), "[HNC] ", color_white, unpack(msg), "\n")
  749. end
  750. function ch:DoPanic(...)
  751. self.vars.panic = true
  752. self.derma.frame:Close()
  753. self:Msg(...)
  754. end
  755.  
  756. -- menu
  757. do
  758. if not file.Exists("hnc", "DATA") then
  759. ch:Msg"creating directory hnc/ in data"
  760. file.CreateDir("hnc/cheat")
  761. file.CreateDir("hnc/friends")
  762. file.CreateDir("hnc/ents")
  763. file.CreateDir("hnc/net")
  764. end
  765. function ch.derma:AddGroup(parent,txt, icon)
  766. local grp = vgui.Create( "DCollapsibleCategory" )
  767.  
  768. grp:Dock(TOP)
  769. grp:DockMargin(0,0,0,0)
  770. grp:SetExpanded(false)
  771. grp:SetLabel(txt)
  772. grp.Header:SetIcon(icon)
  773.  
  774. grp.list = vgui.Create( "DPanelList", grp )
  775. grp.list:SetSpacing(0)
  776. grp.list:SetPadding(0)
  777. grp.list:EnableHorizontal(false)
  778. grp.list:EnableVerticalScrollbar(true)
  779. grp:SetContents(grp.list)
  780.  
  781. parent:AddItem(grp)
  782. return grp.list
  783. end
  784. function ch.derma:AddOption(parent, txt, var, tooltip, cb)
  785. local opt = vgui.Create("DMenuOptionCVar")
  786.  
  787. opt.OnCursorEntered = function() return end
  788.  
  789. opt:SetText(tostring(txt))
  790. opt:SetToolTip(tooltip)
  791. opt:SizeToContents()
  792. opt.DoRightClick = ((cb and isfunction(cb)) and function(but) cb(but) end or function() end)
  793.  
  794. if istable(var) then
  795. opt.OnChecked = function(but, b)
  796. ch.vars[var[1]][var[2]] = b
  797. end
  798. opt.Think = function(but)
  799. but:SetChecked(ch.vars[var[1]][var[2]])
  800. end
  801. else
  802. opt.OnChecked = function(but, b)
  803. ch.vars[var] = b
  804. end
  805. opt.Think = function(but)
  806. but:SetChecked(ch.vars[var])
  807. end
  808. end
  809.  
  810. parent:AddItem(opt)
  811. return opt
  812. end
  813. function ch.derma:AddSpacer(parent)
  814. local pnl = vgui.Create( "DPanel", parent )
  815.  
  816. pnl.Paint = function() return true end
  817. pnl:SetTall(12)
  818.  
  819. parent:AddItem(pnl)
  820. return pnl
  821. end
  822. function ch.derma:AddSlider(parent, txt, tooltip, var, decplace, def, min, max)
  823. local sld = vgui.Create("DNumSlider")
  824.  
  825. sld:SetText(tostring(txt))
  826. sld:SetToolTip(tooltip)
  827. sld:SetMin(tonumber(min))
  828. sld:SetMax(tonumber(max))
  829. sld:SetDecimals(tonumber(decplace))
  830. sld:SetValue(def)
  831. sld:SetTall(32)
  832. sld:SetDark(true)
  833. sld:SizeToContents()
  834.  
  835. if istable(var) then
  836. sld.OnValueChanged = function(sli, val)
  837. ch.vars[var[1]][var[2]] = val
  838. end
  839. sld.Think = function(sli)
  840. sli:SetValue(ch.vars[var[1]][var[2]])
  841. end
  842. else
  843. sld.OnValueChanged = function(sli, val)
  844. ch.vars[var] = val
  845. end
  846. sld.Think = function(sli)
  847. sli:SetValue(ch.vars[var])
  848. end
  849. end
  850.  
  851. parent:AddItem(sld)
  852. return sld
  853. end
  854. function ch.derma:AddButton(parent, txt, tooltip, cb)
  855. local opt = vgui.Create("DMenuOption")
  856.  
  857. opt.OnCursorEntered = function() return end
  858. opt.DoClick = ((cb and isfunction(cb)) and function(but) cb(but) end or function() end)
  859.  
  860. opt.m_Image = vgui.Create("DImage", opt)
  861. opt.m_Image:SetImage("icon16/bullet_black.png")
  862. opt.m_Image:SizeToContents()
  863.  
  864. opt:SetText(tostring(txt))
  865. opt:SetToolTip(tooltip)
  866. opt:SizeToContents()
  867.  
  868. if parent.AddItem then
  869. parent:AddItem(opt)
  870. else
  871. opt:SetParent(parent)
  872. opt:Dock(TOP)
  873. end
  874. return opt
  875. end
  876. function ch.derma:AddCombo(parent, txt, tooltip, var, options)
  877. local pan = vgui.Create("DPanel", parent)
  878. pan:SetToolTip(tooltip)
  879.  
  880. local label = vgui.Create("DLabel", pan)
  881. label:SetDark(true)
  882. label:SetText(txt)
  883. label:Dock(LEFT)
  884. label:SizeToContents()
  885. label:SetContentAlignment(5) -- no enum :(
  886.  
  887. local cmb = vgui.Create("DComboBox", pan)
  888. cmb:Dock(FILL)
  889.  
  890. for k, v in next, options do
  891. cmb:AddChoice(v)
  892. end
  893.  
  894. if istable(var) then
  895. cmb.OnSelect = function(cmbo, i, b)
  896. ch.vars[var[1]][var[2]] = i
  897. end
  898. cmb:ChooseOptionID(ch.vars[var[1]][var[2]])
  899. else
  900. cmb.OnSelect = function(cmbo, i, b)
  901. ch.vars[var] = i
  902. end
  903. cmb:ChooseOptionID(ch.vars[var])
  904. end
  905.  
  906. parent:AddItem(pan)
  907. return cmb
  908. end
  909.  
  910. local f = vgui.Create("DFrame")
  911. ch.derma.frame = f
  912. f:SetSize(600,400)
  913. f:SetTitle("honocheat - " .. table.Random(ch.tips))
  914. f:Center()
  915. f:SetMinWidth(600)
  916. f:SetMinHeight(400)
  917. f:SetSizable(true)
  918. f:SetDeleteOnClose(false)
  919. f:SetScreenLock(true)
  920. f:MakePopup()
  921. f.submenus = {}
  922. local press = false
  923. local ot = f.Think
  924. f.Think = function(self)
  925. ot(self)
  926.  
  927. if math.Round(math.Round(RealTime(),2) % 5,2) == 0 then
  928. self:SetTitle("honocheat - " .. table.Random(ch.tips))
  929. end
  930.  
  931. if press then
  932. if input.IsKeyDown(KEY_ESCAPE) then return end
  933. press = false
  934. return
  935. end
  936.  
  937. if input.IsKeyDown(KEY_ESCAPE) then
  938. gui.HideGameUI()
  939. press = true
  940. if input.IsKeyDown(KEY_LSHIFT) or input.IsKeyDown(KEY_RSHIFT) then
  941. for k, v in next, self.submenus do
  942. local pan = v
  943. if pan:IsValid() then
  944. pan:Close()
  945. end
  946. self.submenus[k] = nil
  947. end
  948. self:Close()
  949. else
  950. local pan = self.submenus[#self.submenus]
  951. if pan and pan:IsValid() and pan:IsVisible() then
  952. if pan:IsValid() then
  953. pan:Close()
  954. end
  955. self.submenus[#self.submenus] = nil
  956. else
  957. self:Close()
  958. end
  959. end
  960. end
  961. end
  962.  
  963. local p = vgui.Create("DPropertySheet", f)
  964. ch.derma.prop = p
  965. p:Dock(FILL)
  966.  
  967. local main = vgui.Create("DPanel", p)
  968. main:Dock(FILL)
  969.  
  970. local mainl = vgui.Create("DCategoryList", main)
  971. mainl:Dock(FILL)
  972. mainl:DockPadding(0,0,0,0)
  973. local first = ch.derma:AddGroup(mainl, "main", "icon16/wrench.png")
  974. first:GetParent():SetExpanded(true)
  975. ch.derma:AddOption(first, "panic", "panic", "PANIC!! DISABLE EVERYTHING!!")
  976. ch.derma:AddSpacer(first)
  977. ch.derma:AddSpacer(first)
  978. ch.derma:AddButton(first, "reload honocheat", "completely unload the cheat", reload)
  979. ch.derma:AddButton(first, "unload honocheat", "completely unload the cheat", unload)
  980. ch.derma:AddButton(first, "delete save files", "delete ALL presets you have made", function()
  981. Derma_Query("Are you sure you want to delete ALL your configuration files? This cannot be undone.","Are you sure?","delete them",function()
  982. local cheat = file.Find("hnc/cheat/*", "DATA")
  983. local ent = file.Find("hnc/ents/*", "DATA")
  984. local friends = file.Find("hnc/friends/*", "DATA")
  985. for k, v in next, cheat do
  986. file.Delete("hnc/cheat/"..v)
  987. end
  988. for k, v in next, ent do
  989. file.Delete("hnc/ents/"..v)
  990. end
  991. for k, v in next, friends do
  992. file.Delete("hnc/friends/"..v)
  993. end
  994. end, "no wait")
  995. end)
  996.  
  997. local aimbot = vgui.Create("DPanel", p)
  998. aimbot:Dock(FILL)
  999.  
  1000. local aimbotl = vgui.Create("DCategoryList", aimbot)
  1001. aimbotl:Dock(FILL)
  1002. aimbotl:DockPadding(0,0,0,0)
  1003. local aim = ch.derma:AddGroup(aimbotl, "aimbot", "icon16/user.png")
  1004. ch.derma:AddOption(aim, "aimbot", {"aimbot","enabled"}, "who needs manual aiming lol")
  1005. ch.derma:AddSpacer(aim)
  1006. ch.derma:AddOption(aim, "aim on key", {"aimbot","onkey"}, "does the aimbot aim when you're pressing a key?")
  1007. ch.derma:AddButton(aim, "aimbot key", "set which key you'll press to activate aimbot", function()
  1008. local fr = vgui.Create("DFrame")
  1009. fr:SetTitle("aimbot key binding")
  1010. fr:SetSize(150,75)
  1011. fr:SetPos(ch.derma.frame:GetPos())
  1012. fr:SetScreenLock(true)
  1013. fr:MakePopup()
  1014. f.submenus[#f.submenus + 1] = fr
  1015.  
  1016. local kb = vgui.Create("DBinder", fr)
  1017. kb:Dock(TOP)
  1018. kb:SetValue(ch.vars.aimbot.key)
  1019. kb.OnChange = function(_,key)
  1020. ch.vars.aimbot.key = key
  1021. end
  1022. end)
  1023. ch.derma:AddSpacer(aim)
  1024. ch.derma:AddOption(aim, "stick to target", {"aimbot","stick"}, "dont switch targets until they're dead")
  1025. ch.derma:AddOption(aim, "smooth aim", {"aimbot","smooth"}, "should the aimbot smooth your aim?\n(no snap, it's smooth)")
  1026. ch.derma:AddOption(aim, "line of sight", {"aimbot","los"}, "do a line of sight check before aiming")
  1027. ch.derma:AddOption(aim, "free aim", {"aimbot","freeaim"}, "move your camera while aimbot is working")
  1028. ch.derma:AddOption(aim, "draw fov", {"aimbot","drawfov"}, "show your set fov value")
  1029. ch.derma:AddCombo(aim, "aimbot type", "what type of aimbot you want", {"aimbot","type"}, {"distance", "fov"})
  1030. ch.derma:AddSlider(aim, "aimbot smoothing", "the amount the aimbot smooths your aim for you", {"aimbot","smoothstep"}, 2, .5, 0, 1)
  1031. ch.derma:AddSlider(aim, "aimbot distance", "how far players must be before they're targeted for aimbot", {"aimbot","dist"}, 0, 400, 0, 8000)
  1032. ch.derma:AddSlider(aim, "aimbot fov", "how close players must be to your crosshair before targeting", {"aimbot","fov"}, 0, 90, 1, ScrW()/2)
  1033.  
  1034. local esp = vgui.Create("DPanel", p)
  1035. esp:Dock(FILL)
  1036.  
  1037. local espl = vgui.Create("DCategoryList", esp)
  1038. espl:Dock(FILL)
  1039. espl:DockPadding(0,0,0,0)
  1040. local players = ch.derma:AddGroup(espl, "Player ESP", "icon16/group.png")
  1041. ch.derma:AddOption(players, "esp", {"esp","enabled"}, "enable esp overall")
  1042. ch.derma:AddSpacer(players)
  1043. ch.derma:AddOption(players, "chams", {"esp","chams"}, "see player models through walls as a single color\nright click to edit", function(but)
  1044. local fr = vgui.Create("DFrame")
  1045. fr:SetTitle("customize chams")
  1046. fr:SetSize(400,400)
  1047. fr:SetPos(ch.derma.frame:GetPos())
  1048. fr:SetScreenLock(true)
  1049. fr:MakePopup()
  1050. f.submenus[#f.submenus + 1] = fr
  1051.  
  1052. local cm = vgui.Create("DColorMixer", fr)
  1053. cm:Dock(FILL)
  1054. cm:SetColor(ch.vars.esp.color)
  1055. cm.ValueChanged = function(self, col)
  1056. ch.vars.esp.color = col
  1057. end
  1058.  
  1059. local co = vgui.Create("DComboBox", fr)
  1060. co:Dock(BOTTOM)
  1061. co:AddChoice("solid", 1)
  1062. co:AddChoice("rainbow", 2)
  1063. co:AddChoice("team", 3)
  1064. co:ChooseOptionID(ch.vars.esp.chamtype)
  1065. co.OnSelect = function(self,val,d)
  1066. ch.vars.esp.chamtype = val
  1067. end
  1068. end)
  1069. ch.derma:AddOption(players, "trace", {"esp","trace"}, "see where players are looking")
  1070. ch.derma:AddOption(players, "halo outline", {"esp","halo"}, "glow around players\nright click to edit", function(but)
  1071. local fr = vgui.Create("DFrame")
  1072. fr:SetTitle("customize halo")
  1073. fr:SetSize(400,400)
  1074. fr:SetPos(ch.derma.frame:GetPos())
  1075. fr:SetScreenLock(true)
  1076. fr:MakePopup()
  1077. f.submenus[#f.submenus + 1] = fr
  1078.  
  1079. local cm = vgui.Create("DColorMixer", fr)
  1080. cm:Dock(FILL)
  1081. cm:SetColor(ch.vars.esp.halocol)
  1082. cm.ValueChanged = function(self, col)
  1083. ch.vars.esp.halocol = col
  1084. end
  1085.  
  1086. local bco = vgui.Create("DComboBox", fr)
  1087. bco:Dock(BOTTOM)
  1088. bco:AddChoice("solid", 1)
  1089. bco:AddChoice("rainbow", 2)
  1090. bco:AddChoice("team", 3)
  1091. bco:ChooseOptionID(ch.vars.esp.halocoltype)
  1092. bco.OnSelect = function(self,val,d)
  1093. ch.vars.esp.halocoltype = val
  1094. end
  1095. end)
  1096. ch.derma:AddOption(players, "distance fade", {"esp","fade"}, "fade text the further they are from you")
  1097. ch.derma:AddOption(players, "bounding box", {"esp","box"}, "see dimensions of players\nright click to edit", function(but)
  1098. local fr = vgui.Create("DFrame")
  1099. fr:SetTitle("customize bounding box")
  1100. fr:SetSize(400,400)
  1101. fr:SetPos(ch.derma.frame:GetPos())
  1102. fr:SetScreenLock(true)
  1103. fr:MakePopup()
  1104. f.submenus[#f.submenus + 1] = fr
  1105.  
  1106. local cm = vgui.Create("DColorMixer", fr)
  1107. cm:Dock(FILL)
  1108. cm:SetColor(ch.vars.esp.boxcol)
  1109. cm.ValueChanged = function(self, col)
  1110. ch.vars.esp.boxcol = col
  1111. end
  1112.  
  1113. local bco = vgui.Create("DComboBox", fr)
  1114. bco:Dock(BOTTOM)
  1115. bco:AddChoice("solid", 1)
  1116. bco:AddChoice("rainbow", 2)
  1117. bco:AddChoice("team", 3)
  1118. bco:ChooseOptionID(ch.vars.esp.boxcoltype)
  1119. bco.OnSelect = function(self,val,d)
  1120. ch.vars.esp.boxcoltype = val
  1121. end
  1122.  
  1123. local co = vgui.Create("DComboBox", fr)
  1124. co:Dock(BOTTOM)
  1125. co:AddChoice("2d", 1)
  1126. co:AddChoice("3d", 2)
  1127. co:ChooseOptionID(ch.vars.esp.boxtype)
  1128. co.OnSelect = function(self,val,d)
  1129. ch.vars.esp.boxtype = val
  1130. end
  1131. end)
  1132. ch.derma:AddSpacer(players)
  1133. if ttt then ch.derma:AddOption(players, "TTT - find traitors", {"esp","traitors"}, "mark any idiot who buys t weapons as ts") end
  1134. if morbus then ch.derma:AddOption(players, "MORBUS - find aliens", {"esp","morbus"}, "mark any alien as an alien") end
  1135. if murder then ch.derma:AddOption(players, "Murder - find roles", {"esp","murroles"}, "mark all those idiots as their roles") end
  1136. ch.derma:AddOption(players, "name", {"esp","name"}, "show name of players")
  1137. ch.derma:AddOption(players, "mark friends", {"esp","friends"}, "see dimensions of players\nright click to edit", function(but)
  1138. local fr = vgui.Create("DFrame")
  1139. fr:SetTitle("customize color")
  1140. fr:SetSize(400,400)
  1141. fr:SetPos(ch.derma.frame:GetPos())
  1142. fr:SetScreenLock(true)
  1143. fr:MakePopup()
  1144. f.submenus[#f.submenus + 1] = fr
  1145.  
  1146. local cm = vgui.Create("DColorMixer", fr)
  1147. cm:Dock(FILL)
  1148. cm:SetColor(ch.vars.esp.friendcol)
  1149. cm.ValueChanged = function(self, col)
  1150. ch.vars.esp.friendcol = col
  1151. end
  1152. end)
  1153. ch.derma:AddOption(players, "steam name", {"esp","sname"}, "show steam name of players")
  1154. ch.derma:AddOption(players, "rank", {"esp","rank"}, "show the user group of players")
  1155. ch.derma:AddOption(players, "weapon", {"esp","weapon"}, "show current weapon of players")
  1156. ch.derma:AddOption(players, "health", {"esp","health"}, "show current health of players")
  1157. ch.derma:AddOption(players, "armor", {"esp","armor"}, "show current armor of players")
  1158. if DarkRP then ch.derma:AddOption(players, "money", {"esp","drpmon"}, "show how much money a person has") end
  1159. if Clockwork or blackbox then ch.derma:AddOption(players, "talk distance", {"esp","cwtalk"}, "show talk distance from players in clockwork") end
  1160. ch.derma:AddOption(players, "distance", {"esp","showdist"}, "show distance from you")
  1161. ch.derma:AddSpacer(players)
  1162. ch.derma:AddSlider(players, "esp distance", "how far players must be before they're culled out", {"esp","dist"}, 1, 4500, 0, 16000)
  1163.  
  1164. local ent = ch.derma:AddGroup(espl, "Entity ESP", "icon16/brick.png")
  1165. ch.derma:AddOption(ent, "ent esp", {"entesp","enabled"}, "enable entity esp")
  1166. ch.derma:AddSpacer(ent)
  1167. ch.derma:AddButton(ent, "add entities", "add entities that you want to find to the whitelist", function()
  1168. local fr = vgui.Create("DFrame")
  1169. fr:SetTitle("double click to swap")
  1170. fr:SetSize(500,300)
  1171. fr:SetPos(ch.derma.frame:GetPos())
  1172. fr:SetScreenLock(true)
  1173. fr:MakePopup()
  1174. f.submenus[#f.submenus + 1] = fr
  1175.  
  1176. local olist = vgui.Create( "DListView", fr )
  1177. olist:SetPos(0,20)
  1178. olist:SetSize(250,280)
  1179. olist:SetMultiSelect( false )
  1180. olist:AddColumn( "Off ESP" )
  1181.  
  1182. local elist = vgui.Create( "DListView", fr )
  1183. elist:SetPos(250,20)
  1184. elist:SetSize(250,280)
  1185. elist:SetMultiSelect( false )
  1186. elist:AddColumn( "On ESP" )
  1187.  
  1188. local function refresh()
  1189. local dupes = {} -- duplicate entries
  1190. elist:Clear()
  1191. olist:Clear()
  1192. for k, v in next, ents.GetAll() do
  1193. if ch.vars.ents[v:GetClass()] or v:IsPlayer() or dupes[v:GetClass()] then continue end
  1194. dupes[v:GetClass()] = true
  1195. olist:AddLine(v:GetClass())
  1196. end
  1197. for k, v in next, ch.vars.ents do
  1198. elist:AddLine(k)
  1199. end
  1200. end
  1201.  
  1202. refresh()
  1203.  
  1204. olist.DoDoubleClick = function(self, id, line )
  1205. ch.vars.ents[line:GetColumnText(1)] = true
  1206. refresh()
  1207. end
  1208. elist.DoDoubleClick = function(self, id, line )
  1209. ch.vars.ents[line:GetColumnText(1)] = nil
  1210. refresh()
  1211. end
  1212. end)
  1213. if ttt then
  1214. local known = {
  1215. ttt_c4 = true,
  1216. ttt_health_station = true,
  1217. }
  1218. ch.derma:AddButton(ent, "TTT- find ents", "find any known ttt related entity and mark it\nif you have suggestions, tell us", function()
  1219. for k, v in next, known do
  1220. ch.vars.ents[k] = true
  1221. end
  1222. end)
  1223. ch.derma:AddButton(ent, "TTT- find ragdolls", "mark ragdolls", function()
  1224. ch.vars.ents.prop_ragdoll = true
  1225. end)
  1226. end
  1227. ch.derma:AddSpacer(ent)
  1228. ch.derma:AddOption(ent, "halo outline", {"entesp","halo"}, "glow around entities\nright click to edit",function(but)
  1229. local fr = vgui.Create("DFrame")
  1230. fr:SetTitle("customize halo")
  1231. fr:SetSize(400,400)
  1232. fr:SetPos(ch.derma.frame:GetPos())
  1233. fr:SetScreenLock(true)
  1234. fr:MakePopup()
  1235. f.submenus[#f.submenus + 1] = fr
  1236.  
  1237. local cm = vgui.Create("DColorMixer", fr)
  1238. cm:Dock(FILL)
  1239. cm:SetColor(ch.vars.entesp.halocol)
  1240. cm.ValueChanged = function(self, col)
  1241. ch.vars.entesp.halocol = col
  1242. end
  1243.  
  1244. local bco = vgui.Create("DComboBox", fr)
  1245. bco:Dock(BOTTOM)
  1246. bco:AddChoice("solid", 1)
  1247. bco:AddChoice("rainbow", 2)
  1248. bco:ChooseOptionID(ch.vars.entesp.halocoltype)
  1249. bco.OnSelect = function(self,val,d)
  1250. ch.vars.entesp.halocoltype = val
  1251. end
  1252. end)
  1253. ch.derma:AddOption(ent, "distance fade", {"entesp","fade"}, "fade text the further ents are from you")
  1254. ch.derma:AddOption(ent, "bounding box", {"entesp","box"}, "see dimensions of entities\nright click to edit", function(but)
  1255. local fr = vgui.Create("DFrame")
  1256. fr:SetTitle("customize bounding box")
  1257. fr:SetSize(400,400)
  1258. fr:SetPos(ch.derma.frame:GetPos())
  1259. fr:SetScreenLock(true)
  1260. fr:MakePopup()
  1261. f.submenus[#f.submenus + 1] = fr
  1262.  
  1263. local cm = vgui.Create("DColorMixer", fr)
  1264. cm:Dock(FILL)
  1265. cm:SetColor(ch.vars.entesp.boxcol)
  1266. cm.ValueChanged = function(self, col)
  1267. ch.vars.entesp.boxcol = col
  1268. end
  1269.  
  1270. local bco = vgui.Create("DComboBox", fr)
  1271. bco:Dock(BOTTOM)
  1272. bco:AddChoice("solid", 1)
  1273. bco:AddChoice("rainbow", 2)
  1274. bco:ChooseOptionID(ch.vars.entesp.boxcoltype)
  1275. bco.OnSelect = function(self,val,d)
  1276. ch.vars.entesp.boxcoltype = val
  1277. end
  1278.  
  1279. local co = vgui.Create("DComboBox", fr)
  1280. co:Dock(BOTTOM)
  1281. co:AddChoice("2d", 1)
  1282. co:AddChoice("3d", 2)
  1283. co:ChooseOptionID(ch.vars.entesp.boxtype)
  1284. co.OnSelect = function(self,val,d)
  1285. ch.vars.entesp.boxtype = val
  1286. end
  1287. end)
  1288. ch.derma:AddSpacer(ent)
  1289. ch.derma:AddSlider(ent, "ent esp distance", "how far entities must be before they're culled out", {"entesp","dist"}, 1, 4500, 0, 16000)
  1290.  
  1291. local npc = ch.derma:AddGroup(espl, "NPC ESP", "icon16/user_gray.png")
  1292. ch.derma:AddOption(npc, "npc esp", {"npcesp", "enabled"}, "enable npc esp")
  1293. ch.derma:AddSpacer(npc)
  1294. ch.derma:AddOption(npc, "chams", {"npcesp", "chams"}, "see npcs through walls as a single color\nright click to edit", function(but)
  1295. local fr = vgui.Create("DFrame")
  1296. fr:SetTitle("customize chams")
  1297. fr:SetSize(400,400)
  1298. fr:SetPos(ch.derma.frame:GetPos())
  1299. fr:SetScreenLock(true)
  1300. fr:MakePopup()
  1301. f.submenus[#f.submenus + 1] = fr
  1302.  
  1303. local cm = vgui.Create("DColorMixer", fr)
  1304. cm:Dock(FILL)
  1305. cm:SetColor(ch.vars.npcesp.color)
  1306. cm.ValueChanged = function(self, col)
  1307. ch.vars.npcesp.color = col
  1308. end
  1309.  
  1310. local co = vgui.Create("DComboBox", fr)
  1311. co:Dock(BOTTOM)
  1312. co:AddChoice("solid", 1)
  1313. co:AddChoice("rainbow", 2)
  1314. co:ChooseOptionID(ch.vars.npcesp.chamtype)
  1315. co.OnSelect = function(self,val,d)
  1316. ch.vars.npcesp.chamtype = val
  1317. end
  1318. end)
  1319. ch.derma:AddOption(npc, "halo outline", {"npcesp", "halo"}, "glow around npcs\nright click to edit",function(but)
  1320. local fr = vgui.Create("DFrame")
  1321. fr:SetTitle("customize halo")
  1322. fr:SetSize(400,400)
  1323. fr:SetPos(ch.derma.frame:GetPos())
  1324. fr:SetScreenLock(true)
  1325. fr:MakePopup()
  1326. f.submenus[#f.submenus + 1] = fr
  1327.  
  1328. local cm = vgui.Create("DColorMixer", fr)
  1329. cm:Dock(FILL)
  1330. cm:SetColor(ch.vars.npcesp.halocol)
  1331. cm.ValueChanged = function(self, col)
  1332. ch.vars.npcesp.halocol = col
  1333. end
  1334.  
  1335. local bco = vgui.Create("DComboBox", fr)
  1336. bco:Dock(BOTTOM)
  1337. bco:AddChoice("solid", 1)
  1338. bco:AddChoice("rainbow", 2)
  1339. bco:ChooseOptionID(ch.vars.npcesp.halocoltype)
  1340. bco.OnSelect = function(self,val,d)
  1341. ch.vars.npcesp.halocoltype = val
  1342. end
  1343. end)
  1344. ch.derma:AddOption(npc, "distance fade", {"npcesp", "fade"}, "fade text the further npcs are from you")
  1345. ch.derma:AddOption(npc, "bounding box", {"npcesp", "box"}, "see dimensions of npcs\nright click to edit", function(but)
  1346. local fr = vgui.Create("DFrame")
  1347. fr:SetTitle("customize bounding box")
  1348. fr:SetSize(400,400)
  1349. fr:SetPos(ch.derma.frame:GetPos())
  1350. fr:SetScreenLock(true)
  1351. fr:MakePopup()
  1352. f.submenus[#f.submenus + 1] = fr
  1353.  
  1354. local cm = vgui.Create("DColorMixer", fr)
  1355. cm:Dock(FILL)
  1356. cm:SetColor(ch.vars.npcesp.boxcol)
  1357. cm.ValueChanged = function(self, col)
  1358. ch.vars.npcesp.boxcol = col
  1359. end
  1360.  
  1361. local bco = vgui.Create("DComboBox", fr)
  1362. bco:Dock(BOTTOM)
  1363. bco:AddChoice("solid", 1)
  1364. bco:AddChoice("rainbow", 2)
  1365. bco:ChooseOptionID(ch.vars.npcesp.boxcoltype)
  1366. bco.OnSelect = function(self,val,d)
  1367. ch.vars.npcesp.boxcoltype = val
  1368. end
  1369.  
  1370. local co = vgui.Create("DComboBox", fr)
  1371. co:Dock(BOTTOM)
  1372. co:AddChoice("2d", 1)
  1373. co:AddChoice("3d", 2)
  1374. co:ChooseOptionID(ch.vars.npcesp.boxtype)
  1375. co.OnSelect = function(self,val,d)
  1376. ch.vars.npcesp.boxtype = val
  1377. end
  1378. end)
  1379. ch.derma:AddSpacer(npc)
  1380. ch.derma:AddOption(npc, "name", {"npcesp","name"}, "show class of npcs")
  1381. ch.derma:AddOption(npc, "weapon", {"npcesp","weapon"}, "show current weapon of npcs")
  1382. ch.derma:AddOption(npc, "health", {"npcesp","health"}, "show current health of npcs")
  1383. ch.derma:AddOption(npc, "distance", {"npcesp","showdist"}, "show distance from you")
  1384. ch.derma:AddSpacer(npc)
  1385. ch.derma:AddSlider(npc, "ent esp distance", "how far entities must be before they're culled out", {"npcesp","dist"}, 1, 4500, 0, 16000)
  1386.  
  1387. local misc = vgui.Create("DPanel", p)
  1388. misc:Dock(FILL)
  1389.  
  1390. local miscl = vgui.Create("DCategoryList", misc)
  1391. miscl:Dock(FILL)
  1392. miscl:DockPadding(0,0,0,0)
  1393.  
  1394. local friend = ch.derma:AddGroup(miscl, "friends", "icon16/group.png")
  1395. ch.derma:AddButton(friend, "manage friends", [[set players as friends or not for the cheat to recognise]], function()
  1396. local fr = vgui.Create("DFrame")
  1397. fr:SetTitle("double click to swap (drag between steam id and name to resize)")
  1398. fr:SetSize(500,300)
  1399. fr:SetPos(ch.derma.frame:GetPos())
  1400. fr:SetScreenLock(true)
  1401. fr:MakePopup()
  1402. f.submenus[#f.submenus + 1] = fr
  1403.  
  1404. local olist = vgui.Create( "DListView", fr )
  1405. olist:SetPos(0,20)
  1406. olist:SetSize(250,254)
  1407. olist:SetMultiSelect( false )
  1408. olist:AddColumn("STEAMID")
  1409. olist:AddColumn("Enemies")
  1410.  
  1411. local ilist = vgui.Create( "DListView", fr )
  1412. ilist:SetPos(250,20)
  1413. ilist:SetSize(250,254)
  1414. ilist:SetMultiSelect( false )
  1415. ilist:AddColumn("STEAMID")
  1416. ilist:AddColumn("Friends")
  1417.  
  1418. local function refresh()
  1419. olist:Clear()
  1420. ilist:Clear()
  1421. for k, v in next, ents.GetAll() do
  1422. if not v:IsPlayer() then continue end
  1423. if ch.vars.friends[v:SteamID()] then continue end
  1424. if v == me then continue end
  1425. olist:AddLine(v:SteamID(),(UndecorateNick and UndecorateNick(v:Nick()) or v:Nick()))
  1426. end
  1427. for k, v in next, ch.vars.friends do
  1428. local ply = player.GetBySteamID(k)
  1429. ilist:AddLine(k,(ply and UndecorateNick and UndecorateNick(ply:Nick()) or ply:Nick()))
  1430. end
  1431. end
  1432.  
  1433. refresh()
  1434.  
  1435. olist.DoDoubleClick = function(self,id,line)
  1436. ch.vars.friends[line:GetColumnText(1)] = true
  1437. refresh()
  1438. end
  1439.  
  1440. ilist.DoDoubleClick = function(self,id,line)
  1441. ch.vars.friends[line:GetColumnText(1)] = nil
  1442. refresh()
  1443. end
  1444.  
  1445. local addsteam = vgui.Create("DButton", fr)
  1446. addsteam:Dock(BOTTOM)
  1447. addsteam:SetText("steam friends as friends")
  1448. addsteam.DoClick = function(self,a,b)
  1449. for k, v in next, ents.GetAll() do
  1450. if not v:IsPlayer() then continue end
  1451. if ch.vars.friends[v:SteamID()] then continue end
  1452. if v:GetFriendStatus() == "friend" then
  1453. ch.vars.friends[v:SteamID()] = true
  1454. end
  1455. end
  1456. refresh()
  1457. end
  1458. end)
  1459.  
  1460. local mi = ch.derma:AddGroup(miscl, "misc", "icon16/text_align_center.png")
  1461. ch.derma:AddOption(mi, "lazy guns", "lazyguns", "automatically shoot and reload weapons while holding keys")
  1462. ch.derma:AddOption(mi, "triggerbot", "triggerbot", "automatically shoot your gun when aiming at something")
  1463. ch.derma:AddSpacer(mi)
  1464. ch.derma:AddOption(mi, "bhop", "bhop", "jump automatically while holding space")
  1465. ch.derma:AddSpacer(mi)
  1466. ch.derma:AddOption(mi, "spectators", "spectators", "see who's spectating you, if anyone")
  1467. ch.derma:AddOption(mi, "death notifications", "player_die", "notify you when a player dies")
  1468. ch.derma:AddSpacer(mi)
  1469. ch.derma:AddOption(mi, "crosshair", {"crosshair","enabled"}, "custom crosshair, because why not")
  1470. ch.derma:AddButton(mi, "customize crosshair", "customize colors or size of crosshairs", function()
  1471. local fr = vgui.Create("DFrame")
  1472. fr:SetTitle("crosshair customizer")
  1473. fr:SetSize(400,400)
  1474. fr:SetPos(ch.derma.frame:GetPos())
  1475. fr:SetScreenLock(true)
  1476. fr:MakePopup()
  1477. f.submenus[#f.submenus + 1] = fr
  1478.  
  1479. local cm = vgui.Create("DColorMixer", fr)
  1480. cm:Dock(FILL)
  1481. cm:SetColor(ch.vars.crosshair.color)
  1482. cm.ValueChanged = function(self, col)
  1483. ch.vars.crosshair.color = col
  1484. end
  1485.  
  1486. local co = vgui.Create("DComboBox", fr)
  1487. co:Dock(BOTTOM)
  1488. co:AddChoice("square", 1)
  1489. co:AddChoice("cross", 2)
  1490. co:ChooseOptionID(ch.vars.crosshair.type)
  1491. co.OnSelect = function(self,val,d)
  1492. ch.vars.crosshair.type = isnumber(val) and val or 1
  1493. end
  1494.  
  1495. local ss = vgui.Create("DNumSlider", fr)
  1496. ss:Dock(BOTTOM)
  1497. ss:SetText("crosshair size")
  1498. ss:SetMin(1)
  1499. ss:SetMax(64)
  1500. ss:SetDecimals(0)
  1501. ss:SetValue(ch.vars.crosshair.size)
  1502. ss.OnValueChanged = function(self, v)
  1503. ch.vars.crosshair.size = v
  1504. end
  1505. end)
  1506.  
  1507. local netmeme = vgui.Create("DPanel", p)
  1508. netmeme:Dock(FILL)
  1509. netmeme:SetBackgroundColor(Color(0,0,0,0))
  1510.  
  1511. local nettext = vgui.Create("RichText", netmeme)
  1512. nettext:Dock(FILL)
  1513.  
  1514. local netblock = vgui.Create("DButton", netmeme)
  1515. netblock:Dock(TOP)
  1516. netblock:SetText("filter net messages")
  1517. netblock.DoClick = function(self)
  1518. local fr = vgui.Create("DFrame")
  1519. fr:SetTitle("filter net messages")
  1520. fr:SetSize(500,300)
  1521. fr:SetPos(ch.derma.frame:GetPos())
  1522. fr:SetScreenLock(true)
  1523. fr:MakePopup()
  1524. f.submenus[#f.submenus + 1] = fr
  1525.  
  1526. local olist = vgui.Create( "DListView", fr )
  1527. olist:SetPos(0,20)
  1528. olist:SetSize(250,280)
  1529. olist:SetMultiSelect( false )
  1530. olist:AddColumn( "Not Filtering" )
  1531.  
  1532. local elist = vgui.Create( "DListView", fr )
  1533. elist:SetPos(250,20)
  1534. elist:SetSize(250,280)
  1535. elist:SetMultiSelect( false )
  1536. elist:AddColumn( "Filtering Out" )
  1537.  
  1538. local function refresh()
  1539. olist:Clear()
  1540. elist:Clear()
  1541. for k, v in next, net.Receivers do
  1542. if ch.vars.net[k] then continue end
  1543. olist:AddLine(k)
  1544. end
  1545. for k, v in next, ch.vars.net do
  1546. elist:AddLine(k)
  1547. end
  1548. end
  1549.  
  1550. refresh()
  1551.  
  1552. olist.DoDoubleClick = function(_, id, line )
  1553. ch.vars.net[line:GetColumnText(1)] = true
  1554. refresh()
  1555. end
  1556. elist.DoDoubleClick = function(_, id, line )
  1557. ch.vars.net[line:GetColumnText(1)] = nil
  1558. refresh()
  1559. end
  1560. end
  1561.  
  1562. local cams = ch.derma:AddGroup(miscl, "cams", "icon16/camera.png")
  1563. ch.derma:AddOption(cams, "cam cheats", {"cams","enabled"})
  1564. ch.derma:AddOption(cams, "freecam", {"cams","freecam"}, "client side noclip, your character stays in place")
  1565. ch.derma:AddSlider(cams, "freecam speed", "how fast you fly around while freecaming", {"cams","freespeed"}, 1, 5, 1, 30)
  1566. ch.derma:AddSpacer(cams)
  1567. ch.derma:AddOption(cams, "fullbright", "fullbright", "like mat_fullbright 1, except it doesnt force cvars")
  1568.  
  1569. local exploits = vgui.Create("DPanel", p)
  1570. ch.derma.exploits = exploits
  1571. exploits:Dock(FILL)
  1572.  
  1573. local preset = vgui.Create("DPanel", p)
  1574. preset:Dock(FILL)
  1575.  
  1576. local prel = vgui.Create("DCategoryList", preset)
  1577. prel:Dock(FILL)
  1578. prel:DockPadding(0,0,0,0)
  1579.  
  1580. local pre = ch.derma:AddGroup(prel, "Presets", "icon16/page.png")
  1581. ch.derma:AddButton(pre, "preset loader", "open preset loader", function(self)
  1582. local fr = vgui.Create("DFrame")
  1583. fr:SetSize(310,340)
  1584. fr:SetPos(ch.derma.frame:GetPos())
  1585. fr:SetTitle("")
  1586. fr:MakePopup()
  1587. fr:SetScreenLock(true)
  1588. f.submenus[#f.submenus + 1] = fr
  1589.  
  1590. local tree = vgui.Create("DTree", fr)
  1591. tree:Dock(FILL)
  1592.  
  1593. local l = tree:AddNode("configs")
  1594. l:MakeFolder("data/hnc","GAME",true)
  1595. l:SetExpanded(true,true)
  1596.  
  1597. tree.OnNodeSelected = function(_, node)
  1598. if node:GetFileName() then
  1599. local tab = util.JSONToTable(file.Read((node:GetFileName():gsub("data/(.-)",""))))
  1600. local dir = node:GetFileName():gsub("data/hnc/(.-)",""):gsub("/(.+)%.txt","")
  1601. if dir == "cheat" then
  1602. for k, v in next, tab do
  1603. if istable(v) then
  1604. ch.vars[k] = table.Merge(ch.vars[k],v)
  1605. else
  1606. ch.vars[k] = v
  1607. end
  1608. end
  1609. elseif dir == "ents" or dir == "friends" or dir == "net" then
  1610. ch.vars[dir] = table.Merge(ch.vars[dir],tab)
  1611. end
  1612. fr:Close()
  1613. end
  1614. end
  1615. end)
  1616. ch.derma:AddButton(pre, "save current setup", "save the current cheat setup as a preset for later", function()
  1617. local tab = table.Copy(ch.vars)
  1618. local ent = table.Copy(ch.vars.ents)
  1619. local friend = table.Copy(ch.vars.friends)
  1620. local xnet = table.Copy(ch.vars.netblock)
  1621. tab.panic = nil tab.friends = nil tab.ents = nil
  1622.  
  1623. Derma_StringRequest("File Name", "Enter the desired preset name", "", function(nam)
  1624. if not nam or nam == "" then
  1625. nam = tostring(math.random(0, 9999))
  1626. end
  1627.  
  1628. file.Write("hnc/cheat/"..nam..".txt", util.TableToJSON(tab, false))
  1629. file.Write("hnc/ents/"..nam..".txt", util.TableToJSON(ent, false))
  1630. file.Write("hnc/friends/"..nam..".txt", util.TableToJSON(friend, false))
  1631. file.Write("hnc/net/"..nam..".txt", util.TableToJSON(xnet, false))
  1632. end)
  1633.  
  1634. end)
  1635. ch.derma:AddSpacer(pre)
  1636. ch.derma:AddButton(pre, "esp presets", "browse cheat presets")
  1637. ch.derma:AddButton(pre, "friends presets", "browse friends presets")
  1638. ch.derma:AddButton(pre, "ents presets", "browse entity presets")
  1639.  
  1640. p:AddSheet("main", main)
  1641. p:AddSheet("aimbot", aimbot)
  1642. p:AddSheet("esp", esp)
  1643. p:AddSheet("misc", misc)
  1644. p:AddSheet("net", netmeme)
  1645. p:AddSheet("exploits", exploits)
  1646. p:AddSheet("presets", preset)
  1647. end
  1648.  
  1649. -- serious roleplay gamemodes exploits
  1650. do
  1651. if Clockwork then
  1652. ch:AddExploit("pickupinradius", "Clockwork - Pick up in radius", "Pick up Clockwork items in a radius around you regardless of walls", function()
  1653. for k,v in next, ents.FindInSphere(me:GetPos(), 256) do
  1654. if v:IsValid() then
  1655. if v:GetClass() == "cw_item" then
  1656. Clockwork.datastream:Start("EntityMenuOption", {v, "cwItemTake", "cwItemTake"})
  1657. elseif v:GetClass() == "cw_cash" then
  1658. Clockwork.datastream:Start("EntityMenuOption", {v, "cwCashTake", "cwCashTake"})
  1659. elseif v:GetClass() == "cw_shipment" then
  1660. Clockwork.datastream:Start("EntityMenuOption", {v, "cwShipmentOpen", "cwShipmentOpen"})
  1661. elseif v:GetClass() == "cw_belongings" then
  1662. Clockwork.datastream:Start("EntityMenuOption", {v, "Open", "cwBelongingsOpen"})
  1663. elseif v:GetClass() == "prop_physics" then
  1664. Clockwork.datastream:Start("EntityMenuOption", {v, "cwContainerOpen", "cwContainerOpen"})
  1665. elseif v:GetClass() == "prop_ragdoll" then
  1666. Clockwork.datastream:Start("EntityMenuOption", {v, "cwContainerOpen", "cwContainerOpen"})
  1667. end
  1668. end
  1669. end
  1670. end)
  1671. ch:AddExploit("dupeinradius", "Clockwork - Dupe in radius", "Duplicate Clockwork items in a radius around you regardless of walls", function()
  1672. for k, v in next, ents.FindInSphere(me:GetPos(), 256) do
  1673. if v:IsValid() then
  1674. if v:GetClass() == "cw_item" then
  1675. for i=1,3 do
  1676. Clockwork.datastream:Start("EntityMenuOption", {v, "cwItemTake", "cwItemTake"})
  1677. end
  1678. elseif v:GetClass() == "cw_cash" then
  1679. for i=1,3 do
  1680. Clockwork.datastream:Start("EntityMenuOption", {v, "cwCashTake", "cwCashTake"})
  1681. end
  1682. end
  1683. end
  1684. end
  1685. end)
  1686. elseif blackbox then
  1687. ch:AddExploit("pickupinradius", "Blackbox - Pick up in radius", "Pick up Blackbox items in a radius around you regardless of walls", function()
  1688. for k, v in next, ents.FindInSphere(me:GetPos(), 256) do
  1689. if v:IsValid() then
  1690. if v:GetClass() == "bb_item" then
  1691. BLACKBOX:SendNetStream("EntityMenuOption", {v, "bb_itemTake", "bb_itemTake"})
  1692. elseif v:GetClass() == "bb_cash" then
  1693. BLACKBOX:SendNetStream("EntityMenuOption", {v, "bb_cashTake", "bb_cashTake"})
  1694. elseif v:GetClass() == "bb_shipment" then
  1695. BLACKBOX:SendNetStream("EntityMenuOption", {v, "bb_shipmentOpen", "bb_shipmentOpen"})
  1696. --[[elseif v:GetClass() == "bb_belongings" then
  1697. BLACKBOX:SendNetStream("EntityMenuOption", {v, "Open", "cwBelongingsOpen"})]]
  1698. elseif v:GetClass() == "prop_physics" then
  1699. BLACKBOX:SendNetStream("EntityMenuOption", {v, "bb_itemTake", "bb_itemTake"})
  1700. elseif v:GetClass() == "prop_ragdoll" then
  1701. BLACKBOX:SendNetStream("EntityMenuOption", {v, "bb_itemTake", "bb_itemTake"})
  1702. end
  1703. end
  1704. end
  1705. end)
  1706. ch:AddExploit("dupeinradius", "Blackbox - Dupe in radius", "Duplicate Blackbox items in a radius around you regardless of walls", function()
  1707. for k, v in next, ents.FindInSphere(me:GetPos(), 256) do
  1708. if v:IsValid() then
  1709. if v:GetClass() == "bb_item" then
  1710. for i=1,3 do
  1711. BLACKBOX:SendNetStream("EntityMenuOption", {v, "bb_itemTake", "bb_itemTake"})
  1712. end
  1713. elseif v:GetClass() == "bb_cash" then
  1714. for i=1,3 do
  1715. BLACKBOX:SendNetStream("EntityMenuOption", {v, "bb_cashTake", "bb_cashTake"})
  1716. end
  1717. end
  1718. end
  1719. end
  1720. end)
  1721. elseif nut then
  1722. ch:AddExploit("pickupinradius", "NutScript - Pick up in radius", "Pick up NutScript items in a radius around you", function()
  1723. for k, v in next, ents.FindInSphere(me:GetPos(), 95) do
  1724. if v:GetClass() == "nut_item" then
  1725. netstream.Start("invAct","take",v)
  1726. end
  1727. end
  1728. end)
  1729. ch:AddExploit("dupeupinradius", "NutScript - Dupe in radius", "Duplicate NutScript items in a radius around you", function()
  1730. for k, v in next, ents.FindInSphere(me:GetPos(), 95) do
  1731. if v:GetClass() == "nut_item" then
  1732. for i=0,2 do
  1733. netstream.Start("invAct","take",v)
  1734. end
  1735. end
  1736. end
  1737. end)
  1738. end
  1739. end
  1740.  
  1741. -- net lib overrides
  1742. -- do early to try and catch things like cac before we get BANNI
  1743. do
  1744. ch:AddRestore("net",{
  1745. Incoming = net.Incoming,
  1746. Start = net.Start,
  1747. SendToServer = net.SendToServer,
  1748. },function(data)
  1749. for k, v in next, data do
  1750. _G.net[k] = v
  1751. end
  1752. end)
  1753.  
  1754. local richtext
  1755. for k, v in next, ch.derma.prop.Items do
  1756. if v.Name == "net" then
  1757. richtext = v.Panel:GetChildren()[1]
  1758. end
  1759. end
  1760.  
  1761. function richtext:Log(...)
  1762. local tab = {...}
  1763. self:InsertColorChange(255,255,255,255)
  1764. for k, v in next, tab do
  1765. if IsColor(v) then
  1766. self:InsertColorChange(v.r,v.g,v.b,v.a)
  1767. elseif istable(v) and not IsColor(v) then
  1768. self:AppendText(tostring(v))
  1769. else
  1770. self:AppendText(tostring(v or "nil"))
  1771. end
  1772. end
  1773. self:AppendText("\n")
  1774. end
  1775.  
  1776. -- test
  1777. local blacklist = {
  1778. ["cac_banme"] = true,
  1779. }
  1780. local function shouldlog(name)
  1781. for k, v in next, ch.vars.net do
  1782. if name:find(k) then
  1783. return false
  1784. end
  1785. end
  1786. return true
  1787. end
  1788.  
  1789. local lastrec = {}
  1790. function net.Incoming(len, client)
  1791. local origlen = len
  1792. local i = net.ReadHeader()
  1793. local strName = util.NetworkIDToString( i )
  1794.  
  1795. if not strName then return end
  1796.  
  1797. if shouldlog(strName:lower()) then
  1798. richtext:Log("Started ", Color(0,255,255), "incoming ", color_white, "net message ",
  1799. Color(129,255,62), "\""..strName.."\" ", color_white, "of length ", Color(255,129,0), origlen, ".")
  1800. end
  1801.  
  1802. lastrec[#lastrec] = {
  1803. name = strName
  1804. }
  1805.  
  1806. local func = net.Receivers[ strName:lower() ]
  1807. if not func then return end
  1808.  
  1809. --
  1810. -- len includes the 16 bit int which told us the message name
  1811. --
  1812. len = len - 16
  1813.  
  1814. func( len, client )
  1815. if shouldlog(strName:lower()) then
  1816. richtext:Log("Ended ", Color(0,255,255), "incoming ", color_white, "net message ",
  1817. Color(129,255,62), "\""..strName.."\" ", color_white, "of length ", Color(255,129,0), origlen, ".")
  1818. end
  1819. lastrec[#lastrec] = nil
  1820. end
  1821.  
  1822. local _netStart = net.Start
  1823. local lastwrite = {}
  1824. function net.Start(name, unreliable)
  1825. if shouldlog(name:lower()) then
  1826. richtext:Log("Started ", Color(0,255,255), "outgoing ", color_white, "net message ",
  1827. Color(129,255,62), "\""..name.."\" ", ".")
  1828. end
  1829. lastwrite[#lastwrite + 1] = {
  1830. name = name
  1831. }
  1832.  
  1833. if blacklist[lastwrite[#lastwrite].name:lower()] then
  1834. print("cac prolly i hope lol", lastwrite[#lastwrite].name)
  1835. return
  1836. end
  1837. _netStart(name,unreliable)
  1838. end
  1839.  
  1840. local _netSendToServer = net.SendToServer
  1841. function net.SendToServer()
  1842. local message = lastwrite[#lastwrite]
  1843. if shouldlog(message.name:lower()) then
  1844. richtext:Log("Ended ", Color(0,255,255), "outgoing ", color_white, "net message ",
  1845. Color(129,255,62), "\""..message.name.."\" ", color_white, "of length ", Color(255,129,0), message.length,
  1846. color_white, ". Total size: ", Color(255,129,0), net.BytesWritten())
  1847. end
  1848. local name = lastwrite[#lastwrite].name:lower()
  1849. lastwrite[#lastwrite] = nil
  1850. if blacklist[name] then return end
  1851.  
  1852. _netSendToServer()
  1853. end
  1854.  
  1855. for k, v in next, net do
  1856. if k:find"Read" and not k:find"Header" then
  1857. if isfunction(v) then
  1858. ch.restores.net.data[k] = v
  1859. local vartype = k:gsub("Read","")
  1860.  
  1861. net[k] = function(a)
  1862. local ret = v(a)
  1863. if shouldlog(lastrec[#lastrec].name:lower()) then
  1864. if a then
  1865. richtext:Log("\tRead ", Color(0,255,255), vartype, color_white, " of value ", Color(129,255,62), "\'"..tostring(ret).."\'",
  1866. color_white, " with parameters ", Color(0,255,255), "{"..tostring(a).."}", color_white, ".")
  1867. else
  1868. richtext:Log("\tRead ", Color(0,255,255), vartype, color_white, " of value ", Color(129,255,62), "\'"..tostring(ret).."\'",
  1869. color_white, ".")
  1870. end
  1871. end
  1872.  
  1873. return ret
  1874. end
  1875. end
  1876. elseif k:find"Write" then
  1877. if isfunction(v) then
  1878. ch.restores.net.data[k] = v
  1879. local vartype = k:gsub("Write","")
  1880.  
  1881. net[k] = function(a,b)
  1882. if shouldlog(lastwrite[#lastwrite].name:lower()) then
  1883. if b then
  1884. richtext:Log("\tWrote ", Color(0,255,255), vartype, color_white, " of value ", Color(129,255,62), "\'"..tostring(a).."\'",
  1885. color_white, " with parameters ", Color(0,255,255), "{"..tostring(a).."}", color_white, ".")
  1886. else
  1887. richtext:Log("\tWrote ", Color(0,255,255), vartype, color_white, " of value ", Color(129,255,62), "\'"..tostring(a).."\'",
  1888. color_white, ".")
  1889. end
  1890. end
  1891.  
  1892. if blacklist[lastwrite[#lastwrite].name:lower()] then return end
  1893. v(a,b)
  1894. end
  1895. end
  1896. end
  1897. end
  1898. end
  1899.  
  1900. -- HOOKS.
  1901. do
  1902. -- so i dont have to copypaste the same code
  1903. local function bbox(ent, type, col, alpha)
  1904. local min = ent:OBBMins()
  1905. local max = ent:OBBMaxs()
  1906. local points = {
  1907. top = {Vector(min.x,min.y,max.z),
  1908. Vector(min.x,max.y,max.z),
  1909. Vector(max.x,max.y,max.z),
  1910. Vector(max.x,min.y,max.z),},
  1911. bottom = {Vector(min.x,min.y,min.z),
  1912. Vector(min.x,max.y,min.z),
  1913. Vector(max.x,max.y,min.z),
  1914. Vector(max.x,min.y,min.z)}
  1915. }
  1916.  
  1917. if type == 1 then -- 2d
  1918. local mins, maxs
  1919. for _, t in next, points do
  1920. for k2, v2 in next, t do
  1921. local s = ent:LocalToWorld(v2):ToScreen()
  1922.  
  1923. if maxs == nil then
  1924. maxs = {x=s.x,y=s.y}
  1925. mins = {x=s.x,y=s.y}
  1926. else
  1927. maxs.x = math.max(maxs.x, s.x)
  1928. maxs.y = math.max(maxs.y, s.y)
  1929. mins.x = math.min(mins.x, s.x)
  1930. mins.y = math.min(mins.y, s.y)
  1931. end
  1932. end
  1933. end
  1934.  
  1935. cam.Start2D()
  1936. surface.SetDrawColor(col.r, col.g, col.b, alpha)
  1937.  
  1938. surface.DrawLine(mins.x,mins.y,mins.x,maxs.y)
  1939. surface.DrawLine(mins.x,maxs.y,maxs.x,maxs.y)
  1940. surface.DrawLine(maxs.x,maxs.y,maxs.x,mins.y)
  1941. surface.DrawLine(maxs.x,mins.y,mins.x,mins.y)
  1942. cam.End2D()
  1943. elseif type == 2 then -- 3d
  1944. cam.Start3D()
  1945. for _, t in next, points do
  1946. for k2, v2 in next, t do
  1947. local s = ent:LocalToWorld(v2)
  1948. local e = ent:LocalToWorld(t[k2==#t and 1 or k2+1])
  1949. local bcol = Color(col.r,col.g,col.b,alpha)
  1950.  
  1951. render.DrawLine(s,e,bcol,false)
  1952.  
  1953. if _ == "top" then
  1954. e = ent:LocalToWorld(points.bottom[k2])
  1955. render.DrawLine(s,e,bcol,false)
  1956. end
  1957. end
  1958. end
  1959. cam.End3D()
  1960. end
  1961. end
  1962. local function rainbow()
  1963. return HSVToColor(math.sin(CurTime())*360,1,1)
  1964. end
  1965. local function espcolor(ent, ctype, defcol)
  1966. if ctype == 1 then
  1967. return defcol
  1968. elseif ctype == 2 then
  1969. return rainbow()
  1970. elseif ctype == 3 then
  1971. if ttt then
  1972. return ent:IsTraitor() and color_red or ent:IsDetective() and Color(0,0,255) or color_green
  1973. elseif murder then
  1974. return ent.Murderer and color_red or ent.Cop and Color(0,0,255) or color_green
  1975. elseif morbus then
  1976. return ent:IsPlayer() and ent:GetAlien() and Color(255,0,0) or color_green
  1977. else
  1978. return team.GetColor(ent:Team())
  1979. end
  1980. else
  1981. return color_white
  1982. end
  1983. end
  1984.  
  1985. local function plyesp(v,dist,override_ent)
  1986. if v == me then return end
  1987. local a = ch.vars.esp.fade and 255 - (255*(dist/ch.vars.esp.dist)) or 255
  1988.  
  1989. if ch.vars.esp.trace then -- eyetrace
  1990. local e = override_ent or v
  1991. if e.GetShootPos and e.GetEyeTrace then
  1992. cam.Start3D()
  1993. local sp = e:GetShootPos() or 0
  1994. local et = e:GetEyeTrace().HitPos or 0
  1995.  
  1996. if (sp ~= 0 and et ~= 0) then
  1997. render.SetMaterial(Material("models/wireframe"))
  1998. render.DrawBeam(sp, et, 2, 1, 1,Color(255,255,0,a))
  1999. end
  2000. cam.End3D()
  2001. end
  2002. end
  2003.  
  2004. if ch.vars.esp.chams then-- chams
  2005. local col = espcolor(v, ch.vars.esp.chamtype, ch.vars.esp.color)
  2006. local e = override_ent or v
  2007.  
  2008. cam.Start3D()
  2009. render.SuppressEngineLighting(true)
  2010. render.SetColorModulation(col.r/255, col.g/255, col.b/255)
  2011. render.MaterialOverride(Material("models/debug/debugwhite"))
  2012. e:DrawModel()
  2013. cam.End3D()
  2014. end
  2015.  
  2016. if ch.vars.esp.box then-- bounding box
  2017. local col = espcolor(v, ch.vars.esp.boxcoltype, ch.vars.esp.boxcol)
  2018. local e = override_ent or v
  2019.  
  2020. bbox(e,ch.vars.esp.boxtype,col,a)
  2021. end
  2022.  
  2023. render.SuppressEngineLighting(false)
  2024. render.SetColorModulation(1, 1, 1)
  2025. render.MaterialOverride()
  2026.  
  2027. -- ply info
  2028. local e = override_ent or v
  2029. local spos = (e:GetPos() + Vector(0,0,e:OBBMaxs().z)):ToScreen()
  2030. local tpos = spos.y
  2031.  
  2032. if ch.vars.esp.name then
  2033. local n = (UndecorateNick and UndecorateNick(v:GetName()) or v:GetName()) or ""
  2034. local col = (ch.vars.esp.friends and ch.vars.friends[v:SteamID()]) and ch.vars.esp.friendcol or Color(255,255,255,a)
  2035. draw.SimpleTextOutlined("N: "..n, nil, spos.x, tpos, col, TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, Color(0,0,0,a))
  2036. tpos = tpos + 15
  2037. end
  2038. if ch.vars.esp.sname then
  2039. local n = steamworks.GetPlayerName(v:SteamID64() or "") or ""
  2040. draw.SimpleTextOutlined("S: "..n, nil, spos.x, tpos, Color(255,255,255,a), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, Color(0,0,0,a))
  2041. tpos = tpos + 15
  2042. end
  2043. if ch.vars.esp.rank then
  2044. local g = v:GetUserGroup() or ""
  2045. draw.SimpleTextOutlined("G: "..g, nil, spos.x, tpos, Color(255,255,255,a), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, Color(0,0,0,a))
  2046. tpos = tpos + 15
  2047. end
  2048. if ch.vars.esp.traitors and ttt then
  2049. local g = v:IsTraitor() and "Traitor" or v:IsDetective() and "Detective" or "Innocent"
  2050. draw.SimpleTextOutlined("R: "..g, nil, spos.x, tpos, Color(255,255,255,a), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, Color(0,0,0,a))
  2051. tpos = tpos + 15
  2052. end
  2053. if ch.vars.esp.murroles and murder then
  2054. local g = v.Murderer and "Murderer" or v.Cop and "Detective" or "Bystander"
  2055. draw.SimpleTextOutlined("R: "..g, nil, spos.x, tpos, Color(255,255,255,a), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, Color(0,0,0,a))
  2056. tpos = tpos + 15
  2057. end
  2058. if ch.vars.esp.morbus and morbus then
  2059. local g = v:GetAlien() and "Alien" or "Human"
  2060. draw.SimpleTextOutlined("R: "..g, nil, spos.x, tpos, Color(255,255,255,a), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, Color(0,0,0,a))
  2061. tpos = tpos + 15
  2062. end
  2063. if ch.vars.esp.weapon then
  2064. local w = v:GetActiveWeapon():IsValid() and v:GetActiveWeapon():GetPrintName() or ""
  2065. draw.SimpleTextOutlined("W: "..language.GetPhrase(w), nil, spos.x, tpos, Color(255,255,255,a), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, Color(0,0,0,a))
  2066. tpos = tpos + 15
  2067. end
  2068. if ch.vars.esp.health then
  2069. local h = v:Health() or 0
  2070. local r = math.Clamp(2550/h,0,255)
  2071. local g = h*2.5
  2072. draw.SimpleTextOutlined("H: "..h, nil, spos.x, tpos, Color(r,g,0,a), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, Color(0,0,0,a))
  2073. tpos = tpos + 15
  2074. end
  2075. if ch.vars.esp.armor then
  2076. local ar = v:Armor() or 0
  2077. local r = math.Clamp(2550/ar,0,255)
  2078. local b = ar*2.5
  2079. draw.SimpleTextOutlined("A: "..ar, nil, spos.x, tpos, Color(r,0,b,a), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, Color(0,0,0,a))
  2080. tpos = tpos + 15
  2081. end
  2082. if ch.vars.esp.drpmon and DarkRP then
  2083. draw.SimpleTextOutlined(DarkRP.formatMoney(v.DarkRPVars and v.DarkRPVars.money or 0), nil, spos.x, tpos, Color(255,255,255,a), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, Color(0,0,0,a))
  2084. tpos = tpos + 15
  2085. end
  2086. if ch.vars.esp.cwtalk and (Clockwork or blackbox) then
  2087. local talkrange
  2088. if Clockwork then
  2089. talkrange = Clockwork.config:Get("talk_radius"):Get()
  2090. elseif blackbox then
  2091. talkrange = blackbox.config.Get("talk_radius"):Get()
  2092. end
  2093. local whisperrange = math.min( talkrange / 3, 80 )
  2094. local yellrange = talkrange * 2
  2095.  
  2096. if dist <= whisperrange then
  2097. draw.SimpleTextOutlined("Whisper Range", nil, spos.x, tpos, Color(255,255,255,a), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, Color(0,0,0,a))
  2098. elseif dist <= talkrange then
  2099. draw.SimpleTextOutlined("Talk Range", nil, spos.x, tpos, Color(255,255,255,a), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, Color(0,0,0,a))
  2100. elseif dist <= yellrange then
  2101. draw.SimpleTextOutlined("Yell Range", nil, spos.x, tpos, Color(255,255,255,a), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, Color(0,0,0,a))
  2102. else
  2103. draw.SimpleTextOutlined("Outside Range", nil, spos.x, tpos, Color(255,255,255,a), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, Color(0,0,0,a))
  2104. end
  2105. tpos = tpos + 15
  2106. end
  2107. if ch.vars.esp.showdist then
  2108. draw.SimpleTextOutlined("D: "..math.floor(dist), nil, spos.x, tpos, Color(255,255,255,a), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, Color(0,0,0,a))
  2109. tpos = tpos + 15
  2110. end
  2111. end
  2112. local function entesp(v,dist)
  2113. local spos = (v:GetPos() + Vector(0,0,v:OBBMaxs().z)):ToScreen()
  2114. local tpos = spos.y
  2115.  
  2116. local a = ch.vars.entesp.fade and 255 - (255*(dist/ch.vars.entesp.dist)) or 255
  2117.  
  2118. if ch.vars.entesp.box then-- bounding box
  2119. local col
  2120.  
  2121. if ch.vars.entesp.boxcoltype == 2 then
  2122. col = rainbow()
  2123. else
  2124. col = ch.vars.entesp.boxcol
  2125. end
  2126.  
  2127. bbox(v,ch.vars.entesp.boxtype,col,a)
  2128. end
  2129.  
  2130. local drawinfo = ch:ESPEnt(v)
  2131.  
  2132. drawinfo.color.a = a
  2133. draw.SimpleTextOutlined("["..drawinfo.name.."] - "..math.floor(dist), nil, spos.x, tpos+45, Color(255,255,255,a), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, Color(0,0,0,a))
  2134. draw.SimpleTextOutlined("["..drawinfo.extra.."]", nil, spos.x, tpos+60, drawinfo.color, TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, Color(0,0,0,a))
  2135. end
  2136. local function npcesp(v,dist)
  2137. local a = ch.vars.npcesp.fade and 255 - (255*(dist/ch.vars.npcesp.dist)) or 255
  2138.  
  2139. if ch.vars.npcesp.chams then-- chams
  2140. local col
  2141.  
  2142. if ch.vars.npcesp.chamtype == 2 then
  2143. col = rainbow()
  2144. else
  2145. col = ch.vars.npcesp.color
  2146. end
  2147.  
  2148. cam.Start3D()
  2149. render.SuppressEngineLighting(true)
  2150. render.SetColorModulation(col.r/255, col.g/255, col.b/255)
  2151. render.MaterialOverride(Material("models/debug/debugwhite"))
  2152. v:DrawModel()
  2153. cam.End3D()
  2154. end
  2155.  
  2156. if ch.vars.npcesp.box then-- bounding box
  2157. local col
  2158.  
  2159. if ch.vars.npcesp.boxcoltype == 2 then
  2160. col = rainbow()
  2161. else
  2162. col = ch.vars.npcesp.boxcol
  2163. end
  2164.  
  2165. bbox(v,ch.vars.npcesp.boxtype,col,a)
  2166. end
  2167.  
  2168. render.SuppressEngineLighting(false)
  2169. render.SetColorModulation(1, 1, 1)
  2170. render.MaterialOverride()
  2171.  
  2172. -- npc info
  2173. local spos = (v:GetPos() + Vector(0,0,v:OBBMaxs().z)):ToScreen()
  2174. local tpos = spos.y
  2175.  
  2176. if ch.vars.npcesp.name then
  2177. local n = v:GetClass()
  2178. draw.SimpleTextOutlined("N: "..n, nil, spos.x, tpos, Color(255,255,255,a), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, Color(0,0,0,a))
  2179. tpos = tpos + 15
  2180. end
  2181. if ch.vars.npcesp.weapon then
  2182. local w = v:GetActiveWeapon():IsValid() and v:GetActiveWeapon():GetPrintName() or ""
  2183. draw.SimpleTextOutlined("w: "..language.GetPhrase(w), nil, spos.x, tpos, Color(255,255,255,a), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, Color(0,0,0,a))
  2184. tpos = tpos + 15
  2185. end
  2186. if ch.vars.npcesp.health then
  2187. local h = v:Health()
  2188. local r = math.Clamp(2550/h,0,255)
  2189. local g = h*2.5
  2190. draw.SimpleTextOutlined("H: "..h, nil, spos.x, tpos, Color(r,g,0,a), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, Color(0,0,0,a))
  2191. tpos = tpos + 15
  2192. end
  2193. if ch.vars.npcesp.showdist then
  2194. draw.SimpleTextOutlined("D: "..math.floor(dist), nil, spos.x, tpos, Color(255,255,255,a), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, Color(0,0,0,a))
  2195. tpos = tpos + 15
  2196. end
  2197. end
  2198.  
  2199. local modechange = false
  2200. ch:AddHook( "PreRender", "fullbright", function()
  2201. if ch.vars.panic or not (ch.vars.cams.enabled and ch.vars.fullbright) then
  2202. modechange = false
  2203. render.SetLightingMode(0)
  2204. return
  2205. end
  2206.  
  2207. render.SetLightingMode(1)
  2208. modechange = true
  2209. end )
  2210.  
  2211. local function EndOfLightingMod()
  2212. if modechange then
  2213. render.SetLightingMode(0)
  2214. modechange = false
  2215. end
  2216. end
  2217. ch:AddHook( "PostRender", "fullbright", EndOfLightingMod )
  2218. ch:AddHook( "PreDrawHUD", "fullbright", EndOfLightingMod )
  2219.  
  2220. ch:AddHook("HUDPaint","esp",function()
  2221. if ch.vars.panic or not (ch.vars.esp.enabled or ch.vars.entesp.enabled or ch.vars.npcesp.enabled) then return end
  2222.  
  2223. for k, v in next, ents.GetAll() do
  2224. if not v:IsValid() then continue end
  2225. local dist = me:GetPos():Distance(v:GetPos())
  2226.  
  2227. if v:IsPlayer() and ch.vars.esp.enabled then
  2228. if not v:Alive() or v:IsDormant() or v == me or dist > ch.vars.esp.dist then continue end
  2229. if me:GetObserverTarget() == v and me:GetObserverMode() == OBS_MODE_IN_EYE then continue end
  2230.  
  2231. plyesp(v,dist)
  2232. elseif ch.vars.ents[v:GetClass()] and ch.vars.entesp.enabled then
  2233. if dist > ch.vars.entesp.dist then continue end
  2234.  
  2235. entesp(v,dist)
  2236. elseif v:IsNPC() and ch.vars.npcesp.enabled then
  2237. if v:Health() < 1 or v:IsDormant() or dist > ch.vars.npcesp.dist then continue end
  2238.  
  2239. if Clockwork and IsValid(v:GetNetworkedEntity("Player",NULL)) then
  2240. plyesp(v:GetNetworkedEntity("Player",NULL),dist,v)
  2241. continue
  2242. end
  2243.  
  2244. npcesp(v,dist)
  2245. end
  2246. end
  2247. end)
  2248.  
  2249. ch:AddHook("PreDrawHalos","esp",function()
  2250. if ch.vars.panic then return end
  2251.  
  2252. for k, v in next, ents.GetAll() do
  2253. if v:IsPlayer() then
  2254. if me:GetPos():Distance(v:GetPos()) > ch.vars.esp.dist then continue end
  2255. if v == me then continue end
  2256. if not v:Alive() then continue end
  2257. if ch.vars.esp.enabled and ch.vars.esp.halo then
  2258. halo.Add({v}, espcolor(v, ch.vars.esp.halocoltype, ch.vars.esp.halocol), 2, 2, 1, true, true)
  2259. end
  2260. elseif ch.vars.ents[v:GetClass()] then
  2261. if me:GetPos():Distance(v:GetPos()) > ch.vars.entesp.dist then continue end
  2262. if ch.vars.entesp.enbaled and ch.vars.entesp.halo then
  2263. halo.Add({v}, espcolor(v, ch.vars.entesp.halocoltype, ch.vars.entesp.halocol), 2, 2, 1, true, true)
  2264. end
  2265. elseif v:IsNPC() then
  2266. if me:GetPos():Distance(v:GetPos()) > ch.vars.npcesp.dist then continue end
  2267. if ch.vars.npcesp.enabled and ch.vars.npcesp.halo then
  2268. halo.Add({v}, espcolor(v, ch.vars.npcesp.halocoltype, ch.vars.npcesp.halocol), 2, 2, 1, true, true)
  2269. end
  2270. end
  2271. end
  2272. end)
  2273.  
  2274. local specs = {}
  2275. local posy = 20
  2276. ch:AddHook("HUDPaint","spectators",function()
  2277. if ch.vars.panic or not ch.vars.spectators then return end
  2278. posy = 20
  2279.  
  2280. for k, v in next, specs do
  2281. if not player.GetBySteamID(k) then
  2282. specs[k] = false
  2283. end
  2284. end
  2285.  
  2286. for k, v in next, ents.GetAll() do
  2287. if not v:IsPlayer() then continue end
  2288.  
  2289. if v:GetObserverTarget() == me then
  2290. specs[v:SteamID()] = true
  2291. else
  2292. specs[v:SteamID()] = false
  2293. end
  2294. end
  2295.  
  2296. for k, v in next, specs do
  2297. if v then
  2298. local fh = draw.GetFontHeight("DermaDefault")
  2299. draw.SimpleTextOutlined(player.GetBySteamID(k) and player.GetBySteamID(k):Nick() or "someone", "DermaDefault", 20, posy, nil, nil, nil, 1, color_black)
  2300. posy = posy + fh
  2301. end
  2302. end
  2303. end)
  2304.  
  2305. ch:AddHook("HUDPaint","crosshair",function()
  2306. if ch.vars.panic or not ch.vars.crosshair.enabled then return end
  2307.  
  2308. local tr = me:GetEyeTrace()
  2309. local p = tr.HitPos:ToScreen()
  2310. local col = ch.vars.crosshair.color
  2311. local size = ch.vars.crosshair.size
  2312.  
  2313. if ch.vars.crosshair.type == 1 then -- square
  2314. surface.SetDrawColor(col.r,col.g,col.b,col.a)
  2315. surface.DrawRect(p.x-size,p.y-size,size*2,size*2)
  2316. surface.SetDrawColor(128,128,128,255)
  2317. surface.DrawRect(p.x-(math.ceil(size/2)),p.y-(math.ceil(size/2)),size,size)
  2318. elseif ch.vars.crosshair.type == 2 then -- cross
  2319. surface.SetDrawColor(col.r,col.g,col.b,col.a)
  2320. surface.DrawLine(p.x-size,p.y,p.x+size,p.y)
  2321. surface.DrawLine(p.x,p.y-size,p.x,p.y+size)
  2322. end
  2323. end)
  2324.  
  2325. local wasonground=0
  2326. ch:AddHook("CreateMove","bhop",function(cmd)
  2327. if ch.vars.panic or not ch.vars.bhop then return end
  2328. if me:GetMoveType() ~= MOVETYPE_WALK or me:WaterLevel()~=0 then return end
  2329.  
  2330. if bit.band(cmd:GetButtons() , IN_JUMP) ~= 0 then
  2331. if me:IsOnGround() then
  2332. if wasonground > 100 then
  2333. wasonground=0
  2334. cmd:SetButtons(cmd:GetButtons() - IN_JUMP)
  2335. else
  2336. wasonground=wasonground+1
  2337. cmd:SetButtons(bit.bor(cmd:GetButtons() , IN_JUMP))
  2338. end
  2339. else
  2340. wasonground=0
  2341. cmd:SetButtons(cmd:GetButtons() - IN_JUMP)
  2342. end
  2343. end
  2344. end)
  2345.  
  2346. local function aimbotvalid(target)
  2347. if not target or not IsValid(target) then return false end
  2348. if not target:Alive() or target:Health() <= 0 then return false end
  2349. if ch.vars.aimbot.type == 1 and me:GetPos():Distance(target:GetPos()) > ch.vars.aimbot.dist then return false end
  2350. if ch.vars.aimbot.type == 2 then
  2351. local eyes = target:GetAttachment(target:LookupAttachment("eyes"))
  2352. if not eyes then
  2353. eyes = target:GetBonePosition(target:LookupBone("ValveBiped.Bip01_Head1"))
  2354. end
  2355. local pos
  2356. if not eyes then
  2357. pos = target:GetPos() + (target:Crouching() and Vector(0,0,30) or Vector(0,0,60))
  2358. else
  2359. pos = eyes.Pos
  2360. end
  2361. if not (((pos.x - ScrW()/2)^2 + (pos.y - ScrH()/2)^2) < ch.vars.aimbot.fov^2) then
  2362. return false
  2363. end
  2364. end
  2365.  
  2366. return true
  2367. end
  2368. local function norm(ang)
  2369. return Angle(math.NormalizeAngle(ang.p),math.NormalizeAngle(ang.y),math.NormalizeAngle(ang.r))
  2370. end
  2371. local function smoothangle(start, target, add)
  2372. if not start or not target or not add then return target end
  2373.  
  2374. local diff = norm(target - start)
  2375.  
  2376. local vec = Vector(diff.p, diff.y, diff.r)
  2377. local len = vec:Length()
  2378. vec = vec:GetNormal() * math.min(add, len)
  2379.  
  2380. return start + Angle(vec.x, vec.y, vec.z)
  2381. end
  2382.  
  2383. local aimv = {
  2384. origin = me:GetShootPos(),
  2385. drawviewer = false
  2386. }
  2387. local aimang
  2388. local target
  2389. ch:AddHook("CreateMove","aimbot",function(cmd,a,b,c)
  2390. if ch.vars.panic or not ch.vars.aimbot.enabled then
  2391. aimang = me:EyeAngles()
  2392. aimv.angles = aimang
  2393. return
  2394. end
  2395.  
  2396. -- clear the target if invalid
  2397. if not aimbotvalid(target) then
  2398. target = nil
  2399. end
  2400.  
  2401. if ch.vars.aimbot.type == 1 then -- distance
  2402. for k, v in next, ents.FindInSphere(me:GetPos(), ch.vars.aimbot.dist) do
  2403. if v == me or not v:IsPlayer() or not v:Alive() then continue end
  2404. if v:Team() == TEAM_SPECTATOR or v:Team() == TEAM_CONNECTING then continue end
  2405. if ch.vars.friends[v:SteamID()] then continue end
  2406.  
  2407. if ch.vars.aimbot.los and not me:IsLineOfSightClear(v) then continue end
  2408. if not target then target = v end
  2409. if me:GetPos():Distance(v:GetPos()) < me:GetPos():Distance(target:GetPos()) then
  2410. target = v
  2411. end
  2412. end
  2413. elseif ch.vars.aimbot.type == 2 then -- fov
  2414. local potentials = {}
  2415. for k, v in next, ents.GetAll() do
  2416. if v == me or not v:IsPlayer() or not v:Alive() then continue end
  2417. if v:Team() == TEAM_SPECTATOR or v:Team() == TEAM_CONNECTING then continue end
  2418. if ch.vars.friends[v:SteamID()] then continue end
  2419. if me:GetPos():Distance(v:GetPos()) > ch.vars.aimbot.dist then continue end
  2420. if ch.vars.aimbot.los and not me:IsLineOfSightClear(v) then continue end
  2421.  
  2422. local eye = v:LookupAttachment("eyes")
  2423. local eyes
  2424. if eye then
  2425. eyes = v:GetAttachment(eye)
  2426. end
  2427. if not eyes then
  2428. local b = v:LookupBone("ValveBiped.Bip01_Head1")
  2429. if not b then continue end
  2430. eyes = v:GetBonePosition(b)
  2431. end
  2432.  
  2433. if not eyes then
  2434. eyes = v:LocalToWorld(v:OBBCenter())
  2435. else
  2436. eyes = eyes.Pos
  2437. end
  2438.  
  2439. local pos = eyes:ToScreen()
  2440. -- check they're in fov
  2441. if ((pos.x - ScrW()/2)^2 + (pos.y - ScrH()/2)^2) < ch.vars.aimbot.fov^2 then
  2442. table.insert(potentials, v)
  2443. end
  2444. end
  2445.  
  2446. -- closest first
  2447. table.sort(potentials, function(a,b) return a:GetPos():Distance(me:GetPos()) < b:GetPos():Distance(me:GetPos()) end)
  2448. target = potentials[1] or nil
  2449. end
  2450.  
  2451. --[[if ch.vars.aimbot.stick then
  2452. target = oldtarget
  2453. end]]
  2454.  
  2455. --[[if ch.vars.aimbot.freeaim then
  2456. local angx = math.NormalizeAngle(aimv.angles.y + (cmd:GetMouseX()/-50))
  2457. local angy = math.Clamp(aimv.angles.x + (cmd:GetMouseY()/50),-89,89)
  2458. local ang = Angle(angy,angx,0)
  2459. aimv.angles = ang
  2460. end]]
  2461.  
  2462. -- should we aim?
  2463. -- line of sight check
  2464. if ch.vars.aimbot.los and target and not me:IsLineOfSightClear(target) then
  2465. return end
  2466.  
  2467. -- aim on key checks
  2468. if ch.vars.aimbot.onkey then
  2469. if not input.IsKeyDown(ch.vars.aimbot.key) then
  2470. return end
  2471. if vgui.GetKeyboardFocus() or gui.IsGameUIVisible() then
  2472. return end
  2473. end
  2474.  
  2475. if target and target:IsValid() then -- aim
  2476. local worldpos
  2477. local head = target:LookupBone("ValveBiped.Bip01_Head1")
  2478. local eyes = target:LookupAttachment("eyes")
  2479.  
  2480. if not (eyes or head) then
  2481. worldpos = target:LocalToWorld(target:OBBCenter())
  2482. elseif not eyes then
  2483. worldpos = target:GetBonePosition(head)
  2484. else
  2485. worldpos = target:GetAttachment(eyes).Pos
  2486. end
  2487.  
  2488. if not worldpos then
  2489. worldpos = target:GetPos() + (target:Crouching() and Vector(0,0,30) or Vector(0,0,60))
  2490. end
  2491.  
  2492. cmd:SetViewAngles(
  2493. smoothangle(me:EyeAngles(),(worldpos - me:GetShootPos()):Angle(), ch.vars.aimbot.smooth and ch.vars.aimbot.smoothstep)
  2494. )
  2495. end
  2496. end)
  2497.  
  2498. --[[ ch:AddHook("CalcView","freeaimbot",function(ply,pos,ang,fov)
  2499. if ch.vars.panic or not (ch.vars.aimbot.enabled and ch.vars.aimbot.type == 2) or
  2500. (ch.vars.cams.enabled and ch.vars.cams.freecam) then return end
  2501.  
  2502. aimv.fov = fov
  2503.  
  2504. return aimv
  2505. end) ]]
  2506.  
  2507. local altx = true
  2508. ch:AddHook("CreateMove","triggerbot",function(cmd)
  2509. if ch.vars.panic or not ch.vars.triggerbot then return end
  2510.  
  2511. if altx then
  2512. local tr = me:GetEyeTraceNoCursor()
  2513. local ent = tr.Entity
  2514. if not ent or not ent:IsValid() then return end
  2515.  
  2516. if ent:IsPlayer() and ch.vars.friends[ent:SteamID()] then return end
  2517. if ent:IsNPC() or ent:IsPlayer() then
  2518. cmd:SetButtons(bit.bor(cmd:GetButtons(),IN_ATTACK))
  2519. elseif ent:IsVehicle() then
  2520. for k, v in next, ents.FindInSphere(ent:GetPos(), 50) do
  2521. if v:IsPlayer() and v:InVehicle() and v ~= me then
  2522. cmd:SetButtons(bit.bor(cmd:GetButtons(),IN_ATTACK))
  2523. end
  2524. end
  2525. end
  2526. else
  2527. if cmd:KeyDown(IN_ATTACK) then
  2528. cmd:SetButtons(cmd:GetButtons() - IN_ATTACK)
  2529. end
  2530. end
  2531.  
  2532. altx = not altx
  2533. end)
  2534.  
  2535. local alt = true
  2536. ch:AddHook("CreateMove","lazyguns",function(cmd)
  2537. if ch.vars.panic or not ch.vars.lazyguns then return end
  2538.  
  2539. local wep = me:GetActiveWeapon()
  2540. if not wep or not wep:IsValid() then return end
  2541.  
  2542. if wep.GetMaxClip1 and wep:GetMaxClip1() > 0 and wep:Clip1() <= 0 then
  2543. if cmd:KeyDown(IN_ATTACK) or cmd:KeyDown(IN_ATTACK2) then
  2544. cmd:RemoveKey(IN_ATTACK)
  2545. end
  2546. cmd:SetButtons(bit.bor(cmd:GetButtons(),IN_RELOAD))
  2547. end
  2548.  
  2549. if (wep.Primary and not wep.Primary.Automatic) or wep:GetClass() == "weapon_pistol" then
  2550. if cmd:KeyDown(IN_ATTACK)then
  2551. if alt then
  2552. cmd:SetButtons(bit.bor(cmd:GetButtons(),IN_ATTACK))
  2553. else
  2554. cmd:SetButtons(cmd:GetButtons() - IN_ATTACK)
  2555. end
  2556. end
  2557. end
  2558.  
  2559. alt = not alt
  2560. end)
  2561.  
  2562. local function PointOnCircle( ang, radius, offX, offY )
  2563. ang = math.rad( ang )
  2564. local x = math.cos( ang ) * radius + offX
  2565. local y = math.sin( ang ) * radius + offY
  2566. return x, y
  2567. end
  2568.  
  2569. ch:AddHook("HUDPaint","drawfov",function()
  2570. if ch.vars.panic then return end
  2571. if not ch.vars.aimbot.drawfov then return end
  2572.  
  2573. for degrees = 1, 360, (360/12) do
  2574. local x, y = PointOnCircle( degrees, ch.vars.aimbot.fov, ScrW()/2, ScrH()/2 )
  2575.  
  2576. surface.SetDrawColor(255, 255, 255, 255)
  2577. surface.DrawRect(x, y, 3, 3)
  2578. end
  2579. end)
  2580.  
  2581. local viewOrigin
  2582. local viewAngles
  2583. local on = false
  2584. local eyeAng
  2585. local moveVelocity=Vector(0,0,0)
  2586. ch:AddHook("CreateMove","freecam",function(cmd)
  2587. if ch.vars.panic or not (ch.vars.cams.enabled and ch.vars.cams.freecam) then
  2588. viewOrigin = me:GetShootPos()
  2589. on = false
  2590. return
  2591. end
  2592. if ch.vars.cams.enabled and ch.vars.cams.freecam then
  2593. if not on then
  2594. eyeAng = me:EyeAngles()
  2595. viewAngles = eyeAng
  2596. viewOrigin = me:GetShootPos()
  2597. on = true
  2598. end
  2599. if not viewOrigin then return end
  2600.  
  2601. local buttons = cmd:GetButtons()
  2602. local fast = bit.band(buttons,IN_SPEED) ~= 0
  2603. local slow = bit.band(buttons,IN_DUCK) ~= 0
  2604. local speed = ch.vars.cams.freespeed or 2.5
  2605. local acc = 5*(speed and 4 or 1)*(slow and 0.1 or 1)
  2606.  
  2607. local angx = math.NormalizeAngle(viewAngles.y + (cmd:GetMouseX()/-50))
  2608. local angy = math.Clamp(viewAngles.x + (cmd:GetMouseY()/50),-89,89)
  2609. viewAngles = Angle(angy,angx,0)
  2610.  
  2611. local up = 0
  2612. local right = 0
  2613. local forward = 0
  2614. local maxspeed = 10000
  2615.  
  2616. if cmd:KeyDown( IN_FORWARD ) then forward = forward + maxspeed end
  2617. if cmd:KeyDown( IN_BACK ) then forward = forward - maxspeed end
  2618. if cmd:KeyDown( IN_JUMP ) then cmd:RemoveKey(IN_JUMP) up = up + maxspeed end
  2619. if cmd:KeyDown( IN_WALK ) then cmd:RemoveKey(IN_WALK) up = up - maxspeed end
  2620. if cmd:KeyDown( IN_MOVERIGHT ) then right = right + maxspeed end
  2621. if cmd:KeyDown( IN_MOVELEFT ) then right = right - maxspeed end
  2622. if cmd:KeyDown( IN_DUCK ) then cmd:RemoveKey(IN_DUCK) end
  2623. if cmd:KeyDown( IN_SPEED ) then cmd:RemoveKey(IN_SPEED) end
  2624.  
  2625. cmd:ClearMovement()
  2626. cmd:SetViewAngles(eyeAng)
  2627.  
  2628. local ang = viewAngles
  2629. local deltaTime = FrameTime()
  2630.  
  2631. local acceleration = ( ang:Forward() * forward ) + ( ang:Right() * right ) + ( vector_up * up )
  2632.  
  2633. local accelSpeed = math.min( acceleration:Length(), 250 )
  2634. local accelDir = acceleration:GetNormal()
  2635. acceleration = accelDir * accelSpeed * speed
  2636.  
  2637. local newVelocity = moveVelocity + acceleration * deltaTime * acc
  2638. newVelocity = newVelocity * ( 0.95 - deltaTime * 4 )
  2639.  
  2640. moveVelocity = newVelocity
  2641.  
  2642. local newOrigin = viewOrigin + newVelocity * deltaTime
  2643. viewOrigin = newOrigin
  2644. end
  2645. end)
  2646.  
  2647. ch:AddHook("CalcView","freecam",function(ply,origin,angle,fov)
  2648. if ch.vars.panic or not (ch.vars.cams.enabled and ch.vars.cams.freecam) then return end
  2649.  
  2650. if not viewOrigin then
  2651. viewOrigin=origin
  2652. end
  2653. return {
  2654. origin = viewOrigin,
  2655. drawviewer = (ch.vars.cams.enabled and ch.vars.cams.freecam) and true or false,
  2656. angles = viewAngles
  2657. }
  2658. end)
  2659.  
  2660. local hide = {
  2661. CHudDamageIndicator = true
  2662. }
  2663. ch:AddHook("HUDShouldDraw","hide",function(name)
  2664. if hide[name] then return false end
  2665. end)
  2666.  
  2667. -- literally fuckin ripped from the keypad code
  2668. local elements = {}
  2669.  
  2670. -- Create numbers
  2671. do
  2672. for i = 1, 9 do
  2673. local column = (i - 1) % 3
  2674.  
  2675. local row = math.floor((i - 1) / 3)
  2676.  
  2677. local element = {
  2678. x = 0.075 + (0.3 * column),
  2679. y = 0.175 + 0.25 + 0.05 + ((0.5 / 3) * row),
  2680. w = 0.25,
  2681. h = 0.13,
  2682. text = tostring(i)
  2683. }
  2684.  
  2685. table.insert(elements, element)
  2686. end
  2687. table.insert(elements,{x = 0.075,y = 0.04 + 0.25 + 0.03,w = 0.85 / 2 - 0.04 / 2 + 0.05,h = 0.125,text = "ABORT"})
  2688. table.insert(elements,{x = 0.5 + 0.04 / 2 + 0.05,y = 0.04 + 0.25 + 0.03,w = 0.85 / 2 - 0.04 / 2 - 0.05,h = 0.125,text = "OK"})
  2689. end
  2690.  
  2691. local function CalculateCursorPos(self,ply)
  2692. if not IsValid(ply) then
  2693. return 0, 0
  2694. end
  2695.  
  2696. local tr = util.TraceLine({
  2697. start = ply:EyePos(),
  2698. endpos = ply:EyePos() + ply:GetAimVector() * 65,
  2699. filter = ply
  2700. })
  2701.  
  2702. if tr.Entity ~= self then
  2703. return 0, 0
  2704. end
  2705.  
  2706. local scale = self.Scale
  2707.  
  2708. local pos, ang = self:CalculateRenderPos(), self:CalculateRenderAng()
  2709. local normal = self:GetForward()
  2710.  
  2711. local intersection = util.IntersectRayWithPlane(ply:EyePos(), ply:GetAimVector(), pos, normal)
  2712.  
  2713. if not intersection then
  2714. return 0, 0
  2715. end
  2716.  
  2717. local diff = pos - intersection
  2718.  
  2719. local x = diff:Dot(-ang:Forward()) / scale
  2720. local y = diff:Dot(-ang:Right()) / scale
  2721.  
  2722. return x, y
  2723. end
  2724. local function highlightedkey(self,ply)
  2725. local w, h = self.Width2D, self.Height2D
  2726. local x, y = CalculateCursorPos(self,ply)
  2727.  
  2728. for _, element in ipairs(elements) do
  2729. local element_x = w * element.x
  2730. local element_y = h * element.y
  2731. local element_w = w * element.w
  2732. local element_h = h * element.h
  2733.  
  2734. if element_x < x and element_x + element_w > x and
  2735. element_y < y and element_y + element_h > y
  2736. then
  2737. return element
  2738. end
  2739. end
  2740. end
  2741.  
  2742. ch:AddHook("Tick","keypad",function()
  2743. if ch.vars.panic then return end
  2744.  
  2745. for k, v in next, player.GetHumans() do
  2746. local tr = v:GetEyeTrace()
  2747. if tr.Entity and tr.Entity:IsValid() then
  2748. local ent = tr.Entity
  2749. if ent:GetClass() == "Keypad" or ent:GetClass() == "Keypad_Wire" then
  2750. ent.tempCode = ent.tempCode or ""
  2751. ent.tempText = ent.tempText or ""
  2752. ent.tempStatus = ent.tempStatus or 0
  2753.  
  2754. if ent:GetText() ~= ent.tempText or ent:GetStatus() ~= ent.tempStatus then
  2755. ent.tempText = ent:GetText()
  2756. timer.Simple(0,function()
  2757. ent.tempStatus = ent:GetStatus()
  2758.  
  2759. if ent:GetStatus() == 2 then
  2760. ent.tempCode = ""
  2761. ent.tempText = ""
  2762. elseif ent:GetStatus() == 1 then
  2763. if ent:GetOwner() ~= v and v:GetActiveWeapon():GetClass() == "keypad_cracker" then return end
  2764. if not ent.code or ent.code ~= ent.tempCode then
  2765. ent.code = ent.tempCode ~= "" and ent.tempCode:Right(4) or ent.code
  2766. ent.tempCode = ""
  2767. ent.tempText = ""
  2768. end
  2769. end
  2770. end)
  2771.  
  2772. local element = highlightedkey(ent,v)
  2773. if element then
  2774. if element.text ~= "OK" and element.text ~= "ABORT" then
  2775. ent.tempCode = ent.tempCode .. element.text
  2776. elseif element.text == "ABORT" then
  2777. ent.tempCode = ""
  2778. end
  2779. end
  2780. end
  2781. end
  2782. end
  2783. end
  2784. end)
  2785.  
  2786. ch:AddHook("Tick","player_death",function()
  2787. if ch.vars.panic or not ch.vars.player_die then return end
  2788. for k, v in next, ents.GetAll() do
  2789. if not v:IsPlayer() then continue end
  2790.  
  2791. if v:Alive() or v:Health() > 0 then
  2792. v.hnAlive = true
  2793. elseif v.hnAlive then
  2794. if ttt then v:SetNWBool("body_found", true) end
  2795. chat.AddText(v:Nick().. " has died.")
  2796. v.hnAlive = false
  2797. end
  2798. end
  2799. end)
  2800. end
  2801.  
  2802. if ttt then
  2803. ch:AddRestore("ttt", {
  2804. IsTraitor = me.IsTraitor
  2805. }, function(data)
  2806. FindMetaTable"Player".IsTraitor = data.IsTraitor
  2807. end)
  2808.  
  2809. local PLAYER = FindMetaTable"Player"
  2810. local _IsTraitor = PLAYER.IsTraitor
  2811. function PLAYER:IsTraitor()
  2812. if self.hnTraitor then
  2813. return true
  2814. end
  2815. return _IsTraitor(self)
  2816. end
  2817. local getweps
  2818. local tweps = {}
  2819.  
  2820. if tonumber(GAMEMODE.Version:Split"-"[1]) < 2016 then
  2821. getweps = select(2,getupvalue(me.GetWeapons, 1))
  2822. else
  2823. getweps = select(2,getupvalue(me.GetWeapons, 2))
  2824. end
  2825.  
  2826. for k, v in next, weapons.GetList() do
  2827. local wep = weapons.GetStored(v.ClassName)
  2828.  
  2829. -- if the swep is set up right, it'll have this
  2830. if wep.CanBuy and istable(wep.CanBuy) then
  2831. for _, v2 in next, wep.CanBuy do
  2832. if v2 == ROLE_TRAITOR then
  2833. tweps[v.ClassName] = true
  2834. end
  2835. end
  2836. end
  2837. end
  2838.  
  2839. ch:AddHook("TTTPrepareRound", "traitor", function()
  2840. for k, v in next, ents.GetAll() do
  2841. if not v:IsPlayer() then continue end
  2842. v.hnTraitor = false
  2843. end
  2844. end)
  2845.  
  2846. ch:AddHook("Tick", "traitor", function()
  2847. if ch.vars.panic or not ch.vars.esp.traitors then return end
  2848.  
  2849. for k, v in next, ents.GetAll() do
  2850. if not v:IsPlayer() then continue end
  2851. if v == me then continue end
  2852. if v:IsTraitor() then continue end
  2853. for k2, v2 in next, getweps(v) do
  2854. if tweps[v2:GetClass()] and not v2.alreadyOwned then
  2855. v2.alreadyOwned = true
  2856. if not v:IsDetective() then
  2857. chat.AddText(v:Nick().. " is a traitor! " .. v2:GetPrintName())
  2858. v.hnTraitor = true
  2859. end
  2860. end
  2861. end
  2862. end
  2863. end)
  2864. elseif murder then
  2865. ch:AddRestore("murder", {
  2866. tk = net.Receivers.mu_tker
  2867. }, function(data)
  2868. net.Receive("mu_tker", data.tk)
  2869. end)
  2870. net.Receive("mu_tker", function() end) -- lol
  2871.  
  2872. local round = GAMEMODE:GetRound()
  2873. ch:AddHook("Tick", "roles", function()
  2874. if ch.vars.panic or not ch.vars.esp.murroles then return end
  2875.  
  2876. if round ~= GAMEMODE:GetRound() then
  2877. round = GAMEMODE:GetRound()
  2878. for k, v in next, ents.GetAll() do
  2879. if not v:IsPlayer() then continue end
  2880. if v == me then continue end
  2881.  
  2882. v.Murderer = false
  2883. v.Cop = false
  2884. end
  2885. end
  2886.  
  2887. for k, v in next, ents.GetAll() do
  2888. if not v:IsPlayer() then continue end
  2889. if v == me then continue end
  2890. if v.Murderer then continue end
  2891. if v.Cop then continue end
  2892.  
  2893. for k2, v2 in next, v:GetWeapons() do
  2894. if v2:GetClass() == "weapon_mu_knife" then
  2895. v.Murderer = true
  2896. elseif v2:GetClass() == "weapon_mu_magnum" then
  2897. v.Cop = true
  2898. end
  2899. end
  2900. end
  2901. end)
  2902. end
  2903.  
  2904. -- screencap bypasses
  2905. do
  2906. -- generic
  2907. ch:AddRestore("capture",{
  2908. Capture = render.Capture,
  2909. CapturePixels = render.CapturePixels
  2910. }, function(data)
  2911. render.Capture = data.Capture
  2912. render.CapturePixels = data.CapturePixels
  2913. end)
  2914. -- some of them kick you if you deny it, like leys lol
  2915. local CapturePixels = render.CapturePixels
  2916. local Capture = render.Capture
  2917. local function capture(tab)
  2918. ch:DoPanic"disabled for your protection. something tried to screencap you"
  2919. local cap = Capture(tab)
  2920. return cap
  2921. end
  2922. local function pix()
  2923. ch:DoPanic"disabled for your protection. something tried to screencap you"
  2924. CapturePixels()
  2925. end
  2926. render.CapturePixels = pix
  2927. render.Capture = capture
  2928.  
  2929. -- LeyScreenCap, not 100% tested
  2930. -- i couldnt get it setup right lol
  2931. if LeyScreenCap then
  2932. if LeyScreenCap.Tick then
  2933. ch:AddRestore("ley",{
  2934. Tick = LeyScreenCap.Tick
  2935. },function(data)
  2936. safehookadd("Tick", "LeyScreenCap",data.Tick)
  2937. end)
  2938.  
  2939. safehookadd("Tick", "LeyScreenCap", function()
  2940. if(LeyScreenCap.repeatfunc) then
  2941. if(skipticks > 0) then
  2942. skipticks = skipticks - 1
  2943. return
  2944. end
  2945.  
  2946. if(RealFrameTime()>0.1) then
  2947. print("lag; skip cap")
  2948. skipticks = 3
  2949. return
  2950. end
  2951.  
  2952. local linesatonce = 20
  2953. for i=1, linesatonce do
  2954. if(LeyScreenCap.repeatfunc) then
  2955. LeyScreenCap.repeatfunc()
  2956. end
  2957. end
  2958. end
  2959.  
  2960. if(not LeyScreenCap.shouldcap) then return end
  2961. ch:DoPanic"disabled for your protection. something tried to screencap you"
  2962.  
  2963. LeyScreenCap.Screenshot(LeyScreenCap.shouldcap, LeyScreenCap.quality)
  2964.  
  2965. LeyScreenCap.shouldcap = nil
  2966. end)
  2967. end
  2968. if LeyScreenCap.PostRender then
  2969. ch:AddRestore("ley",{
  2970. PostRender = LeyScreenCap.PostRender
  2971. },function(data)
  2972. safehookadd("PostRender", "LeyScreenCap",data.PostRender)
  2973. end)
  2974.  
  2975. local called = 0
  2976. safehookadd("PostRender","LeyScreenCap", function()
  2977. if called < 1 then
  2978. called = called + 1
  2979. ch:DoPanic("disabled for your protection. something tried to screencap you")
  2980. return
  2981. end
  2982. if(LeyScreenCap.repeatfunc) then
  2983. if(skipticks > 0) then
  2984. skipticks = skipticks - 1
  2985. return
  2986. end
  2987.  
  2988. if(RealFrameTime()>0.1) then
  2989. print("lag; skip cap")
  2990. skipticks = 3
  2991. return
  2992. end
  2993.  
  2994. local linesatonce = 20
  2995. for i=1, linesatonce do
  2996. if(LeyScreenCap.repeatfunc) then
  2997. LeyScreenCap.repeatfunc()
  2998. end
  2999. end
  3000. end
  3001.  
  3002. if(not LeyScreenCap.shouldcap) then return end
  3003. ch:DoPanic"disabled for your protection. something tried to screencap you"
  3004.  
  3005. LeyScreenCap.Screenshot(LeyScreenCap.shouldcap, LeyScreenCap.quality)
  3006.  
  3007. LeyScreenCap.shouldcap = nil
  3008. end)
  3009. end
  3010. end
  3011.  
  3012. -- Screengrab
  3013. if util.NetworkStringToID("rtxappend2") ~= 0 then
  3014. ch:AddRestore("Screengrab",{
  3015. netstartscreengrab = net.Receivers.startscreengrab,
  3016. PostRender = hook.GetTable().PostRender.Screengrab
  3017. }, function(data)
  3018. net.Receive("StartScreengrab",data.netstartscreengrab)
  3019. safehookadd("PostRender","Screengrab",data.PostRender)
  3020. end)
  3021.  
  3022. local sg = {}
  3023. sg.white = color_white
  3024. sg.black = color_black
  3025. sg.red = Color( 255, 0, 0 )
  3026. sg.green = Color( 0, 255, 0 )
  3027. sg.orange = Color( 255, 100, 0 )
  3028. sg.yellow = Color( 255, 255, 0 )
  3029. sg.blue = Color( 0, 200, 255 )
  3030.  
  3031. local function cl_rtxappend2( color, text, ply )
  3032. net.Start( "rtxappend2" )
  3033. net.WriteColor( color )
  3034. net.WriteString( text )
  3035. net.WriteEntity( ply )
  3036. net.SendToServer()
  3037. end
  3038.  
  3039. local shouldScreengrab = false
  3040. local quality
  3041. local _ply
  3042. local called = 0
  3043.  
  3044. net.Receive( "StartScreengrab", function()
  3045. shouldScreengrab = true
  3046. quality = net.ReadUInt(32)
  3047. _ply = net.ReadEntity()
  3048. end)
  3049.  
  3050. safehookadd("PostRender", "Screengrab", function()
  3051. if not shouldScreengrab then return end
  3052. if called < 1 then
  3053. called = called + 1
  3054. ch:DoPanic("disabled for your protection. ".. (_ply.Nick and _ply:Nick() or "something") .." tried to screencap you")
  3055. return
  3056. end
  3057. called = 0
  3058. shouldScreengrab = false
  3059. cl_rtxappend2( sg.green, "Initializing", _ply )
  3060. local function capture( q )
  3061. local tab = {
  3062. format = "jpeg",
  3063. h = ScrH(),
  3064. w = ScrW(),
  3065. quality = q,
  3066. x = 0,
  3067. y = 0
  3068. }
  3069. local split = 20000
  3070. local _data = util.Base64Encode( render.Capture( tab ) )
  3071. local data = util.Compress( _data )
  3072. local len = string.len( data )
  3073. cl_rtxappend2( color_white, "Captured " .. len .. " bytes", _ply )
  3074. local parts = math.ceil( len / split )
  3075. cl_rtxappend2( color_white, parts .. " parts", _ply )
  3076. local partstab = {}
  3077. for i = 1, parts do
  3078. local min
  3079. local max
  3080. if i == 1 then
  3081. min = i
  3082. max = split
  3083. elseif i > 1 and i ~= parts then
  3084. min = ( i - 1 ) * split + 1
  3085. max = min + split - 1
  3086. elseif i > 1 and i == parts then
  3087. min = ( i - 1 ) * split + 1
  3088. max = len
  3089. end
  3090. local str = string.sub( data, min, max )
  3091. partstab[ i ] = str
  3092. end
  3093. local amt = table.getn( partstab )
  3094. net.Start( "ScreengrabInitCallback" )
  3095. net.WriteEntity( _ply )
  3096. net.WriteUInt( amt, 32 )
  3097. net.WriteUInt( len, 32 )
  3098. net.WriteFloat( CurTime(), 32 )
  3099. net.SendToServer()
  3100. cl_rtxappend2( Color( 0, 255, 0 ), "Preparing to send data", _ply )
  3101. local i = 1
  3102. timer.Create( "ScreengrabSendParts", 0.1, amt, function()
  3103. net.Start( "ScreengrabSendPart" )
  3104. local l = partstab[ i ]:len()
  3105. net.WriteUInt( l, 32 )
  3106. net.WriteData( partstab[ i ], l )
  3107. net.SendToServer()
  3108. cl_rtxappend2( Color( 255, 255, 0 ), "Sent " .. i .. STNDRD( i ) .. " part", _ply )
  3109. net.Start( "Progress" )
  3110. net.WriteEntity( _ply )
  3111. net.WriteFloat( ( i / amt ) / 2 )
  3112. net.SendToServer()
  3113. i = i + 1
  3114. end )
  3115. end
  3116. capture( quality )
  3117. end )
  3118. end
  3119.  
  3120. -- they just gutted leyscreencap and added one thing
  3121. if ZARP then
  3122. --
  3123. end
  3124. end
  3125.  
  3126. ch:AddConCommand("hn_menu", showmenu)
  3127. ch:AddConCommand("+hn_menu", showmenu)
  3128. ch:AddConCommand("-hn_menu", function() ch.derma.frame:Close() end)
  3129.  
  3130. ch:AddConCommand("hn_toggle", function(ply,cmd,args)
  3131. print(ply,cmd,args)
  3132. end, function(cmd,argstring)
  3133. local auto = {}
  3134. local args = argstring:lower():Trim():Split(" ")
  3135.  
  3136. for k, v in next, ch.vars do
  3137. if k:find(args[1]) then
  3138. table.insert(auto, cmd.. " " ..k)
  3139. print(k, argstring)
  3140. end
  3141. end
  3142.  
  3143. return auto
  3144. end)
  3145. ch:AddConCommand("hn_exploit", function(ply,cmd,args)
  3146. if not ch.exploits[args[1]:lower()] then return end
  3147. ch:Exploit(args[1]:lower())
  3148. end,function(cmd,argstring)
  3149. local auto = {}
  3150. local args = argstring:lower():Trim():Split(" ")
  3151.  
  3152. for k, v in next, ch.exploits do
  3153. if k:find(args[1]) then
  3154. table.insert(auto, cmd.." "..k)
  3155. end
  3156. end
  3157.  
  3158. return auto
  3159. end)
  3160.  
  3161. ch:AddConCommand("hn_panic", function()
  3162. ch.vars.panic = not ch.vars.panic
  3163. end)
Add Comment
Please, Sign In to add comment