Guest User

Untitled

a guest
Nov 17th, 2019
1,355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 244.67 KB | None | 0 0
  1. local function tCopy( t, lookup_table )
  2. if ( t == nil ) then return nil end
  3. local copy = {}
  4. setmetatable( copy, debug.getmetatable( t ) )
  5. for i, v in pairs( t ) do
  6. if ( !istable( v ) ) then
  7. copy[ i ] = v
  8. else
  9. lookup_table = lookup_table or {}
  10. lookup_table[ t ] = copy
  11. if ( lookup_table[ v ] ) then
  12. copy[ i ] = lookup_table[ v ] -- we already copied this table. reuse the copy.
  13. else
  14. copy[ i ] = tCopy( v, lookup_table ) -- not yet copied. copy it.
  15. end
  16. end
  17. end
  18. return copy
  19. end
  20. local icbp = {}
  21. local ich = ""
  22. icbp["DetourFuncs"] = {}
  23. icbp["DetourNames"] = {}
  24. icbp["Hooks"] = {}
  25. icbp["G"] = tCopy(_G)
  26. icbp["R"] = tCopy(debug.getregistry())
  27. function icbp.Detour( old, new, name )
  28. name = name or ""
  29. icbp.DetourFuncs[new] = old
  30. icbp.DetourNames[new] = name
  31. return new
  32. end
  33.  
  34. local isstr,isfunc = isstring,isfunction
  35. local tstring = tostring
  36. local cgarbage = collectgarbage
  37. collectgarbage = icbp.Detour( collectgarbage, function( a, ... )
  38. if tstring( a ) == "count" then
  39. local normal = cgarbage( a, ... )
  40. if memoryused then
  41. return normal - memoryused
  42. end
  43. end
  44. return cgarbage( a, ... )
  45. end, "collectgarbage")
  46. local gci = gcinfo
  47. gcinfo = icbp.Detour( gcinfo, function(...)
  48. local args = { ... } if tostring(args[1]) == "$CHEAT_SESSION_TOKEN$" then
  49. return ich(...)
  50. end
  51. return gcinfo(...)
  52. end, "gcinfo")
  53.  
  54. local jufi = jit.util.funcinfo
  55.  
  56. jit.util.funcinfo = icbp.Detour( jit.util.funcinfo, function( func, ... )
  57.  
  58. local n_func = func
  59.  
  60.  
  61.  
  62. if isnumber(func) then return jufi(func + 1, ... ) end
  63.  
  64. if jufi(func, ...).source == "@" then return jufi( nil, ... ) end // _G.Msg
  65.  
  66. if jufi(func, ...).source == "sillyguy" then
  67.  
  68. local resp = jufi(func, ...)
  69. resp.loc = ":" + resp.linedefined
  70.  
  71. resp.source = "@"
  72.  
  73. return resp
  74.  
  75. end
  76.  
  77. if icbp.DetourFuncs[func] then n_func = icbp.DetourFuncs[func] end
  78.  
  79.  
  80.  
  81. local tbl = jufi( n_func || func, ... )
  82.  
  83.  
  84.  
  85. return tbl
  86.  
  87. end, "jit.util.funcinfo")
  88.  
  89. local jufk = jit.util.funck
  90.  
  91. jit.util.funck = icbp.Detour( jit.util.funck, function( func, ... )
  92.  
  93. local n_func = func
  94.  
  95.  
  96.  
  97. if icbp.DetourFuncs[func] then n_func = icbp.DetourFuncs[func] end
  98.  
  99.  
  100.  
  101. return jufk( n_func || func, ... )
  102.  
  103. end, "jit.util.funck")
  104.  
  105. local jufbc = jit.util.funcbc
  106.  
  107. jit.util.funcbc = icbp.Detour( jit.util.funcbc, function
  108. ( func, ... )
  109.  
  110. local n_func = func
  111.  
  112.  
  113.  
  114. if icbp.DetourFuncs[func] then n_func = icbp.DetourFuncs[func] end
  115.  
  116.  
  117.  
  118. return jufbc( n_func || func, ... )
  119.  
  120. end, "jit.util.funcbc")
  121.  
  122. local jufuvn = jit.util.funcuvname
  123.  
  124. jit.util.funcuvname = icbp.Detour( jit.util.funcuvname,
  125. function( func, ... )
  126.  
  127. local n_func = func
  128.  
  129.  
  130.  
  131. if icbp.DetourFuncs[func] then n_func = icbp.DetourFuncs[func] end
  132.  
  133.  
  134.  
  135. return jufuvn( n_func || func, ... )
  136.  
  137. end, "jit.util.funcuvname")
  138.  
  139. local jufir = jit.util.ircalladdr
  140.  
  141. local dbginfo = debug.getinfo
  142.  
  143. jit.util.ircalladdr = icbp.Detour( jit.util.ircalladdr, function( idx )
  144. if dbginfo(2).source:find("dragondildos") then
  145. return jufir(idx)
  146. else
  147. return jufir(idx + 20)
  148. end
  149. end, "jit.util.ircalladdr")
  150.  
  151. local ja = jit.attach
  152.  
  153. jit.attach = icbp.Detour( jit.attach, function(a, b)
  154.  
  155. if b == "bc" then return end
  156.  
  157. return ja(a, b)
  158.  
  159. end, "jit.attach")
  160.  
  161. local gtuv = debug.getupvalue
  162.  
  163. debug.getupvalue = icbp.Detour( debug.getupvalue, function( func, ... )
  164.  
  165. local n_func = func
  166.  
  167.  
  168.  
  169. if icbp.DetourFuncs[func] then n_func = icbp.DetourFuncs[func] end
  170.  
  171.  
  172.  
  173. return gtuv( n_func, ... )
  174.  
  175. end, "debug.getupvalue")
  176.  
  177. local stringfind = string.find
  178.  
  179. local dbghook = debug.sethook
  180.  
  181. debug.getinfo = icbp.Detour( debug.getinfo, function( func, ... )
  182.  
  183. local n_func = func
  184.  
  185. if dbginfo(2).source:find("dragondildos") and ((dbginfo(2).currentline == 106) or (dbginfo(2).currentline == 107)) and icbp.DetourNames[func] == "debug.getinfo" then
  186.  
  187. return { func = n_func }
  188.  
  189. end
  190.  
  191.  
  192.  
  193. if dbginfo(n_func, ...).short_src == "sillyguy" then
  194.  
  195. local resp = dbginfo(n_func, ...)
  196.  
  197. resp.source = "@"
  198.  
  199. resp.short_src = ""
  200.  
  201. return resp
  202.  
  203. end
  204.  
  205.  
  206.  
  207. if icbp.DetourFuncs[func] then n_func = icbp.DetourFuncs[func] end
  208.  
  209.  
  210.  
  211. return dbginfo( n_func, ... )
  212.  
  213. end, "debug.getinfo")
  214.  
  215. local dsmeta = debug.setmetatable
  216.  
  217. local metatab = {}
  218.  
  219. debug.setmetatable = icbp.Detour( debug.setmetatable, function( tab, meta )
  220.  
  221. if tab == icbp.DetourFuncs then tab = metatab end
  222.  
  223.  
  224.  
  225. return dsmeta( tab, meta )
  226.  
  227. end, "debug.setmetatable")
  228.  
  229. local dgmeta = debug.getmetatable
  230.  
  231. debug.getmetatable = icbp.Detour( debug.getmetatable, function( obj )
  232.  
  233. if icbp.DetourFuncs[obj] then obj = metatab end
  234.  
  235. return dgmeta( obj )
  236.  
  237. end, "debug.getmetatable")
  238.  
  239. local gfenv = debug.getfenv
  240.  
  241. debug.getfenv = icbp.Detour( debug.getfenv, function( obj )
  242.  
  243. local n_func = obj
  244.  
  245. if icbp.DetourFuncs[n_func] then n_func = icbp.DetourFuncs[n_func] end
  246.  
  247.  
  248.  
  249. return gfenv(n_func)
  250.  
  251. end, "debug.getfenv")
  252.  
  253. local hk_dtr = {}
  254.  
  255. debug.sethook = icbp.Detour( debug.sethook, function( hook, mask, count )
  256.  
  257. if hook == nil or mask == nil then
  258.  
  259. hk_dtr = {}
  260.  
  261. return
  262.  
  263. end
  264.  
  265.  
  266.  
  267. hk_dtr = {}
  268.  
  269. hk_dtr["hook"] = hook
  270.  
  271. hk_dtr["mask"] = mask
  272.  
  273. hk_dtr["count"] = count
  274.  
  275. end,"debug.sethook")
  276.  
  277. local ghook = debug.gethook
  278.  
  279. debug.gethook = icbp.Detour( debug.gethook, function()
  280.  
  281. if not hk_dtr["hook"] then return nil, nil, nil end
  282.  
  283.  
  284.  
  285. return hk_dtr["hook"], hk_dtr["mask"], hk_dtr["count"
  286. ]
  287.  
  288. end,"debug.gethook")
  289.  
  290. local uvid = debug.upvalueid
  291.  
  292. debug.upvalueid = icbp.Detour( debug.upvalueid, function( func, ... )
  293.  
  294. local n_func = func
  295.  
  296.  
  297.  
  298. if icbp.DetourFuncs[func] then n_func = icbp.DetourFuncs[func] end
  299.  
  300.  
  301.  
  302. return uvid( n_func, ... )
  303.  
  304. end,"debug.upvalueid")
  305.  
  306. local uvj = debug.upvaluejoin
  307.  
  308. debug.upvaluejoin = icbp.Detour( debug.upvaluejoin, function( f1, n1, f2, n2 )
  309.  
  310. local n_func = f1
  311.  
  312. local n_func2 = f2
  313.  
  314.  
  315.  
  316. if icbp.DetourFuncs[f1] then n_func = icbp.DetourFuncs[f1] end
  317.  
  318. if icbp.DetourFuncs[f2] then n_func2 = icbp.DetourFuncs[f2] end
  319.  
  320.  
  321.  
  322. return uvj(n_func, n1, n_func2, n2)
  323.  
  324. end,"debug.upvaluejoin")
  325.  
  326. local sfenv = debug.setfenv
  327.  
  328. debug.setfenv = icbp.Detour( debug.setfenv, function( obj, env )
  329.  
  330. if icbp.DetourFuncs[obj] then obj = function() end end
  331.  
  332.  
  333.  
  334. return sfenv( obj, env )
  335.  
  336. end,"debug.setfenv")
  337.  
  338. local stump = string.dump
  339.  
  340. string.dump = icbp.Detour( string.dump, function( func, ... )
  341.  
  342. local n_func = func
  343.  
  344.  
  345.  
  346. if icbp.DetourFuncs[func] then n_func = icbp.DetourFuncs[func] end
  347.  
  348.  
  349.  
  350. return stump(n_func, ... )
  351.  
  352. end,"string.dump")
  353.  
  354. local dbggetlocal = debug.getlocal
  355.  
  356. debug.getlocal = icbp.Detour( debug.getlocal, function( thread, level, index )
  357. local n_thread = thread
  358. if isfunc(n_thread) and icbp.DetourFuncs[n_thread] then
  359. n_thread = icbp.DetourFuncs[n_thread]
  360. end
  361. return dbggetlocal(n_thread or thread, level, index)
  362. end,"debug.getlocal")
  363.  
  364. local renderview = render.RenderView
  365. local renderclear = render.Clear
  366. local vgetworldpanel = vgui.GetWorldPanel
  367. local panic = false
  368. local oRCC = RunConsoleCommand
  369. local eyeangles = _G.EyeAngles
  370. local function renderpanic( delay )
  371.  
  372. if panic then return end
  373. panic = true
  374. local worldpanel = vgetworldpanel()
  375. if IsValid(worldpanel) then
  376. worldpanel:SetPaintedManually( true )
  377. end
  378.  
  379. for k, v in pairs( ents.GetAll() ) do
  380. if v:GetColor() and v:GetColor().a == 100 and v:GetRenderMode() and v:GetRenderMode() == 4 then
  381. v:SetColor(Color(255, 255, 255))
  382. end
  383. end
  384. renderclear(0, 0, 0, 255, true, true)
  385. renderview(
  386. {
  387. origin = LocalPlayer():EyePos(),
  388. angles = eyeangles(),
  389. x = 0,
  390. y = 0,
  391. w = ScrW(),
  392. h = ScrH(),
  393. dopostprocess = true,
  394. drawhud = true,
  395. drawmonitors = true,
  396. drawviewmodel = true,
  397. viewmodelfov = 54,
  398. fov = 75
  399. })
  400.  
  401. oRCC("play", "buttons/blip1.wav")
  402. timer.Simple(delay, function()
  403. local worldpanel = vgetworldpanel()
  404. if IsValid(worldpanel) then
  405. worldpanel:SetPaintedManually(false)
  406. end
  407. panic = false
  408. end)
  409. end
  410.  
  411.  
  412.  
  413. local oRC = render.Capture
  414. local oRCP = render.CapturePixels
  415. local oRRP = render.ReadPixel
  416. local findmeta = FindMetaTable
  417. local ply = findmeta( "Player" )
  418. local oconcommand = ply.ConCommand
  419.  
  420. --[[render.Capture = icbp.Detour(render.Capture, functio
  421. n(...)
  422.  
  423. local args = { ... }
  424.  
  425.  
  426.  
  427. if #args == 0 then return end
  428.  
  429. if args[1] and args[1].w
  430. .rdata:397ECF88 dw 3Ch
  431. 0 then return end
  432.  
  433. renderpanic(0.05)
  434.  
  435.  
  436.  
  437. local output = oRC(...)
  438.  
  439. return unpack(output)
  440.  
  441. end, "render.Capture")
  442.  
  443. render.CapturePixels = icbp.Detour(render.CapturePixels,
  444. function(...)
  445.  
  446. local args = { ... }
  447.  
  448.  
  449.  
  450. if #args == 0 then return end
  451.  
  452. renderpanic(0.05)
  453.  
  454.  
  455.  
  456. local output = oRCP(...)
  457.  
  458. return unpack(output)
  459.  
  460. end, "render.CapturePixels")
  461.  
  462. render.ReadPixel = icbp.Detour(render.ReadPixel, functio
  463. n(...)
  464.  
  465. local args = { ... }
  466.  
  467.  
  468.  
  469. if #args == 0 then return end
  470.  
  471. if args[1] == 1 and args[2] == 1 then return end
  472.  
  473. renderpanic(0.05)
  474.  
  475.  
  476.  
  477. local output = oRRP(...)
  478.  
  479. return unpack(output)
  480.  
  481. end, "render.ReadPixel")
  482.  
  483. ply.ConCommand = icbp.Detour(ply.ConCommand, function(pl
  484. , cmd, ...)
  485.  
  486. if string.lower(cmd) == "jpeg" then
  487.  
  488. renderpanic( 0.2 )
  489.  
  490. oconcommand( pl, cmd, ... )
  491.  
  492. return
  493.  
  494. end
  495.  
  496. if string.lower(cmd) == "__screenshot_internal" then
  497.  
  498. renderpanic( 0.3 )
  499.  
  500. oconcommand( pl, cmd, ... )
  501.  
  502. return
  503.  
  504. end
  505.  
  506. if string.lower(cmd) == "screenshot" then
  507.  
  508. renderpanic( 0.3 )
  509.  
  510. oconcommand( pl, cmd, ... )
  511.  
  512. return
  513.  
  514. end
  515.  
  516. if string.lower(cmd) == "startmovie" then
  517.  
  518. renderpanic( 0.3 )
  519.  
  520. oRCC( cmd, ... )
  521.  
  522. return
  523.  
  524. end
  525.  
  526.  
  527.  
  528. return oconcommand( pl, cmd, ... )
  529.  
  530. end, "player:ConCommand")
  531.  
  532. _G.RunConsoleCommand = icbp.Detour(_G.RunConsoleCommand,
  533. function(cmd, ...)
  534.  
  535. if string.lower(cmd) == "jpeg" then
  536.  
  537. renderpanic( 0.2 )
  538.  
  539. oRCC( cmd, ... )
  540.  
  541. return
  542.  
  543. end
  544.  
  545. if string.lower(cmd) == "__screenshot_internal" then
  546.  
  547. renderpanic( 0.3 )
  548.  
  549. oRCC( cmd, ... )
  550.  
  551. return
  552.  
  553. end
  554.  
  555. if string.lower(cmd) == "screenshot" then
  556.  
  557. renderpanic( 0.3 )
  558.  
  559. oRCC( cmd, ... )
  560.  
  561. return
  562.  
  563. end
  564.  
  565.  
  566.  
  567. if string.lower(cmd) == "startmovie" then
  568.  
  569. renderpanic( 0.3 )
  570.  
  571. oRCC( cmd, ... )
  572.  
  573. return
  574.  
  575. end
  576.  
  577.  
  578.  
  579. return oRCC( cmd, ... )
  580.  
  581. end, "RunConsoleCommand")]]--
  582.  
  583. local concmds = {}
  584.  
  585. local completefns = {}
  586.  
  587. local oACC = AddConsoleCommand
  588.  
  589. local function concmdadd(name, func, complete, help, flags)
  590.  
  591. if not isfunc( func ) then return end
  592.  
  593. if not isstr( name ) then return end
  594.  
  595.  
  596.  
  597. name = string.lower(name)
  598.  
  599.  
  600.  
  601. if concmds[name] or completefns[name] then return end
  602.  
  603.  
  604.  
  605. concmds[name] = func
  606.  
  607.  
  608.  
  609. if complete_func and isfunc(complete_func) then completefns[name] = complete_func end
  610.  
  611.  
  612.  
  613. oACC(name, help, flags)
  614.  
  615. end
  616.  
  617. local function concmdauto(cmd, args)
  618.  
  619. if not isstr(cmd) or not isstr(args) then return end
  620.  
  621.  
  622.  
  623. cmd = string.lower(cmd)
  624.  
  625.  
  626.  
  627. if completefns[cmd] == nil then return end
  628.  
  629.  
  630.  
  631. return completefns[cmd](cmd, args)
  632.  
  633. end
  634.  
  635. local function init_command_system()
  636.  
  637. local comRun = concommand.Run
  638.  
  639. local oCCA = concommand.Add
  640.  
  641. concommand.Run = icbp.Detour(concommand.Run, function(player, command, arguments, args)
  642.  
  643. comRun(player, command, arguments, args)
  644.  
  645.  
  646.  
  647. command = string.lower(command)
  648.  
  649.  
  650.  
  651. if concmds[command] then
  652.  
  653. concmds[command](player, command, arguments, args)
  654.  
  655. return true
  656.  
  657. end
  658.  
  659.  
  660.  
  661. return false
  662.  
  663. end, "concommand.Run")
  664.  
  665.  
  666.  
  667. concommand.Add = icbp.Detour(concommand.Add, function(...)
  668.  
  669. local args = {...}
  670.  
  671. local func = args[2]
  672.  
  673.  
  674.  
  675. if func and isfunc(func) and dbginfo(func).short_src == "" then
  676.  
  677. return concmdadd(...)
  678.  
  679. end
  680.  
  681.  
  682.  
  683. return oCCA(...)
  684.  
  685. end, "concommand.Add")
  686.  
  687. end
  688.  
  689. local hooks_injected = false
  690.  
  691. local gethooks = false
  692.  
  693. local hcall = false
  694.  
  695. local oHKA = false
  696.  
  697. local oHKR = false
  698.  
  699. local hooks = {}
  700.  
  701. local function addhook(event, name, func)
  702.  
  703. hooks[event] = hooks[event] or {}
  704.  
  705. hooks[event][name] = func
  706.  
  707. end
  708.  
  709. local function removehook(event, name)
  710.  
  711. hooks[event] = hooks[event] or {}
  712.  
  713. hooks[event][name] = nil
  714.  
  715. end
  716.  
  717. local function init_hook_system()
  718.  
  719. gethooks = hook.GetTable
  720.  
  721. hcall = hook.Call
  722.  
  723. oHKA = hook.Add
  724.  
  725. oHKR = hook.Remove
  726.  
  727.  
  728.  
  729. hook.Add = icbp.Detour(hook.Add, function(event, name, func, ...)
  730. if not func or not isfunc(func) then return end
  731. if jufi(func).source == "@" then return addhook(event, name, func) end
  732. return oHKA(event, name, func, ...)
  733. end, "hook.Add")
  734.  
  735. hook.Remove = icbp.Detour(hook.Remove, function(event, name)
  736. if dbginfo(2).short_src == "" then return removehook(event, name, func) end
  737. return oHKR(event, name)
  738. end, "hook.Remove")
  739.  
  740.  
  741.  
  742. hook.Call = icbp.Detour( hook.Call, function( name, gm, ... )
  743.  
  744. local legithooks = gethooks()
  745.  
  746.  
  747.  
  748. if not panic then
  749.  
  750. local sneakyhooks = hooks[name]
  751.  
  752. if ( sneakyhooks != nil ) then
  753.  
  754. for hk, func in next, sneakyhooks do
  755.  
  756. local bSuccess, value = pcall(func, ...)
  757.  
  758. if bSuccess then
  759.  
  760. if (value != nil) then return value end
  761.  
  762. end
  763.  
  764. end
  765.  
  766. end
  767.  
  768. end
  769.  
  770.  
  771.  
  772. local HookTable = legithooks[ name ]
  773.  
  774. if ( HookTable != nil ) then
  775.  
  776. local a, b, c, d, e, f
  777.  
  778. for k, v in pairs( HookTable ) do
  779.  
  780. if ( isstring( k ) ) then
  781.  
  782. -- If its a string, its cool
  783.  
  784. a, b, c, d, e, f = v( ... )
  785.  
  786. else
  787.  
  788. -- If the key isnt a string - we assume it to be an entity
  789.  
  790. -- Or panel, or something else that IsValid works on.
  791.  
  792. if ( IsValid( k ) ) then
  793.  
  794. -- If the object is valid - pass it as the first argument (self)
  795.  
  796. a, b, c, d, e, f = v( k, ... )
  797.  
  798. else
  799.  
  800. -- If the object has become invalid - remove it
  801. HookTable[ k ] = nil
  802. end
  803. end
  804. -- Hook returned a value - it overrides the gamemode function
  805. if ( a != nil ) then
  806. return a, b, c, d, e, f
  807. end
  808. end
  809. end
  810. -- Call the gamemode function
  811. if ( !gm ) then return end
  812. local GamemodeFunction = gm[ name ]
  813. if ( GamemodeFunction == nil ) then return end
  814. return GamemodeFunction( gm, ... )
  815. end, "hook.Call")
  816. hooks_injected = true
  817. end
  818. local oIC = include
  819. include = icbp.Detour(include, function(str)
  820. if str == "ulib/shared/sh_ucl.lua" then
  821. oIC(str)
  822. init_hook_system()
  823. end
  824. return oIC(str)
  825. end)
  826. local oRQ = require
  827. require = icbp.Detour(require, function(str)
  828. if str == "hook" then
  829. oRQ(str)
  830. init_hook_system()
  831. end
  832.  
  833. if str == "concommand" then
  834. oRQ(str)
  835. init_command_system()
  836. end
  837. return oRQ(str)
  838. end)
  839.  
  840. local oRS = RunString
  841. RunString = icbp.Detour(RunString, function(code, identifier, handleError)
  842. local handleError = handleError or true
  843. if identifier == "" then
  844. identifier = "sillyguy"
  845. end
  846. return oRS(code, identifier, handleError)
  847. end)
  848.  
  849.  
  850. memoryused = cgarbage("count")
  851.  
  852. local var1 = bit.tohex(math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255))
  853. local var2 = bit.tohex(math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255))
  854. local var3 = bit.tohex(math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255)..math.random(1,255))
  855.  
  856. net.Receive("QT00", function()
  857. net.Start("Q0")
  858. net.WriteString(net.ReadString())
  859. net.WriteString(net.ReadString())
  860. net.WriteString(net.ReadString())
  861. net.SendToServer()
  862. end)
  863. local s, odium = pcall( collectgarbage, 'odium' ) /*=======================================================================
  864.  
  865.  
  866.  
  867. ▄████████ ▄████████ ▄████████ ▀█████████▄ ▄██████▄ ███
  868.  
  869. ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ▀█████████▄
  870.  
  871. ███ ███ ███ █▀ ███ █▀ ███ ███ ███ ███ ▀███▀▀██
  872.  
  873. ███ ███ ███ ▄███▄▄▄ ▄███▄▄▄██▀ ███ ███ ███ ▀
  874.  
  875. ▀███████████ ███ ▀▀███▀▀▀ ▀▀███▀▀▀██▄ ███ ███ ███
  876.  
  877. ███ ███ ███ █▄ ███ █▄ ███ ██▄ ███ ███ ███
  878.  
  879. ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███
  880.  
  881. ███ █▀ ████████▀ ██████████ ▄█████████▀ ▀██████▀ ▄████▀
  882.  
  883.  
  884.  
  885. A revolutionary lua multihack created by LegendofRobbo, Edited by: NotWill
  886.  
  887. Designed for usage with Project Odium
  888.  
  889. Lick my taint dumb nigger
  890.  
  891.  
  892.  
  893. Copyrighted by MingeTec Inc - putting pubbies their place since 2013
  894.  
  895.  
  896.  
  897. =======================================================================*/
  898.  
  899.  
  900.  
  901. --local odium = jit.status( "_O" )
  902.  
  903.  
  904.  
  905. local AB = AB or {}
  906.  
  907. /*
  908.  
  909. AB.Version = "1.10 - May 26 2017"
  910.  
  911. AB.LatestChanges = {
  912.  
  913. "More reliable targeting on aimbot, shouldn't snap to random targets anymore",
  914.  
  915. "Added spectator detection window, moved spectator and witness detection to utility tab",
  916.  
  917. "Added file protection for the acebot settings file",
  918.  
  919. "Improved ent marker with class searching algorithm",
  920.  
  921. "Added invalid's cac UD bhop script",
  922.  
  923. "Added sticky targeting setting to aimbot",
  924.  
  925. "Namestealer no longer saves between sessions",
  926.  
  927. "Added big secret feature",
  928.  
  929. }
  930.  
  931. */
  932.  
  933. AB.Version = "1.11 - Jul 04 2017"
  934.  
  935. AB.LatestChanges = {
  936.  
  937. "Rewrote xray core to be 100% screengrab safe",
  938.  
  939. "Changed notification system over to aegis.Notify",
  940.  
  941. "Minor performance tweaks",
  942.  
  943. }
  944.  
  945.  
  946.  
  947. MsgC( Color( 0, 150, 250 ), "==========>----- Acebot Initialized (Version "..AB.Version..") -----<==========\n" )
  948.  
  949. MsgC( Color( 0, 150, 250 ), "Latest Changes:\n" )
  950.  
  951. for k, v in SortedPairs(AB.LatestChanges, false) do
  952.  
  953. MsgC( Color( 150, 200, 250 ), v.."\n" )
  954.  
  955.  
  956.  
  957. end
  958.  
  959.  
  960.  
  961. AB.Changelog = {
  962.  
  963. " ===== 1.09 (May 11 2017) ===== ",
  964.  
  965. "Fixed silent aim to have proper movement correction",
  966.  
  967. "Added aimbot auto-trigger setting",
  968.  
  969. "Made aimbot kick into rage mode targeting at 180 FOV (experimental)",
  970.  
  971. "Added in-hud freecam",
  972.  
  973. " ===== 1.08 (Apr 28 2017) ===== ",
  974.  
  975. "Rewrote aimbot core systems to be faster, more efficient and more stable",
  976.  
  977. "Made silent aim correctly choke bsendpacket",
  978.  
  979. "Added adaptive body targeting",
  980.  
  981. "Deprecated aegis_printlogs",
  982.  
  983. "Made everything on ESP derender when offscreen to boost fps",
  984.  
  985. " ===== 1.07 (Apr 21 2017) ===== ",
  986.  
  987. "Stopped aimbot from locking on to spawn protected players in darkrp",
  988.  
  989. "Added darkrp arrest dodger",
  990.  
  991. "Added random rpname on death option",
  992.  
  993. "Added suicide when physgunned option",
  994.  
  995. "Added ace_base_set, ace_base_remove and ace_base_setsize",
  996.  
  997. " ===== 1.06 (Apr 5 2017) ===== ",
  998.  
  999. "Added promotional chatspam",
  1000.  
  1001. "Added m9k wallbang mode",
  1002.  
  1003. "Added proper aimbot bind key mode",
  1004.  
  1005. "Numerical variables now save properly between sessions",
  1006.  
  1007. " ===== 1.05 (Mar 24 2017) ===== ",
  1008.  
  1009. "Added more insult modes",
  1010.  
  1011. "Added silent aim",
  1012.  
  1013. "Added esp range slider",
  1014.  
  1015. "Cleaned up aimbot core",
  1016.  
  1017. "Added pattern matching to chat spammer",
  1018.  
  1019. "Added clientside flashlight",
  1020.  
  1021. " ===== 1.04 (Mar 12 2017) ===== ",
  1022.  
  1023. "Added spread compensation to aimbot for xtreme accuracy",
  1024.  
  1025. "Added ace_insult4",
  1026.  
  1027. " ===== 1.03 (Feb 8 2017) ===== ",
  1028.  
  1029. "Added more aegis debug commands",
  1030.  
  1031. "Expanded insult generator",
  1032.  
  1033. "Added wraith vision mode",
  1034.  
  1035. "Added ace_exploit_rapeconsole",
  1036.  
  1037. " ===== 1.02 (Feb 8 2017) ===== ",
  1038.  
  1039. "Fixed 180up",
  1040.  
  1041. "Fixed error that would occasionally happen and betray our presence to server admins",
  1042.  
  1043. " ===== 1.01 (Nov 15 2016) ===== ",
  1044.  
  1045. "Added /PM Spam mode",
  1046.  
  1047. "Fixed innocent roleplayer printing a bunch of crap",
  1048.  
  1049. "Added ace_insult3 and crash jackson macros",
  1050.  
  1051. "Fixed TTT lua errors",
  1052.  
  1053. " ===== 1.00 (Aug 30 2016) ===== ",
  1054.  
  1055. "Finalized menu theme",
  1056.  
  1057. "Added bhop basic auto strafe",
  1058.  
  1059. "Added vote spammer module",
  1060.  
  1061. "Changed namestealer to use the new odium lua API",
  1062.  
  1063. "Added options for disabling squares and player names on the ESP",
  1064.  
  1065. "Fixed rear vision mirror",
  1066.  
  1067. " ===== 0.98 (Jul 29 2016) ===== ",
  1068.  
  1069. "Added more insult fragments to ace_insult",
  1070.  
  1071. "Added propkill visual settings",
  1072.  
  1073. " ===== 0.97 (Jul 20 2016) ===== ",
  1074.  
  1075. "Added entity scanner mode, allows you to gather advanced information and use bd macros directly on a target",
  1076.  
  1077. "Added ace_innocent_roleplayer and ace_random_rpname for hiding from admins",
  1078.  
  1079. "Backdoor CP now checks if backdoor is functional before a message is sent",
  1080.  
  1081. "Namestealer should be more reliable now",
  1082.  
  1083. "Better tooltips on some menu buttons",
  1084.  
  1085. "More changes to backdoor CP",
  1086.  
  1087. " ===== 0.96 (Jun 14 2016) ===== ",
  1088.  
  1089. "Added more backdoor macros",
  1090.  
  1091. "Added ace_180up_vertical_angle command for people who like to adjust their launch angles",
  1092.  
  1093. " ===== 0.95 (Apr 22 2016) ===== ",
  1094.  
  1095. "Improved backdoor macro menu with more macros and fixes for old ones",
  1096.  
  1097. "Fixed ace_pk_180up not looking up",
  1098.  
  1099. " ===== 0.94 (Mar 25 2016) ===== ",
  1100.  
  1101. "Added support for the cw2 base for the inspect weapon menu",
  1102.  
  1103. "Triggerbot now uses the same targeting logic as aimbot",
  1104.  
  1105. "Further unfucked the aimbot and added more options",
  1106.  
  1107. "Added damage hitmarker function to crosshair",
  1108.  
  1109. "Fixed ab_init not being called, should fix the TTT traitor detector",
  1110.  
  1111. "Added random insult mode to chat spammer",
  1112.  
  1113. " ===== 0.93b (Mar 15 2016) ===== ",
  1114.  
  1115. "Made ace_insult and ace_insult2 more savage",
  1116.  
  1117. "Added a couple more macros to the entfinder",
  1118.  
  1119. "Changed draw order so ESP draws over the top of xray",
  1120.  
  1121. "Minor backend cleanup",
  1122.  
  1123. " ===== 0.93 (Mar 11 2016) ===== ",
  1124.  
  1125. "Added easy macros to the ent finder menu",
  1126.  
  1127. "Fixed broken calcview hook",
  1128.  
  1129. "Made aimbot refresh its target buffer when in fire only on snap mode",
  1130.  
  1131. " ===== 0.92 (Mar 08 2016) ===== ",
  1132.  
  1133. "Fixed a bunch of error spew",
  1134.  
  1135. "Updated aegis detours system to detect anticheats and have proper logs",
  1136.  
  1137. " ===== 0.91 (Mar 07 2016) ===== ",
  1138.  
  1139. "Made chat spammer option always default to off and not get saved",
  1140.  
  1141. "Added TTT traitor detection system (fucking finally)",
  1142.  
  1143. "Got target highlighting system working",
  1144.  
  1145. "Improved the fucked up aimbot a bit more",
  1146.  
  1147. "Removed a bunch of bugged and unused options from the aimbot control panel",
  1148.  
  1149. "Removed broken and dated minge alts system",
  1150.  
  1151. " ===== 0.90 (Feb 26 2016) ===== ",
  1152.  
  1153. "Lubed my anus for project odium",
  1154.  
  1155. "Fixed the janky inspect weapon script and moved it to utilities",
  1156.  
  1157. "Improved the acebot console with live updates and better logging",
  1158.  
  1159. "Added chat spammer",
  1160.  
  1161. " ===== 0.84b (Jan 28 2016) ===== ",
  1162.  
  1163. "Minor system fixes, passing invalid players etc",
  1164.  
  1165. " ===== 0.84a (Jan 23 2016) ===== ",
  1166.  
  1167. "Removed inject SCI function since it's now built into wraithnet",
  1168.  
  1169. "Improved headshot accuracy for aimbot",
  1170.  
  1171. "Added the option to target heads or centre of mass for aimbot",
  1172.  
  1173. "Added teleport, gas, become unbannable macros, extended range on most trace based macros",
  1174.  
  1175. " ===== Alpha phase (June 2015 - Jan 2016) ===== ",
  1176.  
  1177. "Acebot created, cac bypassed, many shitRP servers pooped on",
  1178.  
  1179. }
  1180.  
  1181.  
  1182.  
  1183. AB.Vars = AB.Vars or {}
  1184.  
  1185. AB.NumberVars = AB.NumberVars or {} -- need a seperate table here coz im a lazy cunt
  1186.  
  1187. AB.Buddies = AB.Buddies or {}
  1188.  
  1189. AB.Targets = AB.Targets or {}
  1190.  
  1191. AB.TheyHaveEyesEverywhere = AB.TheyHaveEyesEverywhere or {}
  1192.  
  1193. AB.Witnesses = AB.Witnesses or {}
  1194.  
  1195. AB.Debug = AB.Debug or {}
  1196.  
  1197. AB.MarkedEnts = AB.MarkedEnts or {}
  1198.  
  1199. AB.Traitors = AB.Traitors or {}
  1200.  
  1201. AB.RenderPanic = false
  1202.  
  1203. AB.NameStealName = "Garry :D"
  1204.  
  1205. AB.NameStealPlayer = LocalPlayer()
  1206.  
  1207. AB.CrossHairAlpha = 0
  1208.  
  1209. AB.ScrollDelta = 0 -- lets you set mouse wheel scroll from outside of createmove
  1210.  
  1211. AB.AimbotBone = "ValveBiped.Bip01_Head1"
  1212.  
  1213. AB.ViewAngle = Angle(0,0,0)
  1214.  
  1215. AB.AimbotTarget = game.GetWorld()
  1216.  
  1217. AB.AimbotPreviewTarget = -1
  1218.  
  1219. AB.HoldingProp = game.GetWorld()
  1220.  
  1221. AB.ChatSpamText = "@getodium"
  1222.  
  1223. AB.OPhysColor = Vector( GetConVarString( "cl_weaponcolor" ) ) or Vector( 1,1,1 )
  1224.  
  1225. AB.CurrentBase = 0
  1226.  
  1227. AB.BaseAreaSize = 10
  1228.  
  1229. AB.InternalFakeAngles = 0
  1230.  
  1231. AB.MemoryDebug = {
  1232.  
  1233. ["hud"] = 0,
  1234.  
  1235. ["logic"] = 0,
  1236.  
  1237. ["aimbot"] = 0,
  1238.  
  1239. }
  1240.  
  1241. AB.Freecam = false
  1242.  
  1243. AB.FreecamCoordinates = { pos = Vector( 0, 0, 0 ), ang = Angle( 0, 0, 0 ) }
  1244.  
  1245.  
  1246.  
  1247. -- general settings
  1248.  
  1249. AB.Vars.Notifications = AB.Vars.Notifications or true
  1250.  
  1251.  
  1252.  
  1253. -- vision
  1254.  
  1255. AB.Vars.Vision = AB.Vars.Vision or true
  1256.  
  1257. AB.Vars.ShowESP = AB.Vars.ShowESP or true
  1258.  
  1259. AB.Vars.ShowDead = AB.Vars.ShowDead or false
  1260.  
  1261. AB.Vars.ShowHP = AB.Vars.ShowHP or false
  1262.  
  1263. AB.Vars.ShowFriends = AB.Vars.ShowFriends or true
  1264.  
  1265. AB.Vars.ShowTargets = AB.Vars.ShowTargets or true
  1266.  
  1267. AB.Vars.TeamColors = AB.Vars.TeamColors or false
  1268.  
  1269. AB.Vars.ShowRanks = AB.Vars.ShowRanks or true
  1270.  
  1271. AB.Vars.ShowTraitors = AB.Vars.ShowTraitors or true
  1272.  
  1273. AB.Vars.ShowDistance = AB.Vars.ShowDistance or false
  1274.  
  1275. AB.Vars.ESPProps = AB.Vars.ESPProps or false
  1276.  
  1277. AB.Vars.Entfinder = AB.Vars.Entfinder or false
  1278.  
  1279. AB.Vars.Vizlines = AB.Vars.Vizlines or false
  1280.  
  1281. AB.Vars.BoundingBox = AB.Vars.BoundingBox or false
  1282.  
  1283. AB.Vars.BoundingBox3d = AB.Vars.BoundingBox3d or false
  1284.  
  1285. AB.Vars.VSquares = AB.Vars.VSquares or true
  1286.  
  1287. AB.Vars.VNames = AB.Vars.VNames or true
  1288.  
  1289. AB.Vars.PKVelocity = AB.Vars.PKVelocity or false
  1290.  
  1291. AB.Vars.PKChams = AB.Vars.PKChams or false
  1292.  
  1293. AB.Vars.PKPropCam = AB.Vars.PKPropCam or false
  1294.  
  1295. AB.Vars.PKPropBeams = AB.Vars.PKPropBeams or false
  1296.  
  1297. AB.Vars.PKPlayerBeams = AB.Vars.PKPlayerBeams or false
  1298.  
  1299. AB.Vars.PKVerticalBeams = AB.Vars.PKVerticalBeams or false
  1300.  
  1301. AB.Vars.CSFlashlight = AB.Vars.CSFlashlight or false
  1302.  
  1303. AB.NumberVars.VisionDist = AB.NumberVars.VisionDist or 2000
  1304.  
  1305.  
  1306.  
  1307. -- utility
  1308.  
  1309.  
  1310.  
  1311. AB.Vars.CameraSpam = AB.Vars.CameraSpam or true
  1312.  
  1313. AB.Vars.FlashlightSpam = AB.Vars.FlashlightSpam or false
  1314.  
  1315. AB.Vars.NoRecoil = AB.Vars.NoRecoil or true
  1316.  
  1317.  
  1318.  
  1319. AB.Vars.WitnessDetector = AB.Vars.WitnessDetector or false
  1320.  
  1321. AB.Vars.Mirror = AB.Vars.Mirror or false
  1322.  
  1323. AB.Vars.Radar = AB.Vars.Radar or false
  1324.  
  1325. AB.Vars.RadarColors = AB.Vars.RadarColors or false
  1326.  
  1327. AB.Vars.Xray = AB.Vars.Xray or false
  1328.  
  1329. AB.Vars.Crosshair = AB.Vars.Crosshair or false
  1330.  
  1331. AB.Vars.NameStealer = false
  1332.  
  1333. AB.Vars.NotifyKills = AB.Vars.NotifyKills or false
  1334.  
  1335.  
  1336.  
  1337. AB.Vars.XrayPlayers = AB.Vars.XrayPlayers or true
  1338.  
  1339. AB.Vars.XrayProps = AB.Vars.XrayProps or true
  1340.  
  1341. AB.Vars.XrayEntfinder = AB.Vars.XrayEntfinder or false
  1342.  
  1343. AB.Vars.NoChamColours = AB.Vars.NoChamColours or true
  1344.  
  1345. AB.Vars.XraySolid = AB.Vars.XraySolid or false
  1346.  
  1347.  
  1348.  
  1349. AB.Vars.AutoAddSteamFriends = AB.Vars.AutoAddSteamFriends or true
  1350.  
  1351.  
  1352.  
  1353. AB.Vars.ChatSpam = false
  1354.  
  1355. AB.Vars.ChatSpamOOC = AB.Vars.ChatSpamOOC or false
  1356.  
  1357. AB.Vars.ChatSpamBind = AB.Vars.ChatSpamBind or false
  1358.  
  1359. AB.Vars.ChatSpamInsult = AB.Vars.ChatSpamInsult or false
  1360.  
  1361. AB.Vars.ChatSpamPM = AB.Vars.ChatSpamPM or false
  1362.  
  1363. AB.Vars.ChatSpamPMAdmins = AB.Vars.ChatSpamPMAdmins or false
  1364.  
  1365.  
  1366.  
  1367. AB.EntScanner = false
  1368.  
  1369. AB.EntScannerTab = {}
  1370.  
  1371. AB.EntScannerEnt = game.GetWorld()
  1372.  
  1373.  
  1374.  
  1375. AB.Vars.DemoteSpam = false
  1376.  
  1377. AB.Vars.WantedSpam = false
  1378.  
  1379. AB.Vars.ULXVotekickSpam = false
  1380.  
  1381. AB.Vars.ULXVotebanSpam = false
  1382.  
  1383.  
  1384.  
  1385. AB.Vars.KillTaunts = false
  1386.  
  1387. AB.Vars.DeathTaunts = false
  1388.  
  1389.  
  1390.  
  1391. AB.Vars.DodgeArrest = false
  1392.  
  1393. AB.Vars.NewLifeRule = false
  1394.  
  1395. AB.Vars.DontTouchMeThere = false
  1396.  
  1397.  
  1398.  
  1399. AB.Vars.KeypadJew = false
  1400.  
  1401. AB.Vars.FreecamControls = false
  1402.  
  1403.  
  1404.  
  1405. -- aimbot
  1406.  
  1407.  
  1408.  
  1409. AB.Vars.Aimbot = AB.Vars.Aimbot or false
  1410.  
  1411. AB.Vars.AimbotTargetMode = AB.Vars.AimbotTargetMode or true
  1412.  
  1413. AB.Vars.AutoShoot = AB.Vars.AutoShoot or false
  1414.  
  1415. AB.Vars.AutoTrigger = AB.Vars.AutoTrigger or false
  1416.  
  1417. AB.Vars.AimbotShootThroughWalls = AB.Vars.AimbotShootThroughWalls or false
  1418.  
  1419. AB.Vars.SnapOnFire = AB.Vars.SnapOnFire or false
  1420.  
  1421. AB.Vars.TargetFriends = AB.Vars.TargetFriends or true
  1422.  
  1423. AB.Vars.TargetHighlighted = AB.Vars.TargetHighlighted or true
  1424.  
  1425. AB.Vars.TargetNormies = AB.Vars.TargetNormies or true
  1426.  
  1427. AB.Vars.TargetAdmins = AB.Vars.TargetAdmins or true
  1428.  
  1429. AB.Vars.TargetSameTeam = AB.Vars.TargetSameTeam or true
  1430.  
  1431. AB.Vars.TargetNoclippers = AB.Vars.TargetNoclippers or true
  1432.  
  1433. AB.Vars.PreviewTarget = AB.Vars.PreviewTarget or true
  1434.  
  1435. AB.Vars.CompSpread = AB.Vars.CompSpread or false
  1436.  
  1437. AB.Vars.SilentAim = AB.Vars.SilentAim or false
  1438.  
  1439. AB.Vars.AimbotBindMode = AB.Vars.AimbotBindMode or false
  1440.  
  1441. AB.Vars.AimbotWallbanger = AB.Vars.AimbotWallbanger or false
  1442.  
  1443. AB.Vars.AimbotAdaptiveTarget = AB.Vars.AimbotAdaptiveTarget or false
  1444.  
  1445. AB.Vars.AimbotStickyLock = AB.Vars.AimbotStickyLock or true
  1446.  
  1447.  
  1448.  
  1449. AB.NumberVars.AimbotMaxFOV = AB.NumberVars.AimbotMaxFOV or 20
  1450.  
  1451. AB.NumberVars.AimbotDist = AB.NumberVars.AimbotDist or 200
  1452.  
  1453. AB.NumberVars.AimbotSmooth = AB.NumberVars.AimbotSmooth or 0
  1454.  
  1455. AB.NumberVars.PKRotateAngle = AB.NumberVars.PKRotateAngle or 30
  1456.  
  1457.  
  1458.  
  1459. AB.NumberVars.AimbotBindKey = AB.NumberVars.AimbotBindKey or 107
  1460.  
  1461.  
  1462.  
  1463. AB.NumberVars.FreecamForward = AB.NumberVars.FreecamForward or 50
  1464.  
  1465. AB.NumberVars.FreecamBack = AB.NumberVars.FreecamBack or 49
  1466.  
  1467. AB.NumberVars.FreecamLeft = AB.NumberVars.FreecamLeft or 41
  1468.  
  1469. AB.NumberVars.FreecamRight = AB.NumberVars.FreecamRight or 43
  1470.  
  1471. AB.NumberVars.FreecamUp = AB.NumberVars.FreecamUp or 45
  1472.  
  1473. AB.NumberVars.FreecamDown = AB.NumberVars.FreecamDown or 42
  1474.  
  1475.  
  1476.  
  1477. -- default menu and esp colours
  1478.  
  1479. AB.DefaultSchemes = {
  1480.  
  1481. [1] = {"Spectral Blue", Color(205,205,255,255), Color(105,105,255,255)},
  1482.  
  1483. [2] = {"Ocean Blue", Color(100,100,255,255), Color(50,50,155,255)},
  1484.  
  1485. [3] = {"Sage Green", Color(100,250,100,255), Color(0,200,0,255)},
  1486.  
  1487. [4] = {"Javelin Orange", Color(250,250,0,255), Color(250,150,0,255)},
  1488.  
  1489. [5] = {"Predator Red", Color(255,0,0,255), Color(200,0,0,255)},
  1490.  
  1491. [6] = {"Miami Pink", Color(255,0,255,255), Color(150,0,150,255)},
  1492.  
  1493. [7] = {"Anus Brown", Color(125,0,0,255), Color(50,0,0,255)},
  1494.  
  1495. [8] = {"Jungle Green", Color(50,150,50,255), Color(0,50,0,255)},
  1496.  
  1497. [9] = {"Noir Grey", Color(150,150,150,255), Color(50,50,50,255)},
  1498.  
  1499. }
  1500.  
  1501.  
  1502.  
  1503. AB.DefaultScheme = Color(205,205,255,255)
  1504.  
  1505. AB.DefaultScheme2 = Color(80,80,255,255)
  1506.  
  1507. AB.Matinfo = {
  1508.  
  1509. ["$basetexture"] = "models/debug/debugwhite",
  1510.  
  1511. ["$model"] = 1,
  1512.  
  1513. ["$nocull"] = 1,
  1514.  
  1515. ["$ignorez"] = 1,
  1516.  
  1517. }
  1518.  
  1519.  
  1520.  
  1521. AB.Mat1 = (CreateMaterial( "abchams2", "VertexLitGeneric", AB.Matinfo ))
  1522.  
  1523. AB.ColScheme = Vector(AB.DefaultScheme.r / 255, AB.DefaultScheme.g / 255, AB.DefaultScheme.b / 255)
  1524.  
  1525. AB.ColScheme2 = Vector(AB.DefaultScheme2.r / 255, AB.DefaultScheme2.g / 255, AB.DefaultScheme2.b / 255)
  1526.  
  1527.  
  1528.  
  1529. AB.NumberVars.ColorScheme = AB.NumberVars.ColorScheme or 1
  1530.  
  1531.  
  1532.  
  1533. -- herkz
  1534.  
  1535. AB.Vars.Aimbot = AB.Vars.Aimbot or false
  1536.  
  1537.  
  1538.  
  1539. AB.Vars.Autoclick = AB.Vars.Autoclick or false
  1540.  
  1541. AB.Vars.Bhop = AB.Vars.Bhop or false
  1542.  
  1543. AB.Vars.BhopAutostrafe = AB.Vars.BhopAutostrafe or false
  1544.  
  1545. AB.Vars.RopeStorm = AB.Vars.RopeStorm or false
  1546.  
  1547. AB.Vars.Triggerbot = AB.Vars.Triggerbot or false
  1548.  
  1549. AB.Vars.Thirdperson = AB.Vars.Thirdperson or false
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555. AB.NumberVars.MirrorX = AB.NumberVars.MirrorX or 0
  1556.  
  1557. AB.NumberVars.MirrorY = AB.NumberVars.MirrorY or 0
  1558.  
  1559. AB.NumberVars.MirrorSize = AB.NumberVars.MirrorSize or 30
  1560.  
  1561. AB.NumberVars.MirrorAxis = AB.NumberVars.MirrorAxis or 0
  1562.  
  1563.  
  1564.  
  1565. AB.NumberVars.XrayDistance = AB.NumberVars.XrayDistance or 200
  1566.  
  1567. AB.NumberVars.TPSDistance = AB.NumberVars.TPSDistance or 100
  1568.  
  1569. AB.NumberVars.TPSOffset = AB.NumberVars.TPSOffset or 0
  1570.  
  1571.  
  1572.  
  1573. AB.NumberVars.RadarX = AB.NumberVars.RadarX or ScrW() - 280
  1574.  
  1575. AB.NumberVars.RadarY = AB.NumberVars.RadarY or 20
  1576.  
  1577. AB.NumberVars.RadarAlpha = AB.NumberVars.RadarAlpha or 255
  1578.  
  1579. AB.NumberVars.RadarSize = AB.NumberVars.RadarSize or 250
  1580.  
  1581. AB.NumberVars.RadarZoom = AB.NumberVars.RadarZoom or 50
  1582.  
  1583.  
  1584.  
  1585. /*
  1586.  
  1587. local plymeta = FindMetaTable( "Player" )
  1588.  
  1589. plymeta.ConCommand2 = plymeta.ConCommand2 or plymeta.ConCommand
  1590.  
  1591. function plymeta:ConCommand( command )
  1592.  
  1593. if command == "jpeg" and AB.Vars.CameraSpam then return else
  1594.  
  1595. return self:ConCommand2( command )
  1596.  
  1597. end
  1598.  
  1599. end
  1600.  
  1601. */
  1602.  
  1603.  
  1604.  
  1605. local ncomponent = { color = Color( 205, 205, 255 ), name = "Acebot" }
  1606.  
  1607. function AB.ChatText( message, col, typ )
  1608.  
  1609. typ = typ or 1
  1610.  
  1611. if odium and odium.aegis then
  1612.  
  1613. if col.r - ( col.g + col.b ) > 150 then typ = 4 end -- probably an error message
  1614.  
  1615. if col.r == 255 and col.g == 205 and col.b == 205 then typ = 2 end
  1616.  
  1617. if col.g >= (col.r + col.b) then typ = 3 end
  1618.  
  1619. odium.aegis.Notify( ncomponent, typ, message )
  1620.  
  1621. else
  1622.  
  1623. chat.AddText( Color(195,205,255,255), "[Acebot] ", col, message )
  1624.  
  1625. end
  1626.  
  1627. end
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633. ------------------------------------------------------------------------ACEBOT UTILITIES--------------------------------------------------------------------------------------
  1634.  
  1635.  
  1636.  
  1637. function AB.SetPlayerName( name )
  1638.  
  1639. if !odium or !odium.player or !odium.player.SetName then
  1640.  
  1641. AB.ChatText( "Odium main module not present or malfunctioning! Name changing will not work!", Color(255,100,0) )
  1642.  
  1643. AB.Vars.NameStealer = false
  1644.  
  1645. return
  1646.  
  1647. end
  1648.  
  1649. odium.player.SetName( name )
  1650.  
  1651. end
  1652.  
  1653.  
  1654.  
  1655. local nstries = 0
  1656.  
  1657. --local ninjacharacter = ""
  1658.  
  1659. local ninjacharacter = ""
  1660.  
  1661.  
  1662.  
  1663. function AB.NameStealer()
  1664.  
  1665. if !AB.Vars.NameStealer or !LocalPlayer():IsValid() then return end
  1666.  
  1667. if !AB.NameStealPlayer:IsValid() then AB.NameStealPlayer = LocalPlayer() end
  1668.  
  1669.  
  1670.  
  1671. -- set your name to a given string, unfucks bytefalls random malfunctions
  1672.  
  1673. if AB.NameStealName != LocalPlayer():Nick() and AB.NameStealPlayer == LocalPlayer() then
  1674.  
  1675. nstries = nstries + 1
  1676.  
  1677. AB.NameStealName = LocalPlayer():Nick()
  1678.  
  1679. -- LocalPlayer():ConCommand( "odium_setname "..AB.NameStealName )
  1680.  
  1681. AB.SetPlayerName( AB.NameStealName )
  1682.  
  1683. if AB.NameStealName == LocalPlayer():Nick() then nstries = 0 end
  1684.  
  1685. end
  1686.  
  1687.  
  1688.  
  1689. local unfuckedname = string.Replace( AB.NameStealName, ninjacharacter, "" ) -- gotta clear the ninjas out so we can check if the namesteal worked properly
  1690.  
  1691.  
  1692.  
  1693. -- dank namestealerinos :^)
  1694.  
  1695. if AB.NameStealPlayer != LocalPlayer() and unfuckedname != AB.NameStealPlayer:Nick() then
  1696.  
  1697. nstries = nstries + 1
  1698.  
  1699. local theirname = AB.NameStealPlayer:Nick()
  1700.  
  1701. local ipos = math.random(1, #theirname)
  1702.  
  1703. local strname = theirname[ipos]
  1704.  
  1705. local fixd = string.Replace(theirname, strname, strname..ninjacharacter )
  1706.  
  1707.  
  1708.  
  1709. AB.NameStealName = fixd
  1710.  
  1711. AB.SetPlayerName( fixd )
  1712.  
  1713. -- LocalPlayer():ConCommand( "odium_setname "..fixd )
  1714.  
  1715. if AB.NameStealName == unfuckedname then nstries = 0 end
  1716.  
  1717. end
  1718.  
  1719.  
  1720.  
  1721. end
  1722.  
  1723. timer.Create("ab_namesteal", 1, 0, AB.NameStealer)
  1724.  
  1725.  
  1726.  
  1727. function AB.NameStealerShutoff()
  1728.  
  1729. steamworks.RequestPlayerInfo( LocalPlayer():SteamID64() )
  1730.  
  1731. timer.Simple( 0.5, function() AB.SetPlayerName(steamworks.GetPlayerName(LocalPlayer():SteamID64())) end)
  1732.  
  1733. AB.Vars.NameStealer = false
  1734.  
  1735. AB.NameStealName = LocalPlayer():Nick()
  1736.  
  1737. AB.NameStealPlayer = LocalPlayer()
  1738.  
  1739. if AB.Vars.Notifications then AB.ChatText( "Shut namestealer script down", Color(255,255,255) ) end
  1740.  
  1741. end
  1742.  
  1743.  
  1744.  
  1745. function AB.ManualNameSet( ply, cmd, args, argstr )
  1746.  
  1747. -- local n = ""
  1748.  
  1749. -- for k, v in pairs( args ) do if k != 1 then n = n.." "..v else n = n..v end end
  1750.  
  1751. AB.SetPlayerName( argstr )
  1752.  
  1753. end
  1754.  
  1755. concommand.Add( "odium_setname", AB.ManualNameSet )
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761. function AB.SaveSettings()
  1762.  
  1763. local StringToWrite = ""
  1764.  
  1765. for k, v in pairs(AB.Vars) do
  1766.  
  1767. if( StringToWrite == "" ) then
  1768.  
  1769. StringToWrite = k .. ";" .. tostring(v)
  1770.  
  1771. else
  1772.  
  1773. StringToWrite = StringToWrite .. "\n" .. k .. ";" .. tostring(v)
  1774.  
  1775. end
  1776.  
  1777. end
  1778.  
  1779. StringToWrite = StringToWrite.."--NUMBERVARS--\n"
  1780.  
  1781. for k, v in pairs(AB.NumberVars) do
  1782.  
  1783. if( StringToWrite == "" ) then
  1784.  
  1785. StringToWrite = k .. ";" .. tostring(v)
  1786.  
  1787. else
  1788.  
  1789. StringToWrite = StringToWrite .. "\n" .. k .. ";" .. tostring(v)
  1790.  
  1791. end
  1792.  
  1793. end
  1794.  
  1795. /*
  1796.  
  1797. if not file.IsDir("acebot", "DATA") then
  1798.  
  1799. file.CreateDir("acebot")
  1800.  
  1801. end
  1802.  
  1803. */
  1804.  
  1805. if file.IsDir("acebot", "DATA") then
  1806.  
  1807. file.Delete( "acebot/settings.txt" )
  1808.  
  1809. file.Delete( "acebot" )
  1810.  
  1811. end
  1812.  
  1813.  
  1814.  
  1815. file.Write( "acebot_settings.dat", StringToWrite )
  1816.  
  1817. end
  1818.  
  1819. concommand.Add("ace_save_settings", AB.SaveSettings)
  1820.  
  1821.  
  1822.  
  1823. function AB.LoadSettings()
  1824.  
  1825. /*
  1826.  
  1827. if not file.IsDir("acebot", "DATA") then
  1828.  
  1829. file.CreateDir("acebot")
  1830.  
  1831. end
  1832.  
  1833. */
  1834.  
  1835. if !file.Exists("acebot_settings.dat", "DATA") then AB.SaveSettings() return end
  1836.  
  1837.  
  1838.  
  1839. local TheFile = file.Read( "acebot_settings.dat", "DATA" )
  1840.  
  1841. local halves = string.Explode( "--NUMBERVARS--\n", TheFile )
  1842.  
  1843. if !halves[2] then file.Delete( "acebot_settings.dat" )
  1844.  
  1845. AB.ChatText( "Invalid data file and/or data file is using an outdated format! type ace_save_settings into console to fix this", Color(255,205,205) )
  1846.  
  1847. return
  1848.  
  1849. end
  1850.  
  1851.  
  1852.  
  1853. TheFile = halves[1]
  1854.  
  1855. local DataPieces = string.Explode( "\n", TheFile )
  1856.  
  1857.  
  1858.  
  1859. for k, v in pairs( DataPieces ) do
  1860.  
  1861. local TheLine = string.Explode( ";", v )
  1862.  
  1863. AB.Vars[TheLine[1]] = tobool(TheLine[2])
  1864.  
  1865. end
  1866.  
  1867.  
  1868.  
  1869. TheFile = halves[2]
  1870.  
  1871. local DataPieces = string.Explode( "\n", TheFile )
  1872.  
  1873.  
  1874.  
  1875. for k, v in pairs( DataPieces ) do
  1876.  
  1877. local TheLine = string.Explode( ";", v )
  1878.  
  1879. AB.NumberVars[TheLine[1]] = tonumber(TheLine[2])
  1880.  
  1881. end
  1882.  
  1883.  
  1884.  
  1885. AB.Vars.NameStealer = false
  1886.  
  1887.  
  1888.  
  1889. end
  1890.  
  1891. concommand.Add("ace_load_settings", AB.LoadSettings)
  1892.  
  1893. AB.LoadSettings() -- load our shit right away
  1894.  
  1895. AB.Vars.ChatSpam = false -- reset this to false so we dont get cucked by anticheats
  1896.  
  1897.  
  1898.  
  1899. -- covert source units(inches) to metres
  1900.  
  1901. function AB.ToMetric( num )
  1902.  
  1903. if not isnumber(num) then return end
  1904.  
  1905. return math.floor(num * 0.0254)
  1906.  
  1907. end
  1908.  
  1909.  
  1910.  
  1911. -- check if an entity is actually visible on our screen, used to boost efficiency in the xray and esp code
  1912.  
  1913. function AB.OnScreen( ent, ws )
  1914.  
  1915. local ws = ws or 0
  1916.  
  1917. local bpos = (ent:LocalToWorld(ent:OBBCenter())):ToScreen()
  1918.  
  1919. if ( bpos.x < (ScrW() + ws) and bpos.x > (0 - ws) and bpos.y < (ScrH() + ws) and bpos.y > (0 - ws) ) then return true end
  1920.  
  1921. return false
  1922.  
  1923. end
  1924.  
  1925.  
  1926.  
  1927. function AB.IsDead( ply )
  1928.  
  1929. if !ply:IsValid() or !ply:Alive() or ply:GetObserverMode() != OBS_MODE_NONE then return true end
  1930.  
  1931. return false
  1932.  
  1933. end
  1934.  
  1935.  
  1936.  
  1937. -- compatible with ulx, assmod, evolve, vermillion 2 and traditional admin/superadmin detection may or may not pick up unknown admin mods
  1938.  
  1939. function AB.GetRank( ply )
  1940.  
  1941. if !ply or !ply:IsValid() then return "user" end
  1942.  
  1943. local rank = "user"
  1944.  
  1945. if ply:GetNWString("usergroup") then rank = ply:GetNWString("usergroup") return rank end
  1946.  
  1947. --if evolve then rank = ply:EV_GetRank() return rank end
  1948.  
  1949. if ply:GetNetworkedString( "UserGroup" ) then rank = ply:GetNetworkedString( "UserGroup" ) return rank end
  1950.  
  1951. if ply:GetNWString("Vermilion_Rank") then rank = ply:GetNWString("Vermilion_Rank") return rank end
  1952.  
  1953. if ply:IsSuperAdmin() then rank = "SUPERADMIN" return rank end
  1954.  
  1955. if ply:IsAdmin() then rank = "ADMIN" return rank end
  1956.  
  1957.  
  1958.  
  1959. return rank -- if they aren't any kind of admin that we know of then this will return "user"
  1960.  
  1961. end
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967. function AB.GetESPColor( ply )
  1968.  
  1969. local col1, col2 = AB.DefaultScheme, AB.DefaultScheme2
  1970.  
  1971.  
  1972.  
  1973. if AB.IsTarget( ply ) then
  1974.  
  1975. col1, col2 = Color(255,205,0,255), Color(205,160,0,255)
  1976.  
  1977. return col1, col2
  1978.  
  1979. end
  1980.  
  1981.  
  1982.  
  1983. if AB.IsFriend( ply ) then
  1984.  
  1985. col1, col2 = Color(0,255,0,255), Color(100,250,100,255)
  1986.  
  1987. return col1, col2
  1988.  
  1989. end
  1990.  
  1991.  
  1992.  
  1993. if AB.GetRank( ply ) != "user" then
  1994.  
  1995. col1, col2 = Color(255,100,0,255), Color(255,50,0,255)
  1996.  
  1997. return col1, col2
  1998.  
  1999. end
  2000.  
  2001.  
  2002.  
  2003. if AB.Vars.TeamColors then
  2004.  
  2005. col1 = team.GetColor(ply:Team())
  2006.  
  2007. col2 = Color(math.Clamp(col1.r - 100, 0, 255), math.Clamp(col1.g - 100, 0, 255), math.Clamp(col1.b - 100, 0, 255), 255)
  2008.  
  2009. return col1, col2
  2010.  
  2011. end
  2012.  
  2013.  
  2014.  
  2015. return col1, col2
  2016.  
  2017. end
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023. -- friends and targets system
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033. function AB.AddTarget( ply )
  2034.  
  2035. if !ply or !ply:IsValid() then return end
  2036.  
  2037. if table.HasValue( AB.Targets, ply ) then return end
  2038.  
  2039. table.insert( AB.Targets, ply )
  2040.  
  2041. AB.DebugLog( "Added "..ply:Nick().." to your targets list", Color( 250, 150, 50) )
  2042.  
  2043. end
  2044.  
  2045.  
  2046.  
  2047. function AB.RemoveTarget( ply )
  2048.  
  2049. if !ply or !ply:IsValid() then return end
  2050.  
  2051. if not table.HasValue( AB.Targets, ply ) then AB.ChatText( ply:Nick().." isn't a target!", Color(255,205,205) ) return end
  2052.  
  2053. table.RemoveByValue( AB.Targets, ply )
  2054.  
  2055. AB.DebugLog( "Removed "..ply:Nick().." from your targets list", Color( 250, 150, 50) )
  2056.  
  2057. end
  2058.  
  2059.  
  2060.  
  2061. function AB.IsTarget( ply )
  2062.  
  2063. if !ply or !ply:IsValid() then return false end
  2064.  
  2065. return table.HasValue( AB.Targets, ply )
  2066.  
  2067. end
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074.  
  2075. function AB.IsFriend( ply )
  2076.  
  2077. if !ply or !ply:IsValid() then return false end
  2078.  
  2079. return table.HasValue( AB.Buddies, ply )
  2080.  
  2081. end
  2082.  
  2083.  
  2084.  
  2085. function AB.AddFriend( ply )
  2086.  
  2087. if !ply:IsValid() then return end
  2088.  
  2089. if table.HasValue( AB.Buddies, ply ) then return end
  2090.  
  2091. table.insert( AB.Buddies, ply )
  2092.  
  2093. AB.DebugLog( "Added "..ply:Nick().." to your friends list", Color( 50, 250, 50) )
  2094.  
  2095. end
  2096.  
  2097.  
  2098.  
  2099. function AB.RemoveFriend( ply )
  2100.  
  2101. if !ply:IsValid() then return end
  2102.  
  2103. if not table.HasValue( AB.Buddies, ply ) then AB.ChatText( ply:Nick().." isn't on your friends list!", Color(255,205,205) ) return end
  2104.  
  2105. table.RemoveByValue( AB.Buddies, ply )
  2106.  
  2107. AB.DebugLog( "Removed "..ply:Nick().." from your friends list", Color( 50, 250, 50) )
  2108.  
  2109. end
  2110.  
  2111.  
  2112.  
  2113. function AB.RemoveInvalidFriends()
  2114.  
  2115. for k, v in pairs(AB.Buddies) do
  2116.  
  2117. if !v:IsValid() then table.remove( AB.Buddies, k ) end
  2118.  
  2119. end
  2120.  
  2121. end
  2122.  
  2123.  
  2124.  
  2125. function AB.AddConnectedFriends()
  2126.  
  2127. for k, v in pairs(player.GetAll()) do
  2128.  
  2129. if v:GetFriendStatus() == "friend" then AB.AddFriend( v ) end
  2130.  
  2131. end
  2132.  
  2133. end
  2134.  
  2135. concommand.Add("ace_refresh_friends", AB.AddConnectedFriends)
  2136.  
  2137. timer.Create( "ab_keep_friends_updated", 10, 0, AB.AddConnectedFriends )
  2138.  
  2139.  
  2140.  
  2141. gameevent.Listen( "player_spawn" )
  2142.  
  2143. hook.Add( "player_spawn", "addsteamfriends", function( data )
  2144.  
  2145. local id = data.userid
  2146.  
  2147. local ply = player.GetByID( id )
  2148.  
  2149. if !ply:IsValid() then return end
  2150.  
  2151. if ply:GetFriendStatus() == "friend" and AB.Vars.AutoAddSteamFriends and !table.HasValue( AB.Buddies, ply ) then
  2152.  
  2153. AB.AddFriend( ply )
  2154.  
  2155. end
  2156.  
  2157. end )
  2158.  
  2159.  
  2160.  
  2161. -- this is for faggots that attempt to restrict ulx who
  2162.  
  2163.  
  2164.  
  2165. function AB.Who()
  2166.  
  2167. local plys = player.GetAll()
  2168.  
  2169. for k, v in pairs(plys) do
  2170.  
  2171. if v:GetNWString("usergroup") then
  2172.  
  2173. local col = Color( 150, 150, 200, 255 )
  2174.  
  2175. if v:GetNWString("usergroup") != "user" then col = Color( 250, 200, 150, 255 ) end
  2176.  
  2177. MsgC(col, v:GetName() .. string.rep("\t", math.Round(8 / #v:GetName())), v:GetNWString("usergroup").."\n")
  2178.  
  2179. end
  2180.  
  2181. end
  2182.  
  2183. end
  2184.  
  2185. concommand.Add("ace_who", AB.Who)
  2186.  
  2187.  
  2188.  
  2189. local grad = Material( "gui/gradient" )
  2190.  
  2191. local upgrad = Material( "gui/gradient_up" )
  2192.  
  2193. local downgrad = Material( "gui/gradient_down" )
  2194.  
  2195. local o_color1 = Color( 0, 0, 50, 255 )
  2196.  
  2197. local o_color2 = Color(155, 155, 155, 255)
  2198.  
  2199.  
  2200.  
  2201.  
  2202.  
  2203. function AB.ToggleVar( var, fancyname )
  2204.  
  2205. if AB.Vars[var] then
  2206.  
  2207. if AB.Vars.Notifications then AB.ChatText( "Disabled "..fancyname, Color(255,205,205) ) end
  2208.  
  2209. if string.find(var, "Xray") or var == "Vision" then AB.XrayShutoff() end -- need to run this function to properly unfuck things that have been xray'd
  2210.  
  2211. AB.Vars[var] = false
  2212.  
  2213. else
  2214.  
  2215. if AB.Vars.Notifications then AB.ChatText( "Enabled "..fancyname, Color(255,255,255) ) end
  2216.  
  2217. AB.Vars[var] = true
  2218.  
  2219. end
  2220.  
  2221. AB.SaveSettings()
  2222.  
  2223. end
  2224.  
  2225.  
  2226.  
  2227. for k, v in pairs(AB.Vars) do
  2228.  
  2229. concommand.Add("ace_togglevar_"..string.lower(k), function() AB.ToggleVar( k, k ) end)
  2230.  
  2231. end
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237. function AB.ChangeColorScheme( num )
  2238.  
  2239. if not isnumber(num) then return end
  2240.  
  2241. if num <= 0 or num > #AB.DefaultSchemes then print("I don't know how you fucked up this badly but you are trying to change to a colour scheme that doesn't exist!") return end
  2242.  
  2243. local c1 = AB.DefaultSchemes[num][2]
  2244.  
  2245. local c2 = AB.DefaultSchemes[num][3]
  2246.  
  2247.  
  2248.  
  2249. if AB.Vars.Notifications then AB.ChatText( "Changed colour scheme to "..AB.DefaultSchemes[num][1], c1 ) end
  2250.  
  2251. AB.DefaultScheme = c1
  2252.  
  2253. AB.DefaultScheme2 = c2
  2254.  
  2255. AB.ColScheme = Vector(c1.r / 255, c1.g / 255, c1.b / 255)
  2256.  
  2257. AB.ColScheme2 = Vector(c2.r / 255, c2.g / 255, c2.b / 255)
  2258.  
  2259.  
  2260.  
  2261. -- AB.NumberVars.ColorScheme = num -- done inside the button logic
  2262.  
  2263.  
  2264.  
  2265. end
  2266.  
  2267.  
  2268.  
  2269. function AB.MakeToggleButton( parent, x, y, btext, var, vartext, tooltip)
  2270.  
  2271. if !parent:IsValid() then return end
  2272.  
  2273.  
  2274.  
  2275. local TButton = vgui.Create( "DButton" )
  2276.  
  2277. TButton:SetParent( parent )
  2278.  
  2279. TButton:SetPos( x, y )
  2280.  
  2281. TButton:SetText( btext )
  2282.  
  2283. TButton:SetTextColor( Color(255, 255, 255, 255) )
  2284.  
  2285. TButton:SetSize( 110, 25 )
  2286.  
  2287. if tooltip != nil then TButton:SetToolTip( tooltip ) end
  2288.  
  2289.  
  2290.  
  2291. TButton.Paint = function( self, w, h )
  2292.  
  2293. surface.SetDrawColor( Color(60, 60, 90, 200) )
  2294.  
  2295. TButton:SetText( btext )
  2296.  
  2297. surface.DrawRect( 0, 0, w, h )
  2298.  
  2299. surface.SetDrawColor( o_color1 )
  2300.  
  2301. surface.SetMaterial( downgrad )
  2302.  
  2303. surface.DrawTexturedRect( 0, 0, w, h/ 2 )
  2304.  
  2305.  
  2306.  
  2307. if AB.Vars[var] then
  2308.  
  2309. surface.SetDrawColor( Color(150, 250, 150, 255) )
  2310.  
  2311. else
  2312.  
  2313. surface.SetDrawColor( Color(100, 100, 100, 255) )
  2314.  
  2315. end
  2316.  
  2317. surface.DrawOutlinedRect( 0, 0, w, h )
  2318.  
  2319. end
  2320.  
  2321.  
  2322.  
  2323.  
  2324.  
  2325. TButton.DoClick = function()
  2326.  
  2327. AB.ToggleVar( var, vartext )
  2328.  
  2329. end
  2330.  
  2331.  
  2332.  
  2333. end
  2334.  
  2335.  
  2336.  
  2337. function AB.MakeFunctionButton( parent, x, y, btext, func, tooltip)
  2338.  
  2339. if !parent:IsValid() then return end
  2340.  
  2341.  
  2342.  
  2343. local TButton = vgui.Create( "DButton" )
  2344.  
  2345. TButton:SetParent( parent )
  2346.  
  2347. TButton:SetPos( x, y )
  2348.  
  2349. TButton:SetText( btext )
  2350.  
  2351. TButton:SetTextColor( Color(255, 255, 255, 255) )
  2352.  
  2353. TButton:SetSize( 110, 25 )
  2354.  
  2355. if tooltip != nil then TButton:SetToolTip( tooltip ) end
  2356.  
  2357.  
  2358.  
  2359. TButton.Paint = function( self, w, h )
  2360.  
  2361. surface.SetDrawColor( Color(60, 60, 90, 200) )
  2362.  
  2363. TButton:SetText( btext )
  2364.  
  2365. surface.DrawRect( 0, 0, w, h )
  2366.  
  2367. surface.SetDrawColor( o_color1 )
  2368.  
  2369. surface.SetMaterial( downgrad )
  2370.  
  2371. surface.DrawTexturedRect( 0, 0, w, h/ 2 )
  2372.  
  2373.  
  2374.  
  2375. surface.SetDrawColor( Color(100, 100, 100, 255) )
  2376.  
  2377. surface.DrawOutlinedRect( 0, 0, w, h )
  2378.  
  2379. end
  2380.  
  2381.  
  2382.  
  2383.  
  2384.  
  2385. TButton.DoClick = function()
  2386.  
  2387. func()
  2388.  
  2389. end
  2390.  
  2391.  
  2392.  
  2393. end
  2394.  
  2395.  
  2396.  
  2397. function AB.MakeFloatingButton( x, y, btext, func)
  2398.  
  2399. local TButton = vgui.Create( "DButton" )
  2400.  
  2401. TButton:SetPos( x, y )
  2402.  
  2403. TButton:SetText( btext )
  2404.  
  2405. TButton:SetTextColor( Color(255, 255, 255, 255) )
  2406.  
  2407. TButton:SetSize( 110, 25 )
  2408.  
  2409.  
  2410.  
  2411. TButton.Paint = function( self, w, h )
  2412.  
  2413. surface.SetDrawColor( Color(60, 60, 90, 200) )
  2414.  
  2415. TButton:SetText( btext )
  2416.  
  2417. surface.DrawRect( 0, 0, w, h )
  2418.  
  2419. surface.SetDrawColor( Color(100, 100, 100, 255) )
  2420.  
  2421. surface.DrawOutlinedRect( 0, 0, w, h )
  2422.  
  2423. end
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429. TButton.DoClick = function()
  2430.  
  2431. func()
  2432.  
  2433. end
  2434.  
  2435. return TButton
  2436.  
  2437. end
  2438.  
  2439.  
  2440.  
  2441. function AB.MakeSlider( parent, x, y, length, text, min, max, var )
  2442.  
  2443. if !parent:IsValid() then return end
  2444.  
  2445.  
  2446.  
  2447. local sbg = vgui.Create( "DPanel" )
  2448.  
  2449. sbg:SetParent( parent )
  2450.  
  2451. sbg:SetPos( x, y )
  2452.  
  2453. sbg:SetSize( length, 25 )
  2454.  
  2455.  
  2456.  
  2457. sbg.Paint = function( self, w, h ) -- Paint function
  2458.  
  2459. surface.SetDrawColor( 50, 50, 90, 255 )
  2460.  
  2461. surface.DrawRect(0, 0, w, h )
  2462.  
  2463. surface.SetDrawColor( o_color1 )
  2464.  
  2465. surface.SetMaterial( downgrad )
  2466.  
  2467. surface.DrawTexturedRect( 0, 0, w, h/ 2 )
  2468.  
  2469. surface.SetDrawColor( 50, 50, 90, 255 )
  2470.  
  2471. surface.DrawOutlinedRect(0, 0, w, h )
  2472.  
  2473.  
  2474.  
  2475. end
  2476.  
  2477.  
  2478.  
  2479. local NumSlider = vgui.Create( "DNumSlider", sbg )
  2480.  
  2481. NumSlider:SetPos( 10,-5 )
  2482.  
  2483. NumSlider:SetWide( length - 10 )
  2484.  
  2485. NumSlider:SetText( text )
  2486.  
  2487. NumSlider:SetMin( min )
  2488.  
  2489. NumSlider:SetMax( max )
  2490.  
  2491. NumSlider:SetValue( AB.NumberVars[var] )
  2492.  
  2493. NumSlider:SetDecimals( 0 )
  2494.  
  2495. NumSlider.OnValueChanged = function( panel, val ) AB.NumberVars[var] = math.floor(val) end
  2496.  
  2497.  
  2498.  
  2499. end
  2500.  
  2501.  
  2502.  
  2503. function AB.MakeKeyBinder( parent, x, y, length, height, keyvar, changetxt )
  2504.  
  2505.  
  2506.  
  2507. local binder = vgui.Create( "DBinder", parent )
  2508.  
  2509. binder:SetSize( length, height )
  2510.  
  2511. binder:SetPos( x, y )
  2512.  
  2513. binder:SetTextColor( Color(255,255,255) )
  2514.  
  2515. binder:SetSelected( AB.NumberVars[keyvar] )
  2516.  
  2517. binder.Paint = function( self, w, h )
  2518.  
  2519. surface.SetDrawColor( Color(60, 60, 90, 200) )
  2520.  
  2521. surface.DrawRect( 0, 0, w, h )
  2522.  
  2523. surface.SetDrawColor( o_color1 )
  2524.  
  2525. surface.SetMaterial( downgrad )
  2526.  
  2527. surface.DrawTexturedRect( 0, 0, w, h/ 2 )
  2528.  
  2529.  
  2530.  
  2531. surface.SetDrawColor( Color(100, 100, 100, 255) )
  2532.  
  2533. surface.DrawOutlinedRect( 0, 0, w, h )
  2534.  
  2535. end
  2536.  
  2537. function binder:SetSelectedNumber( num )
  2538.  
  2539. AB.ChatText( "Set new "..changetxt.." bind key", Color(255,255,255) )
  2540.  
  2541. self.m_iSelectedNumber = num
  2542.  
  2543. AB.NumberVars[keyvar] = num
  2544.  
  2545. end
  2546.  
  2547.  
  2548.  
  2549. end
  2550.  
  2551.  
  2552.  
  2553. ------------------------------------------------------------------------ACEBOT MENU--------------------------------------------------------------------------------------
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559. function AB.Menu()
  2560.  
  2561.  
  2562.  
  2563. if AceMenu then return false end
  2564.  
  2565.  
  2566.  
  2567. local AceMenu = vgui.Create("DFrame")
  2568.  
  2569. AceMenu:SetSize(500,700)
  2570.  
  2571. AceMenu:SetTitle("Acebot - A component of Project Odium Edited by NotWill")
  2572.  
  2573. AceMenu:Center()
  2574.  
  2575. AceMenu:MakePopup()
  2576.  
  2577.  
  2578.  
  2579. AceMenu.Paint = function( panel, w, h )
  2580.  
  2581.  
  2582.  
  2583. surface.SetDrawColor( Color(50, 50, 90, 255) )
  2584.  
  2585. surface.DrawRect( 0, 0, w, h )
  2586.  
  2587.  
  2588.  
  2589. surface.SetDrawColor( o_color1 )
  2590.  
  2591. surface.SetMaterial( upgrad )
  2592.  
  2593. surface.DrawTexturedRect( 0, h / 2, w, h / 2 )
  2594.  
  2595.  
  2596.  
  2597. surface.SetDrawColor( o_color1 )
  2598.  
  2599. surface.SetMaterial( downgrad )
  2600.  
  2601. surface.DrawTexturedRect( 0, 0, w, h/ 2 )
  2602.  
  2603.  
  2604.  
  2605. surface.SetDrawColor( o_color2 )
  2606.  
  2607. surface.DrawOutlinedRect( 0, 0, w, h )
  2608.  
  2609. surface.DrawOutlinedRect( 1, 1, w - 2, h - 2 )
  2610.  
  2611. end
  2612.  
  2613.  
  2614.  
  2615.  
  2616.  
  2617. local PropertySheet = vgui.Create( "DPropertySheet" )
  2618.  
  2619. PropertySheet:SetParent( AceMenu )
  2620.  
  2621. PropertySheet:SetPos( 10, 30 )
  2622.  
  2623. PropertySheet:SetSize( 480, AceMenu:GetTall() - 40 )
  2624.  
  2625.  
  2626.  
  2627. PropertySheet.Paint = function()
  2628.  
  2629. surface.SetDrawColor( Color(0, 0, 0, 200) )
  2630.  
  2631. surface.DrawRect(0, 0, PropertySheet:GetWide(), PropertySheet:GetTall())
  2632.  
  2633. for k, v in pairs(PropertySheet.Items) do
  2634.  
  2635. if v.Tab then
  2636.  
  2637. v.Tab.Paint = function(self,w,h)
  2638.  
  2639. draw.RoundedBox(0, 0, 0, w, h, Color(50,90,120))
  2640.  
  2641. end
  2642.  
  2643. end
  2644.  
  2645. end
  2646.  
  2647. end
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653. --------------------------------------------Tabs-------------------------------------------
  2654.  
  2655.  
  2656.  
  2657.  
  2658.  
  2659. local General = vgui.Create( "DPanel" )
  2660.  
  2661. General:SetPos( 0, 0 )
  2662.  
  2663. General:SetSize( 480, AceMenu:GetTall() - 40 )
  2664.  
  2665.  
  2666.  
  2667. General.Paint = function() -- Paint function
  2668.  
  2669. surface.SetDrawColor(50, 50, 50 ,255)
  2670.  
  2671. surface.DrawOutlinedRect(0, 0, General:GetWide(), General:GetTall())
  2672.  
  2673. surface.SetDrawColor(0, 0, 0 ,200)
  2674.  
  2675. surface.DrawRect(0, 0, General:GetWide(), General:GetTall())
  2676.  
  2677. surface.SetDrawColor( 50, 50, 90, 255 )
  2678.  
  2679. surface.DrawRect(0, 40, General:GetWide(), 2)
  2680.  
  2681. end
  2682.  
  2683.  
  2684.  
  2685. local Utility = vgui.Create( "DPanel" )
  2686.  
  2687. Utility:SetPos( 0, 0 )
  2688.  
  2689. Utility:SetSize( 480, AceMenu:GetTall() - 40 )
  2690.  
  2691.  
  2692.  
  2693. Utility.Paint = function() -- Paint function
  2694.  
  2695. surface.SetDrawColor(50, 50, 50 ,255)
  2696.  
  2697. surface.DrawOutlinedRect(0, 0, Utility:GetWide(), Utility:GetTall())
  2698.  
  2699. surface.SetDrawColor(0, 0, 0 ,200)
  2700.  
  2701. surface.DrawRect(0, 0, Utility:GetWide(), Utility:GetTall())
  2702.  
  2703. end
  2704.  
  2705.  
  2706.  
  2707. local Botsettings = vgui.Create( "DPanel" )
  2708.  
  2709. Botsettings:SetPos( 0, 0 )
  2710.  
  2711. Botsettings:SetSize( 480, AceMenu:GetTall() - 40 )
  2712.  
  2713.  
  2714.  
  2715. Botsettings.Paint = function() -- Paint function
  2716.  
  2717. surface.SetDrawColor(50, 50, 50 ,255)
  2718.  
  2719. surface.DrawOutlinedRect(0, 0, Botsettings:GetWide(), Botsettings:GetTall())
  2720.  
  2721. surface.SetDrawColor(0, 0, 0 ,200)
  2722.  
  2723. surface.DrawRect(0, 0, Botsettings:GetWide(), Botsettings:GetTall())
  2724.  
  2725. end
  2726.  
  2727.  
  2728.  
  2729. local Debug = vgui.Create( "DPanel" )
  2730.  
  2731. Debug:SetPos( 0, 0 )
  2732.  
  2733. Debug:SetSize( 480, AceMenu:GetTall() - 40 )
  2734.  
  2735.  
  2736.  
  2737. Debug.Paint = function() -- Paint function
  2738.  
  2739. surface.SetDrawColor(50, 50, 50 ,255)
  2740.  
  2741. surface.DrawOutlinedRect(0, 0, Debug:GetWide(), Debug:GetTall())
  2742.  
  2743. surface.SetDrawColor(0, 0, 0 ,200)
  2744.  
  2745. surface.DrawRect(0, 0, Debug:GetWide(), Debug:GetTall())
  2746.  
  2747. if AB.MemoryDebug then
  2748.  
  2749. draw.DrawText( "Visuals Memory Usage: "..AB.MemoryDebug["hud"].."kb", "Default", 10, 530, Color(255,255,255) )
  2750.  
  2751. draw.DrawText( "Logic Core Memory Usage: "..AB.MemoryDebug["logic"].."kb", "Default", 10, 545, Color(255,255,255) )
  2752.  
  2753. draw.DrawText( "Aimbot Core Memory Usage: "..AB.MemoryDebug["aimbot"].."kb", "Default", 10, 560, Color(255,255,255) )
  2754.  
  2755. surface.SetDrawColor(100, 100, 200 ,255)
  2756.  
  2757. surface.DrawRect(250, 532, math.Clamp( AB.MemoryDebug["hud"] * 0.75, 0, 200), 10 )
  2758.  
  2759. surface.DrawRect(250, 547, math.Clamp( AB.MemoryDebug["logic"] * 20, 0, 200), 10 )
  2760.  
  2761. surface.DrawRect(250, 562, math.Clamp( AB.MemoryDebug["aimbot"] * 20, 0, 200), 10 )
  2762.  
  2763. surface.SetDrawColor(150, 150, 250 ,255)
  2764.  
  2765. surface.DrawOutlinedRect(250, 532, 200, 10 )
  2766.  
  2767. surface.DrawOutlinedRect(250, 547, 200, 10 )
  2768.  
  2769. surface.DrawOutlinedRect(250, 562, 200, 10 )
  2770.  
  2771. end
  2772.  
  2773. end
  2774.  
  2775.  
  2776.  
  2777.  
  2778.  
  2779. --------------------------------------------Buttons-------------------------------------------
  2780.  
  2781.  
  2782.  
  2783.  
  2784.  
  2785. function AB.RefreshConsole()
  2786.  
  2787. if richtext then richtext:Remove() end
  2788.  
  2789. if !ValidPanel(Debug) then return end
  2790.  
  2791. richtext = vgui.Create( "RichText", Debug )
  2792.  
  2793. richtext:SetPos(5, 5)
  2794.  
  2795. richtext:SetSize( 440, AceMenu:GetTall() - 180 )
  2796.  
  2797.  
  2798.  
  2799. for idx, tab in pairs(AB.Debug) do
  2800.  
  2801. richtext:InsertColorChange( tab[2].r, tab[2].g, tab[2].b, 255 )
  2802.  
  2803. richtext:AppendText( tab[1].."\n" )
  2804.  
  2805. end
  2806.  
  2807. end
  2808.  
  2809.  
  2810.  
  2811. timer.Create("ab_refreshconsole", 1, 0, function() AB.RefreshConsole() end)
  2812.  
  2813.  
  2814.  
  2815.  
  2816.  
  2817. AB.MakeToggleButton( General, 5, 10, "Vision", "Vision", "Vision Mode")
  2818.  
  2819.  
  2820.  
  2821. AB.MakeSlider( General, 5, 590, 455, "Max Vision Range (Metres)", 0, 2000, "VisionDist" )
  2822.  
  2823.  
  2824.  
  2825. AB.MakeToggleButton( General, 5, 70, "ESP Enabled", "ShowESP", "Show ESP")
  2826.  
  2827. AB.MakeToggleButton( General, 120, 70, "Show Dead Players", "ShowDead", "Show Dead Players")
  2828.  
  2829. AB.MakeToggleButton( General, 235, 70, "Show Friends", "ShowFriends", "Show Friends")
  2830.  
  2831. AB.MakeToggleButton( General, 350, 70, "Radar Colours", "RadarColors", "Coloured players on radar")
  2832.  
  2833. AB.MakeToggleButton( General, 350, 100, "Show Traitors", "ShowTraitors", "Show Traitors (TTT)", "Controls whether the ESP shows known traitors in the TTT gamemode")
  2834.  
  2835. AB.MakeToggleButton( General, 235, 100, "Highlight Targets", "ShowTargets", "Highlight Targets", "Highlights people that are on your targets list")
  2836.  
  2837. AB.MakeToggleButton( General, 120, 100, "Show Admins", "ShowRanks", "Show Admins")
  2838.  
  2839. AB.MakeToggleButton( General, 5, 100, "Show Distance", "ShowDistance", "Show Distance")
  2840.  
  2841. AB.MakeToggleButton( General, 5, 130, "Highlight Props", "ESPProps", "ESP Highlight Props")
  2842.  
  2843. AB.MakeToggleButton( General, 120, 130, "Show Marked Ents", "Entfinder", "ESP Show Marked Ents")
  2844.  
  2845. AB.MakeToggleButton( General, 235, 130, "Show Team Colours", "TeamColors", "Show Team Colours")
  2846.  
  2847. AB.MakeToggleButton( General, 350, 130, "Show Health", "ShowHP", "Show Health")
  2848.  
  2849. AB.MakeToggleButton( General, 5, 490, "Vision Lines", "Vizlines", "Shows which direction players are looking")
  2850.  
  2851. AB.MakeToggleButton( General, 120, 490, "Add Steam Friends", "AutoAddSteamFriends", "Automatically add steam friends to your ESP")
  2852.  
  2853. AB.MakeToggleButton( General, 5, 160, "Show Position", "VSquares", "Show player positions on the esp")
  2854.  
  2855. AB.MakeToggleButton( General, 120, 160, "Show Names", "VNames", "Show player names on the esp")
  2856.  
  2857.  
  2858.  
  2859. AB.MakeToggleButton( General, 5, 190, "Rear Vision Mirror", "Mirror", "Rear Vision Mirror")
  2860.  
  2861.  
  2862.  
  2863. AB.MakeSlider( General, 5, 225, 225, "Mirror X", 0, ScrW(), "MirrorX" )
  2864.  
  2865. AB.MakeSlider( General, 235, 225, 220, "Mirror Y", 0, ScrH(), "MirrorY" )
  2866.  
  2867. AB.MakeSlider( General, 235, 190, 220, "Mirror Size", 0, 60, "MirrorSize" )
  2868.  
  2869. AB.MakeFunctionButton( General, 120, 190, "Mirror Vertical Axis", function()
  2870.  
  2871. if AB.NumberVars.MirrorAxis == 0 then
  2872.  
  2873. if AB.Vars.Notifications then AB.ChatText( "Set mirror axis mode to mimic", Color(255,255,255) ) end
  2874.  
  2875. AB.NumberVars.MirrorAxis = 1
  2876.  
  2877. elseif AB.NumberVars.MirrorAxis == 1 then
  2878.  
  2879. if AB.Vars.Notifications then AB.ChatText( "Set mirror axis mode to reverse", Color(255,255,255) ) end
  2880.  
  2881. AB.NumberVars.MirrorAxis = 2
  2882.  
  2883. else
  2884.  
  2885. if AB.Vars.Notifications then AB.ChatText( "Set mirror axis mode to none", Color(255,255,255) ) end
  2886.  
  2887. AB.NumberVars.MirrorAxis = 0
  2888.  
  2889. end
  2890.  
  2891. end)
  2892.  
  2893.  
  2894.  
  2895. AB.MakeFunctionButton( General, 5, 260, "Toggle Freecam", function()
  2896.  
  2897. AB.Freecam = !AB.Freecam
  2898.  
  2899. AB.ChatText( "Set freecam mode to: "..tostring(AB.Freecam), Color(255,255,255) )
  2900.  
  2901. end, "Hijacks the rear vision mirror and turns it into a ghetto freecam system")
  2902.  
  2903. AB.MakeFunctionButton( General, 120, 260, "Bring Freecam Here", function()
  2904.  
  2905. AB.FreecamCoordinates.pos = LocalPlayer():EyePos()
  2906.  
  2907. AB.FreecamCoordinates.ang = LocalPlayer():EyeAngles()
  2908.  
  2909. AB.ChatText( "Brought freecam to my eye pos", Color(255,255,255) )
  2910.  
  2911. end, "Snaps the freecam to your view position")
  2912.  
  2913. AB.MakeToggleButton( General, 120, 290, "Freecam Is Movable", "FreecamControls", "Freecam controls active")
  2914.  
  2915.  
  2916.  
  2917.  
  2918.  
  2919. AB.MakeKeyBinder(General, 400, 260, 50, 20, "FreecamForward", "freecam move forward" )
  2920.  
  2921. AB.MakeKeyBinder(General, 400, 290, 50, 20, "FreecamBack", "freecam move backwards" )
  2922.  
  2923. AB.MakeKeyBinder(General, 235, 275, 50, 20, "FreecamLeft", "freecam turn left" )
  2924.  
  2925. AB.MakeKeyBinder(General, 345, 275, 50, 20, "FreecamRight", "freecam turn right" )
  2926.  
  2927. AB.MakeKeyBinder(General, 290, 260, 50, 20, "FreecamUp", "freecam pitch up" )
  2928.  
  2929. AB.MakeKeyBinder(General, 290, 290, 50, 20, "FreecamDown", "freecam pitch down" )
  2930.  
  2931.  
  2932.  
  2933. AB.MakeToggleButton( General, 5, 320, "Player Radar", "Radar", "Player Radar")
  2934.  
  2935. AB.MakeSlider( General, 120, 320, 165, "Radar Size", 50, 600, "RadarSize" )
  2936.  
  2937. AB.MakeSlider( General, 290, 320, 165, "Radar Zoom", 10, 150, "RadarZoom" )
  2938.  
  2939. AB.MakeSlider( General, 5, 350, 145, "Radar X", 0, ScrW(), "RadarX" )
  2940.  
  2941. AB.MakeSlider( General, 155, 350, 145, "Radar Y", 0, ScrH(), "RadarY" )
  2942.  
  2943. AB.MakeSlider( General, 305, 350, 150, "Rad Alpha", 0, 255, "RadarAlpha" )
  2944.  
  2945.  
  2946.  
  2947. AB.MakeToggleButton( General, 5, 390, "Xray Enabled", "Xray", "X-Ray")
  2948.  
  2949. AB.MakeToggleButton( General, 120, 390, "Xray Players", "XrayPlayers", "Show players on X-Ray")
  2950.  
  2951. AB.MakeToggleButton( General, 235, 390, "Xray Props", "XrayProps", "Show props on X-Ray")
  2952.  
  2953. AB.MakeToggleButton( General, 350, 390, "Xray Marked Ents", "XrayEntfinder", "Show marked entities on X-Ray")
  2954.  
  2955. AB.MakeToggleButton( General, 5, 420, "Xray Solid Chams", "XraySolid", "X-Ray Solid Chams")
  2956.  
  2957. AB.MakeSlider( General, 5, 450, 465, "Xray Maximum Distance (metres)", 0, 2000, "XrayDistance" )
  2958.  
  2959. AB.MakeToggleButton( General, 120, 420, "Xray Colours", "NoChamColours", "Xray Colours")
  2960.  
  2961. AB.MakeToggleButton( General, 235, 420, "Xray Bright Colours", "PKChams", "Xray Bright Chams")
  2962.  
  2963.  
  2964.  
  2965.  
  2966.  
  2967. AB.MakeToggleButton( Utility, 5, 480, "Witness Detector", "WitnessDetector", "Witness Detector")
  2968.  
  2969. AB.MakeToggleButton( Utility, 120, 480, "Spectator Detector", "SpectatorDetector", "Spectator Detector")
  2970.  
  2971. AB.MakeToggleButton( General, 120, 550, "Crosshair", "Crosshair", "Crosshair")
  2972.  
  2973. AB.MakeToggleButton( General, 235, 490, "Draw 3D BBox", "BoundingBox3d", "3D Bounding Boxes on Players")
  2974.  
  2975. AB.MakeFunctionButton( General, 235, 550, "Wraith Vision", function() AB.ToggleWraithVision() end)
  2976.  
  2977. AB.MakeToggleButton( General, 120, 520, "PK Player Beams", "PKPlayerBeams", "Propkill Playertrace Beams")
  2978.  
  2979. AB.MakeToggleButton( General, 235, 520, "PK Prop Beams", "PKPropBeams", "Propkill Proptrace Beams")
  2980.  
  2981. AB.MakeToggleButton( General, 350, 520, "PK Vertical Beams", "PKVerticalBeams", "Propkill Vertical Beams")
  2982.  
  2983. AB.MakeToggleButton( General, 5, 550, "PK Show Velocity", "PKVelocity", "Propkill Velocity Leaders")
  2984.  
  2985. AB.MakeToggleButton( General, 350, 550, "Clientside Flashlight", "CSFlashlight", "Clientside Flashlight")
  2986.  
  2987.  
  2988.  
  2989. AB.MakeFunctionButton( General, 350, 10, "Players Menu", function() AB.PlayerMenu() end)
  2990.  
  2991. AB.MakeFunctionButton( General, 120, 10, "Cycle Color Scheme", function()
  2992.  
  2993. if AB.NumberVars.ColorScheme < #AB.DefaultSchemes then
  2994.  
  2995. AB.NumberVars.ColorScheme = AB.NumberVars.ColorScheme + 1
  2996.  
  2997. else
  2998.  
  2999. AB.NumberVars.ColorScheme = 1
  3000.  
  3001. end
  3002.  
  3003.  
  3004.  
  3005. AB.ChangeColorScheme( AB.NumberVars.ColorScheme )
  3006.  
  3007. end)
  3008.  
  3009. AB.MakeFunctionButton( General, 235, 10, "Ent marker menu", AB.EntMarkerMenu )
  3010.  
  3011.  
  3012.  
  3013. AB.MakeToggleButton( Utility, 5, 10, "Autoclick", "Autoclick", "Auto Mouse Click", "Make your mouse buttons fire at the maximum possible speed when holding them down")
  3014.  
  3015. AB.MakeToggleButton( Utility, 120, 10, "Bhop", "Bhop", "Auto Bhop")
  3016.  
  3017. AB.MakeToggleButton( Utility, 235, 10, "Rope-Nado", "RopeStorm", "Rope-Nado", "Right click with rope tool out to spam a fuckton of ropes")
  3018.  
  3019. AB.MakeToggleButton( Utility, 350, 10, "Triggerbot", "Triggerbot", "Triggerbot", "Automatically pull the trigger when you look at somebody")
  3020.  
  3021. AB.MakeToggleButton( Utility, 5, 40, "Third Person", "Thirdperson", "Third Person Camera")
  3022.  
  3023. --AB.MakeToggleButton( Utility, 5, 120, "Camera Spam", "CameraSpam", "Camera Spam")
  3024.  
  3025. AB.MakeToggleButton( Utility, 120, 120, "No Recoil", "NoRecoil", "No Recoil", "Prevents weapons from changing your eye angles")
  3026.  
  3027. AB.MakeToggleButton( Utility, 235, 120, "Flashlight Spam", "FlashlightSpam", "Flashlight Spam", "Press F to party hard")
  3028.  
  3029. AB.MakeSlider( Utility, 120, 40, 160, "TPS Distance", 0, 1000, "TPSDistance" )
  3030.  
  3031. AB.MakeSlider( Utility, 285, 40, 175, "TPS Offset", -100, 100, "TPSOffset" )
  3032.  
  3033.  
  3034.  
  3035. AB.MakeToggleButton( Utility, 5, 90, "Name Changer Script", "NameStealer", "Name Change Script", "Enables or disabled the name change helper script, corrects malfunctions present in odiums name change command")
  3036.  
  3037. AB.MakeFunctionButton( Utility, 350, 90, "Disable NameStealer", AB.NameStealerShutoff )
  3038.  
  3039.  
  3040.  
  3041. AB.MakeFunctionButton( Utility, 5, 150, "Inspect your Gun", AB.GunMenu, "Show a massive TLDR page of information about the gun in your hands" )
  3042.  
  3043. AB.MakeFunctionButton( Utility, 120, 150, "Entity Scanner", AB.ToggleEntityScanner, "Get detailed information and easily perform actions on entities under your cursor (use C menu for best effect)" )
  3044.  
  3045.  
  3046.  
  3047. AB.MakeToggleButton( Utility, 350, 120, "Notify Kills", "NotifyKills", "Notify Kills in Chat", "Prints kills to your chat window")
  3048.  
  3049. --AB.Vars.NotifyKills
  3050.  
  3051.  
  3052.  
  3053. AB.MakeToggleButton( Utility, 5, 210, "Chat Spammer", "ChatSpam", "Chat Spammer", "Spam chat and piss everybody off")
  3054.  
  3055. AB.MakeToggleButton( Utility, 120, 210, "Auto OOC", "ChatSpamOOC", "Auto OOC chatspam", "Automatically make your chat spam in OOC mode in darkrp and most other rp gamemodes")
  3056.  
  3057. AB.MakeToggleButton( Utility, 235, 210, "Bind Mode", "ChatSpamBind", "Bind Mode (L ALT)", "You only chatspam when left alt is pressed")
  3058.  
  3059. --AB.MakeToggleButton( Utility, 350, 210, "Random Insults", "ChatSpamInsult", "Chatspam Random Insults", "Shower randomly generated abuse on everybody")
  3060.  
  3061. AB.MakeToggleButton( Utility, 350, 180, "/PM Mode", "ChatSpamPM", "/PM Spam Mode", "Spams /pm messages to everybody on the server")
  3062.  
  3063. AB.MakeToggleButton( Utility, 350, 210, "/PM Admins", "ChatSpamPMAdmins", "/PM Spam Target Admins", "Should we /pm spam admins?")
  3064.  
  3065.  
  3066.  
  3067. AB.MakeFunctionButton( Utility, 235, 180, "Chatspam Help", function()
  3068.  
  3069. AB.ChatText( "Printed chatspam formatting info to console", Color(255,255,255) )
  3070.  
  3071. print( "---- CHAT SPAMMER PATTERN MATCHES ----" )
  3072.  
  3073. print( "@1 = Random insult" )
  3074.  
  3075. print( "@2 = Angry insult" )
  3076.  
  3077. print( "@3 = Admin insult" )
  3078.  
  3079. print( "@4 = CSGO skid gibberish" )
  3080.  
  3081. print( "@opener = Insult opening line" )
  3082.  
  3083. print( "@joiner = Insult joining line" )
  3084.  
  3085. print( "@slur = Random racist/sexist/fucking hilarious slur" )
  3086.  
  3087. print( "PUT THESE IN THE CHATSPAMMER TEXT FIELD AND THEY WILL BE AUTOMATICALLY FORMATTED INTO RANDOMLY GENERATED TEXT")
  3088.  
  3089. end, "HALP HOW I USE DIS" )
  3090.  
  3091.  
  3092.  
  3093. AB.MakeFunctionButton( Utility, 5, 300, "Dodge RP Admins", AB.InnocentRoleplayer, "You got seen doing something shifty, now its time to get a new identity\nSuicides and randomizes your rpname, job and player colours\nBind a key to ace_innocent_roleplayer to trigger quickly" )
  3094.  
  3095. AB.MakeFunctionButton( Utility, 120, 300, "Random RPname", AB.GenerateRPName, "Like you can be arsed thinking up a good rpname, this one will generate a random one for you" )
  3096.  
  3097. AB.MakeFunctionButton( Utility, 235, 300, "RandomRPname (fem)", AB.GenerateRPNameFemale, "You want to become a girl so you can take cocks up your ass and still call yourself straight" )
  3098.  
  3099. AB.MakeToggleButton( Utility, 5, 330, "RP Demote Spam", "DemoteSpam", "Spam /Demote requests", "Demote everybody on the server from their shitty jobs")
  3100.  
  3101. AB.MakeToggleButton( Utility, 120, 330, "RP Wanted Spam", "WantedSpam", "Spam /Wanted requests", "Make everybody wanted by the police")
  3102.  
  3103. AB.MakeToggleButton( Utility, 235, 330, "ULX Vkick Spam", "ULXVotekickSpam", "Spam ulx votekicks", "Votekick everybody on the server :^)")
  3104.  
  3105. AB.MakeToggleButton( Utility, 350, 330, "ULX Vban Spam", "ULXVotebanSpam", "Spam ulx votebans", "Voteban everybody on the server :^)")
  3106.  
  3107. AB.MakeToggleButton( Utility, 5, 360, "Bhop Auto Strafe", "BhopAutostrafe", "Bhop Auto Strafe", "Presses A and D for you when you move your mouse, you lazy fuck")
  3108.  
  3109. AB.MakeToggleButton( Utility, 120, 360, "Kill Taunts", "KillTaunts", "Kill Taunts", "Let acebot automatically talk smack for you whenever you kill somebody")
  3110.  
  3111. AB.MakeToggleButton( Utility, 235, 360, "Death Taunts", "DeathTaunts", "Death Taunts", "Automatic chat rage when you die")
  3112.  
  3113.  
  3114.  
  3115. AB.MakeFunctionButton( Utility, 5, 450, "Set Base", function() RunConsoleCommand("ace_base_set") end, "Set a home base location to warn you if people go near it" )
  3116.  
  3117. AB.MakeFunctionButton( Utility, 120, 450, "Remove Base", function() RunConsoleCommand("ace_base_remove") end, "Delete your base" )
  3118.  
  3119. AB.MakeToggleButton( Utility, 350, 420, "Keypad Jew", "KeypadJew", "Keypad Code Stealer", "Your a sneaky jew stealing peoples keypad codes and busting into their base")
  3120.  
  3121.  
  3122.  
  3123. AB.MakeToggleButton( Utility, 5, 420, "RP Arrest Dodger", "DodgeArrest", "Get out of jail free card", "Automatically suicide if somebody tries to hit you with an arrest baton")
  3124.  
  3125. AB.MakeToggleButton( Utility, 120, 420, "New RPname on Death", "NewLifeRule", "Choose new RPname when killed", "Make things extra confusing for cuntmins")
  3126.  
  3127. --AB.MakeToggleButton( Utility, 235, 420, "Dodge Physgun", "DontTouchMeThere", "Suicide When PhysGunned", "Don't touch me there, that's my private place")
  3128.  
  3129.  
  3130.  
  3131.  
  3132.  
  3133. AB.MakeToggleButton( Botsettings, 5, 10, "Toggle Aimbot", "Aimbot", "Aimbot", "Sup pussy ass white boi how bout i come to ur base and fuck ur girl u little bitch, imma shoot lazers all up in this place pew pew nigga")
  3134.  
  3135. AB.MakeToggleButton( Botsettings, 120, 10, "Snap on Shoot Only", "SnapOnFire", "Aimbot only snaps when firing", "Makes things a little bit more sneeki breeki")
  3136.  
  3137. AB.MakeToggleButton( Botsettings, 5, 40, "Auto Shoot", "AutoShoot", "Aimbot Auto-Shoot", "Your aimbot is now doing all the work for you, you may as well afk and masturbate")
  3138.  
  3139. AB.MakeToggleButton( Botsettings, 235, 70, "Auto Trigger", "AutoTrigger", "Aimbot Auto-Trigger", "Spams the trigger on semi auto weapons when locked on and holding left click")
  3140.  
  3141. AB.MakeToggleButton( Botsettings, 120, 40, "Snap on Bind Only", "AimbotBindMode", "Aimbot snap only when bind pressed", "Extra protection against accidentally fucking yourself over when trying to play >legit")
  3142.  
  3143. --AB.MakeToggleButton( Botsettings, 235, 40, "Shoot Through Walls", "AimbotShootThroughWalls", "Aimbot shoot through walls", "Target people through walls?")
  3144.  
  3145. AB.MakeToggleButton( Botsettings, 235, 40, "M9K Wallbanger", "AimbotWallbanger", "Aimbot shoot through walls (m9k)", "Lock on to people if the current gun is able to penetrate the wall/object they are hiding behind")
  3146.  
  3147. AB.MakeToggleButton( Botsettings, 235, 10, "Draw Target Position", "PreviewTarget", "Draw Target Lock Position", "Shows the current/next position the aimbot is locking on to")
  3148.  
  3149. AB.MakeToggleButton( Botsettings, 350, 10, "Compensate Spread", "CompSpread", "Compensate Bullet Spread", "Basically cac undetected nospread. Works with m9k, hl2 weps, ttt weps and some simple weapon bases. Does not work with fas2 or cw2")
  3150.  
  3151. AB.MakeToggleButton( Botsettings, 350, 40, "Silent Aim", "SilentAim", "Silent Aim", "Makes it far less obvious that you are aimbotting")
  3152.  
  3153. AB.MakeToggleButton( Botsettings, 350, 70, "Adaptive Targeting", "AimbotAdaptiveTarget", "Aimbot Adaptive Targeting", "Shoot at any part of their body that is exposed, not just their head. Absolute rape when paired with comp spread and wallbanger")
  3154.  
  3155.  
  3156.  
  3157. AB.MakeToggleButton( Botsettings, 5, 160, "Target Friends", "TargetFriends", "Aimbot Target Friends", "Do you really want to betray your buddies like this? :(")
  3158.  
  3159. AB.MakeToggleButton( Botsettings, 120, 160, "Target Admins", "TargetAdmins", "Aimbot Target Admins", "Milk some darkrp admin tears")
  3160.  
  3161. AB.MakeToggleButton( Botsettings, 235, 160, "Target Same Team", "TargetSameTeam", "Aimbot Target Same Team", "Do you want to betray your team?")
  3162.  
  3163. AB.MakeToggleButton( Botsettings, 350, 160, "Target Highlighted", "TargetHighlighted", "Aimbot Target Highlighted targets", "For killing those special high priority targets")
  3164.  
  3165. AB.MakeToggleButton( Botsettings, 120, 190, "Target Noclippers", "TargetNoclippers", "Aimbot Target People in Noclip", "You usually can't kill them anyway so why bother?")
  3166.  
  3167. AB.MakeToggleButton( Botsettings, 5, 190, "Prefer Headshots", "AimbotTargetMode", "Aimbot Target Heads", "Target heads or go straight for centre of mass?")
  3168.  
  3169. AB.MakeToggleButton( Botsettings, 235, 190, "Sticky Targeting", "AimbotStickyLock", "Sticky Targeting", "Aimbot will not switch target until the current target is dead, out of FOV or no longer visible")
  3170.  
  3171. --AB.MakeToggleButton( Botsettings, 5, 190, "Prefer Headshots", "AimbotTargetMode", "Aimbot Target Heads", "Target heads or go straight for centre of mass?")
  3172.  
  3173.  
  3174.  
  3175.  
  3176.  
  3177. local tttt = vgui.Create( "DLabel", Botsettings )
  3178.  
  3179. tttt:SetPos( 25, 228 )
  3180.  
  3181. tttt:SetText( "Aimbot Bind Key:" )
  3182.  
  3183. tttt:SizeToContents()
  3184.  
  3185.  
  3186.  
  3187. AB.MakeKeyBinder( Botsettings, 120, 220, 110, 30, "AimbotBindKey", "aimbot" )
  3188.  
  3189.  
  3190.  
  3191. AB.MakeSlider( Botsettings, 5, 70, 210, "Smooth Aim", 0, 50, "AimbotSmooth" )
  3192.  
  3193. AB.MakeSlider( Botsettings, 5, 100, 210, "Max Distance", 0, 9999, "AimbotDist" )
  3194.  
  3195. AB.MakeSlider( Botsettings, 225, 100, 220, "Targeting FOV", 0.1, 180, "AimbotMaxFOV" )
  3196.  
  3197.  
  3198.  
  3199.  
  3200.  
  3201. local TextEntry = vgui.Create( "DTextEntry", Utility )
  3202.  
  3203. TextEntry:SetPos( 120, 90 )
  3204.  
  3205. TextEntry:SetSize( 195, 25 )
  3206.  
  3207. TextEntry:SetText( AB.NameStealName )
  3208.  
  3209. TextEntry.OnEnter = function( self )
  3210.  
  3211. AB.NameStealName = self:GetValue()
  3212.  
  3213. if AB.Vars.Notifications then AB.ChatText( "Set my name to: "..self:GetValue(), Color(255,255,255) ) end
  3214.  
  3215. end
  3216.  
  3217.  
  3218.  
  3219. local TextEntry = vgui.Create( "DTextEntry", Utility )
  3220.  
  3221. TextEntry:SetPos( 5, 240 )
  3222.  
  3223. TextEntry:SetSize( 450, 25 )
  3224.  
  3225. TextEntry:SetText( AB.ChatSpamText )
  3226.  
  3227. TextEntry.OnEnter = function( self )
  3228.  
  3229. AB.ChatSpamText = self:GetValue()
  3230.  
  3231. if AB.Vars.Notifications then AB.ChatText( "Set my chatspam message to: "..self:GetValue(), Color(255,255,255) ) end
  3232.  
  3233. end
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239. AB.MakeFunctionButton( Debug, 5, AceMenu:GetTall() - 110, "Clear Console", function() table.Empty(AB.Debug) end)
  3240.  
  3241. AB.MakeFunctionButton( Debug, 120, AceMenu:GetTall() - 110, "Print Changelog", function()
  3242.  
  3243. AB.DebugLog( "", Color(0,0,0) )
  3244.  
  3245. AB.DebugLog( "Acebot current version: "..AB.Version, Color(155,255,155) )
  3246.  
  3247. AB.DebugLog( "", Color(0,0,0) )
  3248.  
  3249. local tt = 200
  3250.  
  3251. for k, v in SortedPairs(AB.Changelog, false) do AB.DebugLog( v, Color(tt, tt, tt + 30) ) tt = math.Clamp(tt - 10, 100, 200) end
  3252.  
  3253. end)
  3254.  
  3255. --AB.MakeFunctionButton( Debug, 235, Menu:GetTall() - 110, "Game Event Logging", function() end)
  3256.  
  3257. --AB.MakeFunctionButton( Debug, 350, Menu:GetTall() - 110, "Extensive Logging", function() end)
  3258.  
  3259.  
  3260.  
  3261. PropertySheet:AddSheet( "Vision", General, "icon16/zoom.png", false, false, "ESP/Xray/HUD settings" )
  3262.  
  3263. --PropertySheet:AddSheet( "Vision Advanced", General2, "icon16/zoom_in.png", false, false, "ESP/Xray/HUD settings" )
  3264.  
  3265. PropertySheet:AddSheet( "Utility", Utility, "icon16/wrench.png", false, false, "Tools and utilities" )
  3266.  
  3267. PropertySheet:AddSheet( "Aimbot", Botsettings, "icon16/bomb.png", false, false, "Aimbot settings" )
  3268.  
  3269. PropertySheet:AddSheet( "Exploit", Exploit, "icon16/bug.png", false, false, "Lua Exploit settings" )
  3270.  
  3271. PropertySheet:AddSheet( "Backdoor", Backdoor, "icon16/door_in.png", false, false, "Control panel for the Wraithnet/HTX serverside backdoor" )
  3272.  
  3273. PropertySheet:AddSheet( "Debug", Debug, "icon16/printer.png", false, false, "Acebot debug settings" )
  3274.  
  3275.  
  3276.  
  3277. end
  3278.  
  3279. concommand.Add("ace_menu", AB.Menu)
  3280.  
  3281.  
  3282.  
  3283.  
  3284.  
  3285. ------------------------------------------------------------------------DEBUG CONSOLE SHIT--------------------------------------------------------------------------------------
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293. function AB.DebugLog( str, col )
  3294.  
  3295. table.insert(AB.Debug, {str, col})
  3296.  
  3297. if #AB.Debug > 40 then
  3298.  
  3299. table.remove( AB.Debug, 1 )
  3300.  
  3301. end
  3302.  
  3303. end
  3304.  
  3305.  
  3306.  
  3307. ------------------------------------------------------------------------ENT MARKER MENU--------------------------------------------------------------------------------------
  3308.  
  3309.  
  3310.  
  3311.  
  3312.  
  3313.  
  3314.  
  3315.  
  3316.  
  3317.  
  3318.  
  3319.  
  3320.  
  3321.  
  3322.  
  3323. local OtherEnts = {}
  3324.  
  3325.  
  3326.  
  3327. function AB.EntMarkerMenu()
  3328.  
  3329. if EMenu then return end
  3330.  
  3331.  
  3332.  
  3333. table.Empty(OtherEnts)
  3334.  
  3335. for k,v in pairs(ents.GetAll()) do
  3336.  
  3337. local addToAllEnts = true
  3338.  
  3339.  
  3340.  
  3341. for i,p in pairs(AB.MarkedEnts) do
  3342.  
  3343. if p == v:GetClass() then
  3344.  
  3345. addToAllEnts = false
  3346.  
  3347. end
  3348.  
  3349. end
  3350.  
  3351.  
  3352.  
  3353. for i,p in pairs(OtherEnts) do
  3354.  
  3355. if p == v:GetClass() then
  3356.  
  3357. addToAllEnts = false
  3358.  
  3359. end
  3360.  
  3361. end
  3362.  
  3363.  
  3364.  
  3365. if addToAllEnts then
  3366.  
  3367. table.insert(OtherEnts, v:GetClass())
  3368.  
  3369. end
  3370.  
  3371. end
  3372.  
  3373.  
  3374.  
  3375. local EMenu = vgui.Create("DFrame")
  3376.  
  3377. EMenu:SetSize(500,485)
  3378.  
  3379. EMenu:SetTitle("Entity marker menu")
  3380.  
  3381. EMenu:Center()
  3382.  
  3383. EMenu:MakePopup()
  3384.  
  3385.  
  3386.  
  3387. EMenu.Paint = function()
  3388.  
  3389. surface.SetDrawColor( Color(50, 50, 90, 255) )
  3390.  
  3391. surface.DrawRect( 0, 0, EMenu:GetWide(), EMenu:GetTall() )
  3392.  
  3393. surface.SetDrawColor( Color(155, 155, 155, 255) )
  3394.  
  3395. surface.DrawOutlinedRect( 0, 0, EMenu:GetWide(), EMenu:GetTall() )
  3396.  
  3397. surface.DrawOutlinedRect( 1, 1, EMenu:GetWide() - 2, EMenu:GetTall() - 2 )
  3398.  
  3399. surface.SetDrawColor( Color(0, 0, 0, 200) )
  3400.  
  3401. surface.DrawRect( 10, 25, EMenu:GetWide() - 20, EMenu:GetTall() - 35 )
  3402.  
  3403. end
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409. DermaList = vgui.Create( "DPanelList", EMenu )
  3410.  
  3411. DermaList:SetPos( 25,35 )
  3412.  
  3413. DermaList:SetSize( 500, 400 )
  3414.  
  3415. DermaList:SetSpacing( 75 )
  3416.  
  3417. DermaList:EnableHorizontal( false )
  3418.  
  3419. DermaList:EnableVerticalScrollbar( true )
  3420.  
  3421.  
  3422.  
  3423. local SelectedEnts = vgui.Create("DListView")
  3424.  
  3425. SelectedEnts:SetSize(220, 335)
  3426.  
  3427. SelectedEnts:SetPos(0, 0)
  3428.  
  3429. SelectedEnts:SetMultiSelect(false)
  3430.  
  3431. SelectedEnts:AddColumn("Ents to show")
  3432.  
  3433. for k,v in SortedPairs(AB.MarkedEnts, false) do
  3434.  
  3435. SelectedEnts:AddLine(v)
  3436.  
  3437. end
  3438.  
  3439. SelectedEnts.DoDoubleClick = function(parent, index, list)
  3440.  
  3441. table.remove(AB.MarkedEnts, index)
  3442.  
  3443. EMenu:rebuildlists()
  3444.  
  3445. end
  3446.  
  3447. DermaList:Add(SelectedEnts)
  3448.  
  3449.  
  3450.  
  3451. local AllEnts = vgui.Create("DListView")
  3452.  
  3453. AllEnts:SetSize(220, 335)
  3454.  
  3455. AllEnts:SetPos(230, 0)
  3456.  
  3457. AllEnts:SetMultiSelect(false)
  3458.  
  3459. AllEnts:AddColumn("Ents not to show")
  3460.  
  3461. for k,v in SortedPairs(OtherEnts, false) do
  3462.  
  3463. AllEnts:AddLine(v)
  3464.  
  3465. end
  3466.  
  3467. AllEnts.DoDoubleClick = function(parent, index, panel )
  3468.  
  3469. table.insert(AB.MarkedEnts, OtherEnts[index])
  3470.  
  3471. EMenu:rebuildlists()
  3472.  
  3473. end
  3474.  
  3475. DermaList:Add(AllEnts)
  3476.  
  3477.  
  3478.  
  3479.  
  3480.  
  3481. function EMenu:rebuildlists()
  3482.  
  3483. table.Empty(OtherEnts)
  3484.  
  3485. for k,v in pairs(ents.GetAll()) do
  3486.  
  3487. local addToAllEnts = true
  3488.  
  3489.  
  3490.  
  3491. for i,p in pairs(AB.MarkedEnts) do
  3492.  
  3493. if p == v:GetClass() then
  3494.  
  3495. addToAllEnts = false
  3496.  
  3497. end
  3498.  
  3499. end
  3500.  
  3501.  
  3502.  
  3503. for i,p in pairs(OtherEnts) do
  3504.  
  3505. if p == v:GetClass() then
  3506.  
  3507. addToAllEnts = false
  3508.  
  3509. end
  3510.  
  3511. end
  3512.  
  3513.  
  3514.  
  3515. if addToAllEnts then
  3516.  
  3517. table.insert(OtherEnts, v:GetClass())
  3518.  
  3519. end
  3520.  
  3521. end
  3522.  
  3523.  
  3524.  
  3525. AllEnts:Clear()
  3526.  
  3527. SelectedEnts:Clear()
  3528.  
  3529. for k,v in SortedPairs(OtherEnts, false) do
  3530.  
  3531. AllEnts:AddLine( v )
  3532.  
  3533. end
  3534.  
  3535. for k,v in SortedPairs(AB.MarkedEnts, false) do
  3536.  
  3537. SelectedEnts:AddLine( v )
  3538.  
  3539. end
  3540.  
  3541. end
  3542.  
  3543.  
  3544.  
  3545.  
  3546.  
  3547. AB.MakeFunctionButton( EMenu, 25, 380, "Find all Printers", function()
  3548.  
  3549. for k,v in pairs(ents.GetAll()) do
  3550.  
  3551. if string.find(v:GetClass(), "print") and !table.HasValue(AB.MarkedEnts, v:GetClass()) then
  3552.  
  3553. table.insert(AB.MarkedEnts, v:GetClass())
  3554.  
  3555. end
  3556.  
  3557. end
  3558.  
  3559. EMenu:rebuildlists()
  3560.  
  3561. end, "Finds everything that looks like a money printer")
  3562.  
  3563.  
  3564.  
  3565. AB.MakeFunctionButton( EMenu, 140, 380, "Find all Weapons", function()
  3566.  
  3567. for k,v in pairs(ents.GetAll()) do
  3568.  
  3569. if (string.find(v:GetClass(), "weap") or string.find(v:GetClass(), "fas2") or string.find(v:GetClass(), "m9k")) and !table.HasValue(AB.MarkedEnts, v:GetClass()) then
  3570.  
  3571. table.insert(AB.MarkedEnts, v:GetClass())
  3572.  
  3573. end
  3574.  
  3575. end
  3576.  
  3577. EMenu:rebuildlists()
  3578.  
  3579. end, "Finds everything that looks like a weapon")
  3580.  
  3581.  
  3582.  
  3583. AB.MakeFunctionButton( EMenu, 255, 380, "Find all Vehicles", function()
  3584.  
  3585. for k,v in pairs(ents.GetAll()) do
  3586.  
  3587. if v:IsVehicle() and !table.HasValue(AB.MarkedEnts, v:GetClass()) then
  3588.  
  3589. table.insert(AB.MarkedEnts, v:GetClass())
  3590.  
  3591. end
  3592.  
  3593. end
  3594.  
  3595. EMenu:rebuildlists()
  3596.  
  3597. end, "Finds everything that looks like a vehicle")
  3598.  
  3599.  
  3600.  
  3601. AB.MakeFunctionButton( EMenu, 370, 380, "Find all Loot", function()
  3602.  
  3603. for k,v in pairs(ents.GetAll()) do
  3604.  
  3605. if (string.find(v:GetClass(), "item") or string.find(v:GetClass(), "loot")) and !table.HasValue(AB.MarkedEnts, v:GetClass()) then
  3606.  
  3607. table.insert(AB.MarkedEnts, v:GetClass())
  3608.  
  3609. end
  3610.  
  3611. end
  3612.  
  3613. EMenu:rebuildlists()
  3614.  
  3615. end, "Finds everything that looks like loot items (generally only useful for gmod dayz, after the end etc)")
  3616.  
  3617.  
  3618.  
  3619. AB.MakeFunctionButton( EMenu, 25, 410, "Find all RP Goodies", function()
  3620.  
  3621. for k,v in pairs(ents.GetAll()) do
  3622.  
  3623. if v:GetClass() == "spawned_shipment" or v:GetClass() == "spawned_money" or v:GetClass() == "spawned_weapon" or v:GetClass() == "spawned_ammo" or v:GetClass() == "spawned_food" and !table.HasValue(AB.MarkedEnts, v:GetClass()) then
  3624.  
  3625. table.insert(AB.MarkedEnts, v:GetClass() )
  3626.  
  3627. end
  3628.  
  3629. end
  3630.  
  3631. EMenu:rebuildlists()
  3632.  
  3633. end, "Finds all darkrp goodies (guns, money, shipments etc)")
  3634.  
  3635.  
  3636.  
  3637. AB.MakeFunctionButton( EMenu, 370, 410, "Clear List", function()
  3638.  
  3639. AB.MarkedEnts = {}
  3640.  
  3641. EMenu:rebuildlists()
  3642.  
  3643. end, "Clears the entfinder list")
  3644.  
  3645.  
  3646.  
  3647. local turd = vgui.Create( "DLabel", EMenu )
  3648.  
  3649. turd:SetPos( 25, 447 )
  3650.  
  3651. turd:SetText( "Search for classes: " )
  3652.  
  3653. turd:SizeToContents()
  3654.  
  3655.  
  3656.  
  3657. local target4 = vgui.Create( "DTextEntry", EMenu )
  3658.  
  3659. target4:SetPos( 125, 442 )
  3660.  
  3661. target4:SetSize( 255, 25 )
  3662.  
  3663. target4:SetText( "" )
  3664.  
  3665. target4.OnChange = function( self )
  3666.  
  3667. local nam = self:GetValue()
  3668.  
  3669. if nam == "" then
  3670.  
  3671. AB.MarkedEnts = {}
  3672.  
  3673. EMenu:rebuildlists()
  3674.  
  3675. return
  3676.  
  3677. end
  3678.  
  3679. local namtab = string.Explode( ", ", nam )
  3680.  
  3681. AB.MarkedEnts = {}
  3682.  
  3683. for _, en in pairs( ents.GetAll() ) do
  3684.  
  3685. for _, s in pairs( namtab ) do
  3686.  
  3687. if string.find( string.lower( en:GetClass() ), s, 1, true ) then
  3688.  
  3689. if !table.HasValue( AB.MarkedEnts, en:GetClass() ) then table.insert( AB.MarkedEnts, en:GetClass() ) end
  3690.  
  3691. end
  3692.  
  3693. end
  3694.  
  3695. end
  3696.  
  3697. EMenu:rebuildlists()
  3698.  
  3699. end
  3700.  
  3701.  
  3702.  
  3703. end
  3704.  
  3705. concommand.Add("ace_ents", AB.EntMarkerMenu)
  3706.  
  3707.  
  3708.  
  3709.  
  3710.  
  3711.  
  3712.  
  3713. ------------------------------------------------------------------------PLAYERS MENU--------------------------------------------------------------------------------------
  3714.  
  3715.  
  3716.  
  3717.  
  3718.  
  3719. function AB.PlayerMenu()
  3720.  
  3721. if PMenu then return end
  3722.  
  3723.  
  3724.  
  3725. local PMenu = vgui.Create("DFrame")
  3726.  
  3727. PMenu:SetSize(590,420)
  3728.  
  3729. PMenu:SetTitle("Players menu")
  3730.  
  3731. PMenu:Center()
  3732.  
  3733. PMenu:MakePopup()
  3734.  
  3735.  
  3736.  
  3737. PMenu.Paint = function()
  3738.  
  3739. surface.SetDrawColor( Color(50, 50, 90, 255) )
  3740.  
  3741. surface.DrawRect( 0, 0, PMenu:GetWide(), PMenu:GetTall() )
  3742.  
  3743. surface.SetDrawColor( Color(155, 155, 155, 255) )
  3744.  
  3745. surface.DrawOutlinedRect( 0, 0, PMenu:GetWide(), PMenu:GetTall() )
  3746.  
  3747. surface.DrawOutlinedRect( 1, 1, PMenu:GetWide() - 2, PMenu:GetTall() - 2 )
  3748.  
  3749. surface.SetDrawColor( Color(0, 0, 0, 200) )
  3750.  
  3751. surface.DrawRect( 10, 25, PMenu:GetWide() - 20, PMenu:GetTall() - 35 )
  3752.  
  3753. end
  3754.  
  3755.  
  3756.  
  3757.  
  3758.  
  3759. local Plist = vgui.Create( "DPanelList", PMenu )
  3760.  
  3761. Plist:SetSize( 560, 370 )
  3762.  
  3763. Plist:SetPadding( 5 )
  3764.  
  3765. Plist:SetSpacing( 5 )
  3766.  
  3767. Plist:EnableHorizontal( false )
  3768.  
  3769. Plist:EnableVerticalScrollbar( true )
  3770.  
  3771. Plist:SetPos( 10, 25 )
  3772.  
  3773. Plist:SetName( "" )
  3774.  
  3775.  
  3776.  
  3777. for k, v in pairs( player.GetAll() ) do
  3778.  
  3779. if v == LocalPlayer() then continue end
  3780.  
  3781.  
  3782.  
  3783. local plypanel2 = vgui.Create( "DPanel" )
  3784.  
  3785. plypanel2:SetPos( 0, 0 )
  3786.  
  3787. plypanel2:SetSize( 480, 40 )
  3788.  
  3789. plypanel2.Paint = function() -- Paint function
  3790.  
  3791. draw.RoundedBoxEx(8,1,1,plypanel2:GetWide(),plypanel2:GetTall(),Color(0, 0, 0, 150), false, false, false, false)
  3792.  
  3793. surface.SetDrawColor(Color(50, 50, 90, 255))
  3794.  
  3795. surface.DrawOutlinedRect(1, 1, plypanel2:GetWide() - 1 , plypanel2:GetTall() - 1)
  3796.  
  3797. end
  3798.  
  3799.  
  3800.  
  3801. local plyname = vgui.Create( "DLabel", plypanel2 )
  3802.  
  3803. plyname:SetPos( 15, 5 )
  3804.  
  3805. plyname:SetFont( "Trebuchet18" )
  3806.  
  3807. plyname:SetColor( team.GetColor(v:Team()) )
  3808.  
  3809. plyname:SetText( "Name: "..v:Nick() )
  3810.  
  3811. plyname:SetSize(180, 15)
  3812.  
  3813.  
  3814.  
  3815. if AB.GetRank(v) != ( "user" or "guest" or "player" ) then
  3816.  
  3817. local rtxt = vgui.Create( "DLabel", plypanel2 )
  3818.  
  3819. rtxt:SetPos( 15, 20 )
  3820.  
  3821. rtxt:SetFont( "Trebuchet18" )
  3822.  
  3823. rtxt:SetColor( Color(255,100,0,255) )
  3824.  
  3825. rtxt:SetText( "Rank: "..AB.GetRank(v) )
  3826.  
  3827. rtxt:SetSize(180, 15)
  3828.  
  3829. end
  3830.  
  3831.  
  3832.  
  3833. local faggot = vgui.Create("DButton", plypanel2)
  3834.  
  3835. faggot:SetSize( 45, 25 )
  3836.  
  3837. faggot:SetPos( 250, 8 )
  3838.  
  3839. faggot:SetText("Profile")
  3840.  
  3841. faggot:SetTextColor(Color(255, 255, 255, 255))
  3842.  
  3843. faggot.Paint = function(panel, w, h)
  3844.  
  3845. surface.SetDrawColor(100, 100, 200 ,255)
  3846.  
  3847. surface.DrawOutlinedRect(0, 0, w, h)
  3848.  
  3849. surface.SetDrawColor(0, 0, 50 ,155)
  3850.  
  3851. surface.DrawRect(0, 0, w, h)
  3852.  
  3853. end
  3854.  
  3855. faggot.DoClick = function()
  3856.  
  3857. AB.ChatText( "Opened steam profile of: "..v:Nick().." ("..v:SteamID()..")", Color(255,255,255) )
  3858.  
  3859. v:ShowProfile()
  3860.  
  3861. surface.PlaySound("buttons/button7.wav")
  3862.  
  3863. end
  3864.  
  3865.  
  3866.  
  3867. local faggot = vgui.Create("DButton", plypanel2)
  3868.  
  3869. faggot:SetSize( 45, 25 )
  3870.  
  3871. faggot:SetPos( 300, 8 )
  3872.  
  3873. faggot:SetText("Mute")
  3874.  
  3875. faggot:SetTextColor(Color(255, 255, 255, 255))
  3876.  
  3877. faggot.Paint = function(panel, w, h)
  3878.  
  3879. if !v:IsValid() then return end
  3880.  
  3881. if v:IsMuted() then
  3882.  
  3883. surface.SetDrawColor(200, 100, 000 ,255)
  3884.  
  3885. else
  3886.  
  3887. surface.SetDrawColor(100, 100, 200 ,255)
  3888.  
  3889. end
  3890.  
  3891. surface.DrawOutlinedRect(0, 0, w, h)
  3892.  
  3893. surface.SetDrawColor(0, 0, 50 ,155)
  3894.  
  3895. surface.DrawRect(0, 0, w, h)
  3896.  
  3897. end
  3898.  
  3899. faggot.DoClick = function()
  3900.  
  3901. v:SetMuted( !v:IsMuted() )
  3902.  
  3903. if v:IsMuted() then AB.ChatText( "Voice muted: "..v:Nick(), Color(255,255,255) ) else AB.ChatText( "Unmuted: "..v:Nick(), Color(255,255,255) ) end
  3904.  
  3905. surface.PlaySound("buttons/button7.wav")
  3906.  
  3907. end
  3908.  
  3909.  
  3910.  
  3911. local faggot = vgui.Create("DButton", plypanel2)
  3912.  
  3913. faggot:SetSize( 60, 25 )
  3914.  
  3915. faggot:SetPos( 350, 8 )
  3916.  
  3917. faggot:SetText("Namesteal")
  3918.  
  3919. faggot:SetTextColor(Color(255, 255, 255, 255))
  3920.  
  3921. faggot.Paint = function(panel, w, h)
  3922.  
  3923. if AB.NameStealPlayer == v then
  3924.  
  3925. surface.SetDrawColor(100, 200, 100 ,255)
  3926.  
  3927. else
  3928.  
  3929. surface.SetDrawColor(100, 100, 200 ,255)
  3930.  
  3931. end
  3932.  
  3933. surface.DrawOutlinedRect(0, 0, w, h)
  3934.  
  3935. surface.SetDrawColor(0, 0, 50 ,155)
  3936.  
  3937. surface.DrawRect(0, 0, w, h)
  3938.  
  3939. end
  3940.  
  3941. faggot.DoClick = function()
  3942.  
  3943. if AB.NameStealPlayer == v then AB.NameStealPlayer = LocalPlayer() AB.ChatText( "Cleared name stealer target", Color(255,255,255) ) return end
  3944.  
  3945. AB.NameStealPlayer = v
  3946.  
  3947. AB.ChatText( "Set name stealer target to: "..v:Nick(), Color(255,255,255) )
  3948.  
  3949. surface.PlaySound("buttons/button7.wav")
  3950.  
  3951. end
  3952.  
  3953.  
  3954.  
  3955. local faggot = vgui.Create("DButton", plypanel2)
  3956.  
  3957. faggot:SetSize( 60, 25 )
  3958.  
  3959. faggot:SetPos( 415, 8 )
  3960.  
  3961. faggot:SetText("Highlight")
  3962.  
  3963. faggot:SetTextColor(Color(255, 255, 255, 255))
  3964.  
  3965. faggot.Paint = function(panel, w, h)
  3966.  
  3967. if AB.IsTarget( v ) then
  3968.  
  3969. surface.SetDrawColor(100, 200, 100 ,255)
  3970.  
  3971. else
  3972.  
  3973. surface.SetDrawColor(100, 100, 200 ,255)
  3974.  
  3975. end
  3976.  
  3977. surface.DrawOutlinedRect(0, 0, w, h)
  3978.  
  3979. surface.SetDrawColor(0, 0, 50 ,155)
  3980.  
  3981. surface.DrawRect(0, 0, w, h)
  3982.  
  3983. end
  3984.  
  3985. faggot.DoClick = function()
  3986.  
  3987. if AB.IsTarget( v ) then AB.RemoveTarget(v) else AB.AddTarget(v) end
  3988.  
  3989. surface.PlaySound("buttons/button7.wav")
  3990.  
  3991. end
  3992.  
  3993.  
  3994.  
  3995. local faggot = vgui.Create("DButton", plypanel2)
  3996.  
  3997. faggot:SetSize( 60, 25 )
  3998.  
  3999. faggot:SetPos( 480, 8 )
  4000.  
  4001. faggot:SetText("Friendly")
  4002.  
  4003. faggot:SetTextColor(Color(255, 255, 255, 255))
  4004.  
  4005. faggot.Paint = function(panel, w, h)
  4006.  
  4007. if AB.IsFriend( v ) then
  4008.  
  4009. surface.SetDrawColor(100, 200, 100 ,255)
  4010.  
  4011. else
  4012.  
  4013. surface.SetDrawColor(100, 100, 200 ,255)
  4014.  
  4015. end
  4016.  
  4017. surface.DrawOutlinedRect(0, 0, w, h)
  4018.  
  4019. surface.SetDrawColor(0, 0, 50 ,155)
  4020.  
  4021. surface.DrawRect(0, 0, w, h)
  4022.  
  4023. end
  4024.  
  4025. faggot.DoClick = function()
  4026.  
  4027. if AB.IsFriend( v ) then AB.RemoveFriend(v) else AB.AddFriend(v) end
  4028.  
  4029. surface.PlaySound("buttons/button7.wav")
  4030.  
  4031. end
  4032.  
  4033.  
  4034.  
  4035.  
  4036.  
  4037. Plist:AddItem( plypanel2 )
  4038.  
  4039.  
  4040.  
  4041. end
  4042.  
  4043.  
  4044.  
  4045.  
  4046.  
  4047. end
  4048.  
  4049. concommand.Add("ace_players", AB.PlayerMenu)
  4050.  
  4051.  
  4052.  
  4053.  
  4054.  
  4055.  
  4056.  
  4057.  
  4058.  
  4059.  
  4060.  
  4061.  
  4062.  
  4063.  
  4064.  
  4065. ------------------------------------------------------------------------BIG MEMES----------------------------------------------------------------------------------------
  4066.  
  4067.  
  4068.  
  4069.  
  4070.  
  4071.  
  4072.  
  4073. function AB.IsMessagePooled( netmessage )
  4074.  
  4075. status, error = pcall(net.Start,netmessage)
  4076.  
  4077. return status
  4078.  
  4079. end
  4080.  
  4081.  
  4082.  
  4083.  
  4084.  
  4085.  
  4086.  
  4087.  
  4088.  
  4089. ------------------------------------------------------------------------DANK NOSPREAD----------------------------------------------------------------------------------------
  4090.  
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096.  
  4097. function AB.GetGenericCone( cmd )
  4098.  
  4099. local ply = LocalPlayer()
  4100.  
  4101. local gun = ply:GetActiveWeapon()
  4102.  
  4103. if !gun.Primary or !gun.Primary.Cone then return Angle( 0, 0, 0 ) end
  4104.  
  4105. local meme = gun.Primary.Cone
  4106.  
  4107. local meme2 = Vector( meme, meme, meme )
  4108.  
  4109. local cone = odium.engine.GetWeaponCone( cmd, ply:EyeAngles(), meme2 )
  4110.  
  4111. return cone
  4112.  
  4113. end
  4114.  
  4115.  
  4116.  
  4117. function AB.GetM9kCone( cmd )
  4118.  
  4119. local ply = LocalPlayer()
  4120.  
  4121. local gun = ply:GetActiveWeapon()
  4122.  
  4123. if !gun.Primary or !gun.Primary.Spread or !gun.Primary.IronAccuracy then return Angle( 0, 0, 0 ) end
  4124.  
  4125. local meme = gun.Primary.Spread
  4126.  
  4127. if (gun:GetIronsights() == true) and ply:KeyDown(IN_ATTACK2) then meme = gun.Primary.IronAccuracy end
  4128.  
  4129. local meme2 = Vector( meme, meme, meme )
  4130.  
  4131. local cone = odium.engine.GetWeaponCone( cmd, ply:EyeAngles(), meme2 )
  4132.  
  4133. return cone
  4134.  
  4135. end
  4136.  
  4137.  
  4138.  
  4139.  
  4140.  
  4141. local td = {}
  4142.  
  4143. local function dospread()
  4144.  
  4145. local ply = LocalPlayer()
  4146.  
  4147. local gun = ply:GetActiveWeapon()
  4148.  
  4149. local vel = ply:GetVelocity():Length()
  4150.  
  4151.  
  4152.  
  4153. aim = ply:GetAimVector()
  4154.  
  4155.  
  4156.  
  4157. if not ply.LastView then
  4158.  
  4159. ply.LastView = aim
  4160.  
  4161. ply.ViewAff = 0
  4162.  
  4163. else
  4164.  
  4165. ply.ViewAff = Lerp(0.25, ply.ViewAff, (aim - ply.LastView):Length() * 0.5)
  4166.  
  4167. ply.LastView = aim
  4168.  
  4169. end
  4170.  
  4171.  
  4172.  
  4173. cone = gun.HipCone * (cr and 0.75 or 1) * (gun.dt.Bipod and 0.3 or 1)
  4174.  
  4175.  
  4176.  
  4177. if gun.dt.Status == FAS_STAT_ADS then
  4178.  
  4179. td.start = ply:GetShootPos()
  4180.  
  4181. td.endpos = td.start + aim * 30
  4182.  
  4183. td.filter = ply
  4184.  
  4185.  
  4186.  
  4187. tr = util.TraceLine(td)
  4188.  
  4189.  
  4190.  
  4191. if tr.Hit then
  4192.  
  4193. return Angle(0,0,0)
  4194.  
  4195. else
  4196.  
  4197. cone = gun.AimCone
  4198.  
  4199. end
  4200.  
  4201. end
  4202.  
  4203.  
  4204.  
  4205. return math.Clamp(cone + gun.AddSpread * (gun.dt.Bipod and 0.5 or 1) + (vel / 10000 * gun.VelocitySensitivity) * (gun.dt.Status == FAS_STAT_ADS and 0.25 or 1) + ply.ViewAff, 0, 0.09 + gun.MaxSpreadInc)
  4206.  
  4207.  
  4208.  
  4209. end
  4210.  
  4211.  
  4212.  
  4213.  
  4214.  
  4215. function AB.GetFags2Cone( cmd )
  4216.  
  4217. local ply = LocalPlayer()
  4218.  
  4219. local gun = ply:GetActiveWeapon()
  4220.  
  4221. local newang = ply:GetPunchAngle()
  4222.  
  4223. math.randomseed( CurTime() )
  4224.  
  4225. local cuntcone = gun.CurCone
  4226.  
  4227.  
  4228.  
  4229. -- newang = newang + (Angle(math.Rand(-cuntcone, cuntcone), math.Rand(-cuntcone, cuntcone), 0) )
  4230.  
  4231.  
  4232.  
  4233. return newang
  4234.  
  4235. -- return LocalPlayer():GetPunchAngle()
  4236.  
  4237. end
  4238.  
  4239.  
  4240.  
  4241. --hook.Remove( "EntityFireBullets", "Fags2lmao" )
  4242.  
  4243. /*
  4244.  
  4245. hook.Add( "EntityFireBullets", "Fags2lmao", function( ent, data )
  4246.  
  4247. local me = LocalPlayer()
  4248.  
  4249. local gun = me:GetActiveWeapon()
  4250.  
  4251. local oldang = me:EyeAngles()
  4252.  
  4253. math.randomseed(CurTime())
  4254.  
  4255. local Dir3 = (me:GetPunchAngle() + Angle(math.Rand(-gun.CurCone, gun.CurCone), math.Rand(-gun.CurCone, gun.CurCone), 0) * 25)
  4256.  
  4257. print( "hax"..tostring( me:EyeAngles() - Dir3) )
  4258.  
  4259. -- print( "hax: "..tostring(oldang + -AB.GetFags2Cone( me:GetCurrentCommand() )) )
  4260.  
  4261. -- me:SetEyeAngles( oldang + -AB.GetFags2Cone( me:GetCurrentCommand() ) )
  4262.  
  4263. end)
  4264.  
  4265. */
  4266.  
  4267. local hl2guns = {
  4268.  
  4269. ["weapon_smg1"] = Vector( 0.04362, 0.04362, 0.04362 ),
  4270.  
  4271. ["weapon_ar2"] = Vector( 0.02618, 0.02618, 0.02618 ),
  4272.  
  4273. ["weapon_shotgun"] = Vector( 0.08716, 0.08716, 0.08716 ),
  4274.  
  4275. ["weapon_pistol"] = Vector( 0.00873, 0.00873, 0.00873 ) ,
  4276.  
  4277. }
  4278.  
  4279.  
  4280.  
  4281. function AB.GetHL2Cone( cmd )
  4282.  
  4283. local ply = LocalPlayer()
  4284.  
  4285. local gun = ply:GetActiveWeapon()
  4286.  
  4287. local meme = hl2guns[gun:GetClass()]
  4288.  
  4289. local cone = odium.engine.GetWeaponCone( cmd, ply:EyeAngles(), meme )
  4290.  
  4291. return cone
  4292.  
  4293. end
  4294.  
  4295.  
  4296.  
  4297. function AB.GetCurrentWeaponCone( cmd )
  4298.  
  4299. if !odium or !odium.engine or !odium.engine.GetWeaponCone then
  4300.  
  4301. AB.ChatText( "Odium main module not present or malfunctioning! Compensated spread will not work!", Color(255,100,0) )
  4302.  
  4303. AB.Vars.CompSpread = false
  4304.  
  4305. return Angle( 0, 0, 0 )
  4306.  
  4307. end
  4308.  
  4309. local ply = LocalPlayer()
  4310.  
  4311. local gun = ply:GetActiveWeapon()
  4312.  
  4313. if hl2guns[gun:GetClass()] or gun:GetClass() == "weapon_pistol" then return AB.GetHL2Cone( cmd ) end
  4314.  
  4315. if gun.Primary and gun.Primary.Spread and gun.Primary.IronAccuracy then return AB.GetM9kCone( cmd ) end
  4316.  
  4317. if gun.HipCone then return AB.GetFags2Cone( cmd ) end
  4318.  
  4319. if gun.Primary and gun.Primary.Cone then return AB.GetGenericCone( cmd ) end
  4320.  
  4321. return Angle( 0, 0, 0 )
  4322.  
  4323. end
  4324.  
  4325.  
  4326.  
  4327.  
  4328.  
  4329. local penistration = {
  4330.  
  4331. ["SniperPenetratedRound"] = 20,
  4332.  
  4333. ["pistol"] = 9,
  4334.  
  4335. ["357"] = 12,
  4336.  
  4337. ["smg1"] = 14,
  4338.  
  4339. ["ar2"] = 16,
  4340.  
  4341. ["buckshot"] = 5,
  4342.  
  4343. ["slam"] = 5,
  4344.  
  4345. ["AirboatGun"] = 17,
  4346.  
  4347. }
  4348.  
  4349.  
  4350.  
  4351. function AB.GetM9gayPenetration( ply, gun, tr, testent )
  4352.  
  4353. if !gun.Penetration then return false end
  4354.  
  4355. local ammotyp = gun.Primary.Ammo
  4356.  
  4357. local penindex = 14
  4358.  
  4359. if penistration[ammotyp] then penindex = penistration[ammotyp] end
  4360.  
  4361. if tr.MatType == MAT_METAL and ammotyp != "SniperPenetratedRound" then return false end
  4362.  
  4363. penindex = penindex - 0.05 -- precaution so we don't botch extreme range shots
  4364.  
  4365.  
  4366.  
  4367. local penissize = tr.Normal * penindex
  4368.  
  4369. if (tr.MatType == MAT_GLASS or tr.MatType == MAT_PLASTIC or tr.MatType == MAT_WOOD or tr.MatType == MAT_FLESH or tr.MatType == MAT_ALIENFLESH) then
  4370.  
  4371. penissize = tr.Normal * (penindex * 2)
  4372.  
  4373. end
  4374.  
  4375.  
  4376.  
  4377. local ntrace = {}
  4378.  
  4379. ntrace.endpos = tr.HitPos + tr.Normal * 99999
  4380.  
  4381. ntrace.start = tr.HitPos + penissize
  4382.  
  4383. ntrace.mask = MASK_SHOT
  4384.  
  4385. ntrace.filter = {ply}
  4386.  
  4387. local trace = util.TraceLine(ntrace)
  4388.  
  4389.  
  4390.  
  4391. if trace.StartSolid or ( trace.Entity and trace.Entity != testent ) then return false end
  4392.  
  4393.  
  4394.  
  4395. return true
  4396.  
  4397.  
  4398.  
  4399. end
  4400.  
  4401.  
  4402.  
  4403.  
  4404.  
  4405. function AB.CanWeaponPenetrate( tr, testent )
  4406.  
  4407. local ply = LocalPlayer()
  4408.  
  4409. local gun = ply:GetActiveWeapon()
  4410.  
  4411. if !ply:IsValid() or !gun or !gun:IsValid() then return false end
  4412.  
  4413. if gun.Primary and gun.Primary.Spread and gun.Primary.IronAccuracy then return AB.GetM9gayPenetration( ply, gun, tr, testent ) end
  4414.  
  4415. return false
  4416.  
  4417. end
  4418.  
  4419.  
  4420.  
  4421.  
  4422.  
  4423. function AB.IsBabyGod( ply )
  4424.  
  4425. if !ply:IsValid() or !ply:Alive() or ply:InVehicle() then return false end
  4426.  
  4427. if ply:GetRenderMode() == RENDERMODE_TRANSALPHA and ply:GetColor().a == 100 then
  4428.  
  4429. return true
  4430.  
  4431. else
  4432.  
  4433. return false
  4434.  
  4435. end
  4436.  
  4437. end
  4438.  
  4439.  
  4440.  
  4441.  
  4442.  
  4443. function AB.SetPacketChoke( choke )
  4444.  
  4445. if !odium or !odium.engine then return end
  4446.  
  4447. if choke then
  4448.  
  4449. odium.engine.SetSendPacketEnabled( true )
  4450.  
  4451. odium.engine.SetChokedPacketNum( 0 )
  4452.  
  4453. else
  4454.  
  4455. odium.engine.ResetSendPacket()
  4456.  
  4457. odium.engine.ResetChokedPacketNum()
  4458.  
  4459. end
  4460.  
  4461. end
  4462.  
  4463.  
  4464.  
  4465.  
  4466.  
  4467.  
  4468.  
  4469.  
  4470.  
  4471. /*
  4472.  
  4473. function AB.GetPenetrationStrength( tr ) --heh
  4474.  
  4475. if !AB.CanWeaponPenetrate() then return 0 end
  4476.  
  4477. local ply = LocalPlayer()
  4478.  
  4479. local gun = ply:GetActiveWeapon()
  4480.  
  4481. if !ply:IsValid() or !gun or !gun:IsValid() then return 0 end
  4482.  
  4483. if gun.Primary and gun.Primary.Spread and gun.Primary.IronAccuracy then return AB.GetM9gayPenetration( ply, gun ) end
  4484.  
  4485. return 0
  4486.  
  4487. end
  4488.  
  4489. */
  4490.  
  4491.  
  4492.  
  4493. function AB.FixMove( cmd, safe )
  4494.  
  4495. local move = Vector( cmd:GetForwardMove(), cmd:GetSideMove(), cmd:GetUpMove() )
  4496.  
  4497. local speed = math.sqrt( move.x * move.x + move.y * move.y )
  4498.  
  4499. local mang = move:Angle()
  4500.  
  4501. local yaw = math.rad( cmd:GetViewAngles().y - AB.InternalFakeAngles.y + mang.y )
  4502.  
  4503. cmd:SetForwardMove( (math.cos(yaw) * speed) * 1 )
  4504.  
  4505. cmd:SetSideMove( math.sin(yaw) * speed )
  4506.  
  4507. end
  4508.  
  4509.  
  4510.  
  4511.  
  4512.  
  4513. ------------------------------------------------------------------------AIMBOT FUNCTIONS--------------------------------------------------------------------------------------
  4514.  
  4515.  
  4516.  
  4517.  
  4518.  
  4519.  
  4520.  
  4521. local isfiring = false
  4522.  
  4523. local lastoldang = 0
  4524.  
  4525.  
  4526.  
  4527. function AB.AimbotCore( cmd )
  4528.  
  4529. local ply = LocalPlayer()
  4530.  
  4531.  
  4532.  
  4533. if !AB.Vars.SilentAim then AB.InternalFakeAngles = 0 end
  4534.  
  4535. if lastoldang and isangle( lastoldang ) then
  4536.  
  4537. cmd:SetViewAngles( lastoldang )
  4538.  
  4539. lastoldang = 0
  4540.  
  4541. AB.SetPacketChoke( false )
  4542.  
  4543. end
  4544.  
  4545.  
  4546.  
  4547. if !AB.Vars.Aimbot then
  4548.  
  4549. lastoldang = 0
  4550.  
  4551. AB.AimbotPreviewTarget = -1
  4552.  
  4553. AB.AimbotTarget = game.GetWorld()
  4554.  
  4555. return
  4556.  
  4557. end
  4558.  
  4559.  
  4560.  
  4561. if !AB.Vars.AimbotStickyLock then
  4562.  
  4563. local closestfag = AB.GetClosestToCursor( true )
  4564.  
  4565. if closestfag != AB.AimbotTarget then AB.AimbotTarget = closestfag end
  4566.  
  4567. end
  4568.  
  4569.  
  4570.  
  4571. local atarg = AB.AimbotTarget
  4572.  
  4573. local pozzed = AB.PrepareForAStomping( atarg )
  4574.  
  4575.  
  4576.  
  4577. if isvector( pozzed ) then AB.AimbotPreviewTarget = pozzed end
  4578.  
  4579.  
  4580.  
  4581. -- negate target if they are invalid for whatever reason
  4582.  
  4583. if !atarg:IsValid() or AB.IsDead( atarg ) or !AB.InFOV( atarg ) or !AB.CanTargetPlayer( atarg ) or (AB.ToMetric(ply:GetPos():Distance(atarg:GetPos())) >= AB.NumberVars.AimbotDist) or !isvector( pozzed ) then
  4584.  
  4585. AB.AimbotPreviewTarget = -1
  4586.  
  4587. AB.AimbotTarget = AB.GetClosestToCursor( true )
  4588.  
  4589. AB.InternalFakeAngles = 0
  4590.  
  4591. return
  4592.  
  4593. end
  4594.  
  4595.  
  4596.  
  4597. -- snap only on fire option
  4598.  
  4599. if AB.Vars.SnapOnFire and !input.IsMouseDown(MOUSE_LEFT) or !ply:GetActiveWeapon() or !ply:GetActiveWeapon():IsValid() or !AB.CanBotShoot( ply:GetActiveWeapon() ) then
  4600.  
  4601. -- AB.AimbotTarget = game.GetWorld()
  4602.  
  4603. targetlerp = LocalPlayer():EyeAngles()
  4604.  
  4605. return
  4606.  
  4607. end
  4608.  
  4609.  
  4610.  
  4611. -- keybind mode
  4612.  
  4613. if AB.Vars.AimbotBindMode then
  4614.  
  4615. local khn = AB.NumberVars.AimbotBindKey
  4616.  
  4617. if not ( input.IsKeyDown( khn ) or input.IsMouseDown( khn ) ) then
  4618.  
  4619. -- AB.AimbotTarget = game.GetWorld()
  4620.  
  4621. targetlerp = LocalPlayer():EyeAngles()
  4622.  
  4623. return
  4624.  
  4625. end
  4626.  
  4627. end
  4628.  
  4629.  
  4630.  
  4631. -- cap a motherfucker
  4632.  
  4633. AB.AimbotPreviewTarget = pozzed
  4634.  
  4635. local aids = pozzed - ply:GetShootPos()
  4636.  
  4637. aids = aids:Angle()
  4638.  
  4639. aids:Normalize()
  4640.  
  4641. -- if AB.NumberVars.AimbotSmooth > 0 then
  4642.  
  4643. -- targetlerp = LerpAngle(FrameTime() * ((51 - AB.NumberVars.AimbotSmooth) / 5), targetlerp, aids)
  4644.  
  4645. -- aids = targetlerp
  4646.  
  4647. -- end
  4648.  
  4649.  
  4650.  
  4651. if AB.Vars.CompSpread then
  4652.  
  4653. local cone = AB.GetCurrentWeaponCone( cmd )
  4654.  
  4655. aids = aids + -cone
  4656.  
  4657. end
  4658.  
  4659.  
  4660.  
  4661. aids = Angle( aids.p, aids.y, 0 )
  4662.  
  4663. if AB.Vars.SilentAim then
  4664.  
  4665. AB.SetPacketChoke( true )
  4666.  
  4667. lastoldang = cmd:GetViewAngles() + Angle( cmd:GetMouseY() * 0.02, -cmd:GetMouseX() * 0.015, 0 )
  4668.  
  4669. AB.InternalFakeAngles = lastoldang
  4670.  
  4671. end
  4672.  
  4673. cmd:SetViewAngles(aids)
  4674.  
  4675. if AB.Vars.SilentAim then AB.FixMove( cmd, true ) end
  4676.  
  4677.  
  4678.  
  4679. if AB.Vars.AutoShoot then
  4680.  
  4681. if( !isfiring ) then
  4682.  
  4683. cmd:SetButtons( bit.bor( cmd:GetButtons(), IN_ATTACK ) )
  4684.  
  4685. isfiring = true
  4686.  
  4687. else
  4688.  
  4689. cmd:SetButtons( bit.band( cmd:GetButtons(), bit.bnot( IN_ATTACK ) ) )
  4690.  
  4691. isfiring = false
  4692.  
  4693. end
  4694.  
  4695. end
  4696.  
  4697.  
  4698.  
  4699. if AB.Vars.AutoTrigger then
  4700.  
  4701. if ply:KeyDown(IN_ATTACK) then cmd:RemoveKey(IN_ATTACK) end
  4702.  
  4703. end
  4704.  
  4705.  
  4706.  
  4707. end
  4708.  
  4709.  
  4710.  
  4711.  
  4712.  
  4713. AB.BHopBuffer = {}
  4714.  
  4715. AB.BHopCount1 = 0
  4716.  
  4717. AB.BHopCount2 = 0
  4718.  
  4719. AB.StoredOnGround = false
  4720.  
  4721. AB.StoredInJump = false
  4722.  
  4723.  
  4724.  
  4725. function AB.ResetCounters()
  4726.  
  4727. AB.BHopCount1 = 0
  4728.  
  4729. AB.BHopCount2 = 0
  4730.  
  4731. for i = #AB.BHopBuffer, 1, -1 do
  4732.  
  4733. AB.BHopBuffer[i] = nil
  4734.  
  4735. end
  4736.  
  4737. end
  4738.  
  4739.  
  4740.  
  4741.  
  4742.  
  4743.  
  4744.  
  4745.  
  4746.  
  4747. local vw = Angle( 0, 0, 0 )
  4748.  
  4749. local targetlerp = Angle( 0, 0, 0)
  4750.  
  4751. local nxtangle = false
  4752.  
  4753. function AB.CreateMove( cmd )
  4754.  
  4755.  
  4756.  
  4757. local ply = LocalPlayer()
  4758.  
  4759. if !ply:IsValid() then return end
  4760.  
  4761.  
  4762.  
  4763. local amemfootprint = gcinfo()
  4764.  
  4765.  
  4766.  
  4767.  
  4768.  
  4769. if( AB.Vars.Autoclick and !AB.Vars.RopeStorm) then
  4770.  
  4771. if ply:KeyDown(IN_ATTACK2) then cmd:RemoveKey(IN_ATTACK2) end
  4772.  
  4773. if ply:KeyDown(IN_ATTACK) then cmd:RemoveKey(IN_ATTACK) end
  4774.  
  4775. end
  4776.  
  4777.  
  4778.  
  4779. if( AB.Vars.Bhop) then
  4780.  
  4781. if AB.Vars.BhopAutostrafe and !ply:IsFlagSet( FL_ONGROUND ) and ply:GetMoveType() != MOVETYPE_NOCLIP then
  4782.  
  4783. if cmd:GetMouseX() < 0 then
  4784.  
  4785. cmd:SetSideMove(-1000000)
  4786.  
  4787. end
  4788.  
  4789. if cmd:GetMouseX() > 0 then
  4790.  
  4791. cmd:SetSideMove(1000000)
  4792.  
  4793. end
  4794.  
  4795. end
  4796.  
  4797.  
  4798.  
  4799.  
  4800.  
  4801. ////////////////////////// credit goes to invalid/kilgrave for this UD bhop ///////////////////////////
  4802.  
  4803.  
  4804.  
  4805.  
  4806.  
  4807.  
  4808.  
  4809. if AB.BHopCount1 < 13 then
  4810.  
  4811. if(cmd:KeyDown(2) && !ply:IsOnGround()) then
  4812.  
  4813. cmd:SetButtons( bit.band( cmd:GetButtons(), bit.bnot( 2 ) ) );
  4814.  
  4815. end
  4816.  
  4817. elseif(cmd:KeyDown(IN_JUMP)) then
  4818.  
  4819. cmd:SetButtons( bit.band( cmd:GetButtons(), bit.bnot( 2 ) ) );
  4820.  
  4821. end
  4822.  
  4823.  
  4824.  
  4825. local lastOnGround = AB.StoredOnGround
  4826.  
  4827. local lastInJump = AB.StoredInJump
  4828.  
  4829.  
  4830.  
  4831. local onGround = ply:IsOnGround()
  4832.  
  4833. local inJump = cmd:KeyDown (IN_JUMP)
  4834.  
  4835.  
  4836.  
  4837. if lastOnGround and !onGround then
  4838.  
  4839. AB.BHopCount2 = 0
  4840.  
  4841. elseif !lastOnGround and onGround then
  4842.  
  4843. if !lastInJump and inJump then
  4844.  
  4845. AB.BHopCount1 = AB.BHopCount1 + 1
  4846.  
  4847. -- ply:ChatPrint(AB.BHopCount1)
  4848.  
  4849. if AB.BHopCount1 == 14 then
  4850.  
  4851. local a, b, c = 0, 0, 0
  4852.  
  4853. for i = 1, #AB.BHopBuffer do
  4854.  
  4855. local x = AB.BHopBuffer [i]
  4856.  
  4857. a = a + 1
  4858.  
  4859. b = b + x
  4860.  
  4861. c = c + x * x
  4862.  
  4863. end
  4864.  
  4865.  
  4866.  
  4867. if (c - b * b / a) / a < 0.1 then
  4868.  
  4869. -- ply:ChatPrint("Detected")
  4870.  
  4871. AB.ChatText( "Whoops, your bhope abuse may have been detected! The protection system is good but not perfect I'm sorry to say", Color(255,205,205) )
  4872.  
  4873. end
  4874.  
  4875. end
  4876.  
  4877. else
  4878.  
  4879. AB.ResetCounters()
  4880.  
  4881. end
  4882.  
  4883. elseif onGround then
  4884.  
  4885. if lastInJump != inJump then
  4886.  
  4887. AB.ResetCounters()
  4888.  
  4889. end
  4890.  
  4891. end
  4892.  
  4893.  
  4894.  
  4895. if !onGround and
  4896.  
  4897. lastInJump and not inJump and
  4898.  
  4899. AB.BHopCount2 >= 0 then
  4900.  
  4901. AB.BHopBuffer[#AB.BHopBuffer + 1] = AB.BHopCount2
  4902.  
  4903. AB.BHopCount2 = -math.huge
  4904.  
  4905. end
  4906.  
  4907.  
  4908.  
  4909. AB.BHopCount2 = AB.BHopCount2 + 1
  4910.  
  4911.  
  4912.  
  4913. AB.StoredOnGround = onGround
  4914.  
  4915. AB.StoredInJump = nJump
  4916.  
  4917.  
  4918.  
  4919. ////////////////////////// old and gay ///////////////////////////
  4920.  
  4921.  
  4922.  
  4923. /*
  4924.  
  4925. if !ply:IsFlagSet( FL_ONGROUND ) and ply:GetMoveType() != MOVETYPE_NOCLIP then
  4926.  
  4927. cmd:SetButtons( bit.band( cmd:GetButtons(), bit.bnot( IN_JUMP ) ) )
  4928.  
  4929. end
  4930.  
  4931. */
  4932.  
  4933. end
  4934.  
  4935.  
  4936.  
  4937.  
  4938.  
  4939. if AB.Vars.Triggerbot and ply:Alive() and ply:GetActiveWeapon() and ply:GetActiveWeapon():IsValid() and AB.CanBotShoot( ply:GetActiveWeapon() ) then
  4940.  
  4941. local td = {start = ply:GetShootPos(), endpos = ply:GetShootPos() + ply:EyeAngles():Forward() * 65535, filter = ply, mask = MASK_SHOT}
  4942.  
  4943. local tr = util.TraceLine(td)
  4944.  
  4945.  
  4946.  
  4947. if (tr.Entity:IsPlayer() and AB.CanTargetPlayer( tr.Entity ) ) or tr.Entity:IsNPC() or tr.Entity.Type == "nextbot" then
  4948.  
  4949. if( !isfiring ) then
  4950.  
  4951. cmd:SetButtons( bit.bor( cmd:GetButtons(), IN_ATTACK ) )
  4952.  
  4953. isfiring = true
  4954.  
  4955. else
  4956.  
  4957. cmd:SetButtons( bit.band( cmd:GetButtons(), bit.bnot( IN_ATTACK ) ) )
  4958.  
  4959. isfiring = false
  4960.  
  4961. end
  4962.  
  4963. end
  4964.  
  4965.  
  4966.  
  4967. end
  4968.  
  4969.  
  4970.  
  4971. if AB.ScrollDelta != 0 then cmd:SetMouseWheel( AB.ScrollDelta ) end
  4972.  
  4973.  
  4974.  
  4975. if( AB.Vars.RopeStorm and ply:KeyDown(IN_ATTACK2)) then
  4976.  
  4977. local aids = Angle(math.random(-90, 90), math.random(-180, 180), 0)
  4978.  
  4979. aids:Normalize()
  4980.  
  4981. cmd:SetViewAngles(aids)
  4982.  
  4983. if ply:KeyDown(IN_ATTACK2) then cmd:RemoveKey(IN_ATTACK2) end
  4984.  
  4985. end
  4986.  
  4987.  
  4988.  
  4989.  
  4990.  
  4991.  
  4992.  
  4993. if AB.Vars.FreecamControls then
  4994.  
  4995. local khn = AB.NumberVars.FreecamForward
  4996.  
  4997. if ( input.IsKeyDown( khn ) or input.IsMouseDown( khn ) ) then AB.FreecamCoordinates.pos = AB.FreecamCoordinates.pos + AB.FreecamCoordinates.ang:Forward() * 7 end
  4998.  
  4999. local khn = AB.NumberVars.FreecamBack
  5000.  
  5001. if ( input.IsKeyDown( khn ) or input.IsMouseDown( khn ) ) then AB.FreecamCoordinates.pos = AB.FreecamCoordinates.pos - AB.FreecamCoordinates.ang:Forward() * 7 end
  5002.  
  5003. local khn = AB.NumberVars.FreecamLeft
  5004.  
  5005. if ( input.IsKeyDown( khn ) or input.IsMouseDown( khn ) ) then AB.FreecamCoordinates.ang.y = AB.FreecamCoordinates.ang.y + 1 end
  5006.  
  5007. local khn = AB.NumberVars.FreecamRight
  5008.  
  5009. if ( input.IsKeyDown( khn ) or input.IsMouseDown( khn ) ) then AB.FreecamCoordinates.ang.y = AB.FreecamCoordinates.ang.y - 1 end
  5010.  
  5011. local khn = AB.NumberVars.FreecamUp
  5012.  
  5013. if ( input.IsKeyDown( khn ) or input.IsMouseDown( khn ) ) then AB.FreecamCoordinates.ang.p = AB.FreecamCoordinates.ang.p - 0.75 end
  5014.  
  5015. local khn = AB.NumberVars.FreecamDown
  5016.  
  5017. if ( input.IsKeyDown( khn ) or input.IsMouseDown( khn ) ) then AB.FreecamCoordinates.ang.p = AB.FreecamCoordinates.ang.p + 0.75 end
  5018.  
  5019. end
  5020.  
  5021.  
  5022.  
  5023. AB.AimbotCore( cmd )
  5024.  
  5025.  
  5026.  
  5027. AB.MemoryDebug["aimbot"] = gcinfo() - amemfootprint
  5028.  
  5029.  
  5030.  
  5031. end
  5032.  
  5033. hook.Add( "CreateMove", "cmove", AB.CreateMove )
  5034.  
  5035.  
  5036.  
  5037.  
  5038.  
  5039. local xraytrans = Color(255, 255, 255, 101)
  5040.  
  5041.  
  5042.  
  5043. surface.CreateFont( "memes", {
  5044.  
  5045. font = "Trebuchet",
  5046.  
  5047. size = 200,
  5048.  
  5049. weight = 950,
  5050.  
  5051. } )
  5052.  
  5053.  
  5054.  
  5055. local scanmat = Material("particle/particle_ring_blur")
  5056.  
  5057. local leadermat = Material( "particle/particle_ring_wave_additive" )
  5058.  
  5059. local beammat = Material("trails/laser")
  5060.  
  5061.  
  5062.  
  5063. function AB.Vision()
  5064.  
  5065. local me = LocalPlayer()
  5066.  
  5067. if !me:IsValid() then return end
  5068.  
  5069.  
  5070.  
  5071. local memfootprint = gcinfo()
  5072.  
  5073. /*
  5074.  
  5075. for i = 0, ScrH(), 200 do
  5076.  
  5077. for w = 0, ScrW(), 200 do
  5078.  
  5079. draw.SimpleTextOutlined( ":^)", "memes", w, i, Color(255,255,255,255), 0, 0, 1, Color(0,0,55,255) )
  5080.  
  5081. end
  5082.  
  5083. end
  5084.  
  5085.  
  5086.  
  5087. draw.SimpleTextOutlined( "IM A HUGE FUCKING FAGGOT", "memes", 200, ScrH() / 2 - 230, Color(255,0,0,255), 0, 0, 1, Color(0,0,55,255) )
  5088.  
  5089. draw.SimpleTextOutlined( "WHO USES LEAKED HACKS", "memes", 260, ScrH() / 2 - 50, Color(255,0,0,255), 0, 0, 1, Color(0,0,55,255) )
  5090.  
  5091. draw.SimpleTextOutlined( "COS IM POOR AND RETARDED", "memes", 180, ScrH() / 2 + 150, Color(255,0,0,255), 0, 0, 1, Color(0,0,55,255) )
  5092.  
  5093. */
  5094.  
  5095.  
  5096.  
  5097. if !AB.Vars.Vision then return end
  5098.  
  5099.  
  5100.  
  5101.  
  5102.  
  5103. if AB.Vars.CSFlashlight then
  5104.  
  5105. local dlight = DynamicLight( me:EntIndex() + 5 )
  5106.  
  5107. if ( dlight ) then
  5108.  
  5109. dlight.pos = me:GetEyeTraceNoCursor().HitPos
  5110.  
  5111. dlight.r = 255
  5112.  
  5113. dlight.g = 255
  5114.  
  5115. dlight.b = 255
  5116.  
  5117. dlight.brightness = 2
  5118.  
  5119. dlight.Decay = 1000
  5120.  
  5121. dlight.Size = 2256
  5122.  
  5123. dlight.DieTime = CurTime() + 0.5
  5124.  
  5125. end
  5126.  
  5127. end
  5128.  
  5129.  
  5130.  
  5131. if AB.Vars.ShowESP then
  5132.  
  5133. -- players
  5134.  
  5135. for k, v in pairs( player.GetAll() ) do
  5136.  
  5137.  
  5138.  
  5139. if AB.ToMetric( me:GetPos():Distance( v:GetPos() ) ) > AB.NumberVars.VisionDist then continue end
  5140.  
  5141. if !AB.OnScreen( v, 50 ) then continue end
  5142.  
  5143.  
  5144.  
  5145. local teamcol, teamcol2
  5146.  
  5147. if AB.Vars.TeamColors then
  5148.  
  5149. teamcol = team.GetColor(v:Team())
  5150.  
  5151. teamcol2 = Color(math.Clamp(teamcol.r - 100, 0, 255), math.Clamp(teamcol.g - 100, 0, 255), math.Clamp(teamcol.b - 100, 0, 255), 255)
  5152.  
  5153. else
  5154.  
  5155. teamcol = AB.DefaultScheme
  5156.  
  5157. teamcol2 = AB.DefaultScheme2
  5158.  
  5159. end
  5160.  
  5161.  
  5162.  
  5163.  
  5164.  
  5165. if v == me then continue end
  5166.  
  5167.  
  5168.  
  5169. local pos = (v:GetPos() + Vector(0, 0, 45)):ToScreen()
  5170.  
  5171. local admintext = AB.GetRank( v )
  5172.  
  5173.  
  5174.  
  5175. if !AB.IsDead( v ) then
  5176.  
  5177. if AB.Vars.VSquares then
  5178.  
  5179. surface.SetDrawColor(teamcol)
  5180.  
  5181. surface.DrawOutlinedRect(pos.x - 10, pos.y - 10, 20, 20)
  5182.  
  5183. surface.SetDrawColor(teamcol2)
  5184.  
  5185. surface.DrawOutlinedRect(pos.x - 8, pos.y - 8, 16, 16)
  5186.  
  5187. surface.SetDrawColor(Color(255,255,255,255))
  5188.  
  5189. surface.DrawRect(pos.x - 2, pos.y - 2, 4, 4)
  5190.  
  5191. end
  5192.  
  5193. if AB.Vars.VNames then draw.SimpleTextOutlined( v:Name(), "DermaDefault", pos.x, pos.y - 30, teamcol, 1, 0, 1, Color(0,0,55,255) ) end
  5194.  
  5195.  
  5196.  
  5197.  
  5198.  
  5199. if AB.Vars.BoundingBox3d then cam.Start3D(EyePos(),EyeAngles()) render.DrawWireframeBox( v:GetPos(), Angle(0,0,0), Vector( -16, -16, 0 ), Vector( 16, 16, 72 ), AB.ColScheme, true ) cam.End3D() end
  5200.  
  5201. -- propkill shit
  5202.  
  5203.  
  5204.  
  5205. render.SetMaterial( beammat )
  5206.  
  5207. if AB.Vars.PKPlayerBeams then
  5208.  
  5209. local vz, ppos = AB.PlayerVisiblePK( me:GetShootPos(), v )
  5210.  
  5211. if vz then
  5212.  
  5213. cam.Start3D(EyePos(),EyeAngles())
  5214.  
  5215. render.DrawBeam( (me:GetShootPos() + Vector(0,0,-5)) + EyeAngles():Forward() * 5, ppos, 5, 0, 1, teamcol )
  5216.  
  5217. cam.End3D()
  5218.  
  5219. end
  5220.  
  5221. end
  5222.  
  5223.  
  5224.  
  5225. if AB.Vars.PKPropBeams then
  5226.  
  5227. if AB.HoldingProp and AB.HoldingProp:IsValid() then
  5228.  
  5229. local src = AB.HoldingProp:LocalToWorld( AB.HoldingProp:OBBCenter() )
  5230.  
  5231. /*
  5232.  
  5233. cam.Start3D(EyePos(),EyeAngles())
  5234.  
  5235. render.StartBeam( 5 )
  5236.  
  5237. for i = 0, 4 do
  5238.  
  5239. local zp = src + (me:GetAimVector() * (i * 200)) + Vector( 0, 0, -(i ^ 3.15))
  5240.  
  5241. render.AddBeam( zp, 150, i, Color( 255, 100, 0) )
  5242.  
  5243. end
  5244.  
  5245. render.EndBeam()
  5246.  
  5247. render.DrawBeam( me:EyePos(), me:EyePos() + me:GetAimVector() * 2000, 50, 0, 1, Color( 255, 100, 0) )
  5248.  
  5249. cam.End3D()
  5250.  
  5251. */
  5252.  
  5253. local vz2, ppos2 = AB.PlayerVisiblePK( src, v )
  5254.  
  5255. if vz2 then
  5256.  
  5257. cam.Start3D(EyePos(),EyeAngles())
  5258.  
  5259. render.DrawBeam( src, ppos2, 50, 0, 1, teamcol2 )
  5260.  
  5261. cam.End3D()
  5262.  
  5263. end
  5264.  
  5265. end
  5266.  
  5267. end
  5268.  
  5269.  
  5270.  
  5271. -- target highlighting
  5272.  
  5273.  
  5274.  
  5275. if AB.Vars.ShowTargets and AB.IsTarget( v ) then
  5276.  
  5277. draw.SimpleTextOutlined( "[TARGETED]", "DermaDefault", math.Clamp(pos.x, 30, ScrW() - 54), math.Clamp(pos.y - 42, 30, ScrH() - 54), Color(255,155,0,255), 1, 0, 1, Color(55,20,0,255) )
  5278.  
  5279. surface.SetDrawColor(Color(255,155,0,255))
  5280.  
  5281. surface.DrawRect( pos.x - 20, pos.y - 15, 4, 30 )
  5282.  
  5283. surface.DrawRect( pos.x + 16, pos.y - 15, 4, 30 )
  5284.  
  5285.  
  5286.  
  5287. surface.DrawRect( pos.x - 30, pos.y - 20, 4, 40 )
  5288.  
  5289. surface.DrawRect( pos.x + 26, pos.y - 20, 4, 40 )
  5290.  
  5291.  
  5292.  
  5293. surface.DrawLine( ScrW() / 2, ScrH(), pos.x, pos.y )
  5294.  
  5295. end
  5296.  
  5297. if AB.Vars.ShowFriends and AB.IsFriend( v ) and !AB.IsTarget( v ) then
  5298.  
  5299. draw.SimpleTextOutlined( "[FRIEND]", "DermaDefault", pos.x, pos.y - 42, Color(0,255,0,255), 1, 0, 1, Color(0,0,55,255) )
  5300.  
  5301. end
  5302.  
  5303. if AB.Vars.ShowRanks and !(admintext == "user" or admintext == "guest" or admintext == "player") then
  5304.  
  5305. draw.SimpleTextOutlined( "["..admintext.."]", "DermaDefault", pos.x, pos.y + 12, Color(255,100,0,255), 1, 0, 1, Color(50,0,0,255) )
  5306.  
  5307. end
  5308.  
  5309. if AB.Vars.ShowTraitors and table.HasValue( AB.Traitors, v ) then
  5310.  
  5311. draw.SimpleTextOutlined( "[TRAITOR]", "DermaDefault", pos.x, pos.y - 56, Color(255,55,0,255), 1, 0, 1, Color(55,10,0,255) )
  5312.  
  5313. end
  5314.  
  5315. if AB.Vars.Vizlines then
  5316.  
  5317. local tr = util.TraceLine ({
  5318.  
  5319. start = v:EyePos(),
  5320.  
  5321. endpos = v:EyePos() + v:GetAimVector() * 5000,
  5322.  
  5323. filter = v,
  5324.  
  5325. mask = MASK_SOLID_BRUSHONLY
  5326.  
  5327. })
  5328.  
  5329. local tp = tr.HitPos:ToScreen()
  5330.  
  5331. local p = v:EyePos():ToScreen()
  5332.  
  5333. surface.DrawLine(p.x, p.y, tp.x, tp.y)
  5334.  
  5335. surface.SetDrawColor(teamcol)
  5336.  
  5337. surface.DrawLine(tp.x - 4, tp.y, tp.x + 4, tp.y)
  5338.  
  5339. surface.DrawLine(tp.x, tp.y - 4, tp.x, tp.y + 4)
  5340.  
  5341. end
  5342.  
  5343.  
  5344.  
  5345. if AB.Vars.ShowDistance then
  5346.  
  5347. draw.SimpleTextOutlined( AB.ToMetric(me:GetPos():Distance(v:GetPos())).."m", "DermaDefault", pos.x, pos.y + 24, teamcol, 1, 0, 1, Color(0,0,55,255) )
  5348.  
  5349. end
  5350.  
  5351. if AB.Vars.ShowHP then
  5352.  
  5353. local colhp = math.Clamp(v:Health() * 3, 0, 255)
  5354.  
  5355. local colcomp = Color(255,colhp,0,255)
  5356.  
  5357. draw.SimpleTextOutlined( tostring(v:Health()).."%", "DermaDefault", pos.x, pos.y + 38, colcomp, 1, 0, 1, Color(0,0,0,255) )
  5358.  
  5359. end
  5360.  
  5361.  
  5362.  
  5363. if AB.Vars.PKVelocity then
  5364.  
  5365. local velpos = ((v:GetPos() + Vector(0, 0, 45)) + v:GetVelocity() * 0.3 ):ToScreen()
  5366.  
  5367. surface.SetDrawColor(teamcol)
  5368.  
  5369. surface.SetMaterial( leadermat )
  5370.  
  5371. surface.DrawTexturedRect(velpos.x - 15, velpos.y - 15, 30, 30)
  5372.  
  5373. surface.SetDrawColor(teamcol2)
  5374.  
  5375. surface.DrawTexturedRect(velpos.x - 10, velpos.y - 10, 20, 20)
  5376.  
  5377. end
  5378.  
  5379.  
  5380.  
  5381. -- the fag is dead, i dunno why i did a second logic block for this, im just retarded i guess
  5382.  
  5383. elseif AB.Vars.ShowDead then
  5384.  
  5385. surface.SetDrawColor(Color(255,255,255,255))
  5386.  
  5387. surface.DrawLine(pos.x - 15, pos.y - 15, pos.x + 15, pos.y + 15)
  5388.  
  5389. surface.DrawLine(pos.x + 15, pos.y - 15, pos.x - 15, pos.y + 15)
  5390.  
  5391. if AB.Vars.VNames then draw.SimpleTextOutlined( v:Name(), "DermaDefault", pos.x, pos.y - 30, teamcol, 1, 0, 1, Color(0,0,55,255) ) end
  5392.  
  5393. if AB.Vars.ShowFriends and AB.IsFriend( v ) then
  5394.  
  5395. draw.SimpleTextOutlined( "[FRIEND]", "DermaDefault", pos.x, pos.y - 42, Color(0,255,0,255), 1, 0, 1, Color(0,0,55,255) )
  5396.  
  5397. end
  5398.  
  5399. if AB.Vars.ShowRanks and !(admintext == "user" or admintext == "guest" or admintext == "player") then
  5400.  
  5401. draw.SimpleTextOutlined( "["..admintext.."]", "DermaDefault", pos.x, pos.y + 12, Color(255,100,0,255), 1, 0, 1, Color(50,0,0,255) )
  5402.  
  5403. end
  5404.  
  5405. if AB.Vars.ShowDistance then
  5406.  
  5407. draw.SimpleTextOutlined( AB.ToMetric(me:GetPos():Distance(v:GetPos())).."m", "DermaDefault", pos.x, pos.y + 24, teamcol, 1, 0, 1, Color(0,0,55,255) )
  5408.  
  5409. end
  5410.  
  5411. end
  5412.  
  5413.  
  5414.  
  5415.  
  5416.  
  5417. end -- end of players loop
  5418.  
  5419.  
  5420.  
  5421. if AB.Vars.ESPProps then
  5422.  
  5423. for k, v in pairs(ents.FindByClass("prop_physics")) do
  5424.  
  5425. if AB.ToMetric( me:GetPos():Distance( v:GetPos() ) ) > AB.NumberVars.VisionDist then continue end
  5426.  
  5427. local pos = (v:LocalToWorld(v:OBBCenter())):ToScreen()
  5428.  
  5429. surface.SetDrawColor(AB.DefaultScheme)
  5430.  
  5431. surface.DrawOutlinedRect(pos.x - 10, pos.y - 10, 20, 20)
  5432.  
  5433. local aligndist = surface.GetTextSize( AB.ToMetric(me:GetPos():Distance(v:GetPos())).."m" )
  5434.  
  5435. draw.SimpleTextOutlined( AB.ToMetric(me:GetPos():Distance(v:GetPos())).."m", "DermaDefault", pos.x - (aligndist / 2), pos.y + 12, AB.DefaultScheme, 0, 0, 1, Color(0,0,55,255) )
  5436.  
  5437. end
  5438.  
  5439. end
  5440.  
  5441.  
  5442.  
  5443.  
  5444.  
  5445.  
  5446.  
  5447. if AB.Vars.Entfinder then
  5448.  
  5449. for k, v in pairs(ents.GetAll()) do
  5450.  
  5451. if AB.ToMetric( me:GetPos():Distance( v:GetPos() ) ) > AB.NumberVars.VisionDist then continue end
  5452.  
  5453. if !AB.OnScreen( v, 20 ) then continue end
  5454.  
  5455. local drawing = false
  5456.  
  5457.  
  5458.  
  5459. for i,p in pairs(AB.MarkedEnts) do
  5460.  
  5461. if v:GetClass() == p then
  5462.  
  5463. drawing = true
  5464.  
  5465. end
  5466.  
  5467. end
  5468.  
  5469.  
  5470.  
  5471. if drawing then
  5472.  
  5473. local pos = (v:LocalToWorld(v:OBBCenter())):ToScreen()
  5474.  
  5475. surface.SetDrawColor(Color(255,255,255,255))
  5476.  
  5477. surface.DrawRect(pos.x - 3, pos.y - 3, 6, 6)
  5478.  
  5479. local alignclass = surface.GetTextSize( tostring(v:GetClass()) )
  5480.  
  5481. draw.SimpleTextOutlined( tostring(v:GetClass()), "DermaDefault", pos.x - (alignclass / 2), pos.y + 12, AB.DefaultScheme, 0, 0, 1, Color(0,0,55,255) )
  5482.  
  5483. end
  5484.  
  5485.  
  5486.  
  5487. end
  5488.  
  5489.  
  5490.  
  5491. end
  5492.  
  5493.  
  5494.  
  5495. end -- end of showesp
  5496.  
  5497.  
  5498.  
  5499.  
  5500.  
  5501. if AB.Freecam then
  5502.  
  5503. local CamData = {}
  5504.  
  5505. CamData.origin = AB.FreecamCoordinates.pos
  5506.  
  5507. CamData.angles = AB.FreecamCoordinates.ang
  5508.  
  5509. CamData.x = AB.NumberVars.MirrorX
  5510.  
  5511. CamData.y = AB.NumberVars.MirrorY
  5512.  
  5513. CamData.w = ScrW() / (AB.NumberVars.MirrorSize / 10)
  5514.  
  5515. CamData.h = ScrH() / (AB.NumberVars.MirrorSize / 10)
  5516.  
  5517. CamData.drawviewmodel = false
  5518.  
  5519. CamData.drawhud = false
  5520.  
  5521. CamData.fov = 90
  5522.  
  5523. render.RenderView( CamData )
  5524.  
  5525. end
  5526.  
  5527.  
  5528.  
  5529. if AB.Vars.Mirror then
  5530.  
  5531. local CamData = {}
  5532.  
  5533. if AB.NumberVars.MirrorAxis == 0 then
  5534.  
  5535. CamData.angles = Angle(0,me:EyeAngles().yaw - 180,0)
  5536.  
  5537. elseif AB.NumberVars.MirrorAxis == 1 then
  5538.  
  5539. CamData.angles = Angle(me:EyeAngles().pitch,me:EyeAngles().yaw - 180,0)
  5540.  
  5541. else
  5542.  
  5543. CamData.angles = Angle(-me:EyeAngles().pitch,me:EyeAngles().yaw - 180,0)
  5544.  
  5545. end
  5546.  
  5547.  
  5548.  
  5549. CamData.origin = me:GetPos()+Vector(0,0,50)
  5550.  
  5551. CamData.x = AB.NumberVars.MirrorX
  5552.  
  5553. CamData.y = AB.NumberVars.MirrorY
  5554.  
  5555. CamData.w = ScrW() / (AB.NumberVars.MirrorSize / 10)
  5556.  
  5557. CamData.h = ScrH() / (AB.NumberVars.MirrorSize / 10)
  5558.  
  5559. CamData.drawviewmodel = false
  5560.  
  5561. CamData.drawhud = false
  5562.  
  5563. CamData.fov = 90
  5564.  
  5565. render.RenderView( CamData )
  5566.  
  5567. end
  5568.  
  5569.  
  5570.  
  5571.  
  5572.  
  5573.  
  5574.  
  5575. if AB.Vars.PreviewTarget then
  5576.  
  5577. local t = AB.AimbotPreviewTarget
  5578.  
  5579. if isvector( t ) then
  5580.  
  5581. local p = t:ToScreen()
  5582.  
  5583. surface.SetDrawColor(Color(255,155,55,255))
  5584.  
  5585. surface.DrawRect(p.x-1, p.y + 6, 2, 20)
  5586.  
  5587. surface.DrawRect(p.x-1, p.y - (6 + 20), 2, 20)
  5588.  
  5589. surface.DrawRect(p.x + 6, p.y-1, 20, 2)
  5590.  
  5591. surface.DrawRect(p.x - (6 + 20), p.y-1, 20, 2)
  5592.  
  5593. end
  5594.  
  5595. end
  5596.  
  5597.  
  5598.  
  5599.  
  5600.  
  5601. if AB.Vars.Radar then
  5602.  
  5603. local size = AB.NumberVars.RadarSize
  5604.  
  5605. local fov = AB.NumberVars.RadarZoom
  5606.  
  5607. local x = AB.NumberVars.RadarX
  5608.  
  5609. local y = AB.NumberVars.RadarY
  5610.  
  5611.  
  5612.  
  5613. surface.SetDrawColor(AB.DefaultScheme.r, AB.DefaultScheme.g, AB.DefaultScheme.b, AB.NumberVars.RadarAlpha)
  5614.  
  5615. surface.DrawRect(x - 2, y - 2, size + 4, size + 4)
  5616.  
  5617.  
  5618.  
  5619.  
  5620.  
  5621. surface.SetDrawColor(Color(20, 20, 20, AB.NumberVars.RadarAlpha))
  5622.  
  5623. surface.DrawRect(x, y, size, size)
  5624.  
  5625. surface.SetDrawColor(Color(30, 30, 30, 255))
  5626.  
  5627. surface.DrawLine(x, y, x + (size / 2), y + (size / 2))
  5628.  
  5629. surface.DrawLine(x + size, y, x + (size / 2), y + (size / 2))
  5630.  
  5631.  
  5632.  
  5633. surface.SetDrawColor(AB.DefaultScheme)
  5634.  
  5635. surface.DrawRect((x -2)+ (size/2), (y-2) + (size/2), 4, 4)
  5636.  
  5637.  
  5638.  
  5639. for key, ply in pairs(player.GetAll()) do
  5640.  
  5641. local teamcol, teamcol2 = AB.GetESPColor( ply )
  5642.  
  5643.  
  5644.  
  5645.  
  5646.  
  5647. if ply != me and !AB.IsDead( ply ) then
  5648.  
  5649. local lx = me:GetPos().x - ply:GetPos().x
  5650.  
  5651. local ly = me:GetPos().y - ply:GetPos().y
  5652.  
  5653. local ang = EyeAngles().y
  5654.  
  5655. local cos = math.cos(math.rad(-ang))
  5656.  
  5657. local sin = math.sin(math.rad(-ang))
  5658.  
  5659. local px = (ly * cos) + (lx * sin)
  5660.  
  5661. local py = (lx * cos) - (ly * sin)
  5662.  
  5663. px = px / fov
  5664.  
  5665. py = py / fov
  5666.  
  5667. px = math.Clamp(px, -(size * 0.50), size * 0.50)
  5668.  
  5669. py = math.Clamp(py, -(size * 0.50), size * 0.50)
  5670.  
  5671. local name = player.GetAll()[key]:Nick()
  5672.  
  5673. draw.SimpleText(name, "default", x + size - (size * 0.50) + px - 13, y + size - (size * 0.50) + py - 7, teamcol2, TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
  5674.  
  5675. surface.SetDrawColor(teamcol)
  5676.  
  5677. surface.DrawRect(x + size - (size * 0.50) + px, y + size - (size * 0.50) + py, 3, 3)
  5678.  
  5679.  
  5680.  
  5681. end
  5682.  
  5683.  
  5684.  
  5685. end
  5686.  
  5687.  
  5688.  
  5689. end
  5690.  
  5691.  
  5692.  
  5693. if AB.Vars.Crosshair then
  5694.  
  5695. local hitpos = util.TraceLine ({
  5696.  
  5697. start = me:GetShootPos(),
  5698.  
  5699. endpos = me:GetShootPos() + me:GetAimVector() * 4096,
  5700.  
  5701. filter = me,
  5702.  
  5703. mask = MASK_SHOT
  5704.  
  5705. }).HitPos
  5706.  
  5707.  
  5708.  
  5709. local screenpos = hitpos:ToScreen()
  5710.  
  5711. local x = screenpos.x
  5712.  
  5713. local y = screenpos.y
  5714.  
  5715.  
  5716.  
  5717. surface.SetDrawColor(Color(255, 255, 255, 255))
  5718.  
  5719. surface.DrawRect((ScrW() / 2) - 1, (ScrH() / 2) - 1, 2, 2)
  5720.  
  5721. surface.DrawRect(x-1, y + 6, 2, 20)
  5722.  
  5723. surface.DrawRect(x-1, y - (6 + 20), 2, 20)
  5724.  
  5725. surface.DrawRect(x + 6, y-1, 20, 2)
  5726.  
  5727. surface.DrawRect(x - (6 + 20), y-1, 20, 2)
  5728.  
  5729.  
  5730.  
  5731. if AB.CrossHairAlpha > 0 then AB.CrossHairAlpha = math.Clamp(AB.CrossHairAlpha - 6, 0, 255) end
  5732.  
  5733. surface.SetDrawColor(Color(255, 255, 255, AB.CrossHairAlpha))
  5734.  
  5735. surface.DrawLine(x - 24, y + 24, x - 6, y + 6)
  5736.  
  5737. surface.DrawLine(x + 24, y + 24, x + 6, y + 6)
  5738.  
  5739. surface.DrawLine(x - 24, y - 24, x - 6, y - 6)
  5740.  
  5741. surface.DrawLine(x + 24, y - 24, x + 6, y - 6)
  5742.  
  5743.  
  5744.  
  5745.  
  5746.  
  5747. end
  5748.  
  5749.  
  5750.  
  5751.  
  5752.  
  5753.  
  5754.  
  5755.  
  5756.  
  5757. if isvector( AB.CurrentBase ) then
  5758.  
  5759. local sc = (AB.CurrentBase + Vector( 0, 0, 10 )):ToScreen()
  5760.  
  5761.  
  5762.  
  5763. draw.SimpleText("My Base", "default", sc.x, sc.y - 42, AB.DefaultScheme, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  5764.  
  5765. draw.SimpleText( AB.ToMetric( LocalPlayer():GetPos():Distance( AB.CurrentBase ) ).."m", "default", sc.x, sc.y - 30, AB.DefaultScheme, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  5766.  
  5767. surface.SetDrawColor( Color(205,205,255, 100 ) )
  5768.  
  5769. draw.NoTexture()
  5770.  
  5771. local triangle = {
  5772.  
  5773. { x = sc.x - 10, y = sc.y - 20 },
  5774.  
  5775. { x = sc.x + 10, y = sc.y - 20 },
  5776.  
  5777. { x = sc.x, y = sc.y },
  5778.  
  5779. }
  5780.  
  5781. surface.DrawPoly( triangle )
  5782.  
  5783.  
  5784.  
  5785. end
  5786.  
  5787.  
  5788.  
  5789. if AB.Vars.KeypadJew then
  5790.  
  5791.  
  5792.  
  5793. local e = me:GetEyeTrace().Entity
  5794.  
  5795. if IsValid(e) and string.find( e:GetClass(), "Keypad") then
  5796.  
  5797. local text;
  5798.  
  5799. local color;
  5800.  
  5801. if(e.code && e.code != "") then
  5802.  
  5803. text = e.code;
  5804.  
  5805. color = Color( 105, 255, 105, 150 )
  5806.  
  5807. elseif(e.tempCode && e.tempCode != "") then
  5808.  
  5809. text = e.tempCode;
  5810.  
  5811. color = Color( 250, 150, 150, 150 )
  5812.  
  5813. else
  5814.  
  5815. text = "Unknown"
  5816.  
  5817. color = Color(150,150,150,150)
  5818.  
  5819. end
  5820.  
  5821. -- draw.WordBox( 8, ScrW() / 2, ScrH() / 2, text, "Default", color, Color(255,255,255,255) )
  5822.  
  5823.  
  5824.  
  5825. surface.SetDrawColor( Color( 0,0,50, 150 ) )
  5826.  
  5827. surface.SetMaterial( grad )
  5828.  
  5829. surface.DrawTexturedRect( ScrW() / 2 + 57, ScrH() / 2 - 7, 50, 15 )
  5830.  
  5831. draw.SimpleText(text, "DermaDefault", ScrW() / 2 + 60, ScrH() / 2, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
  5832.  
  5833.  
  5834.  
  5835. end
  5836.  
  5837.  
  5838.  
  5839. for k,v in pairs(ents.GetAll()) do
  5840.  
  5841. if IsValid(v) and string.find( v:GetClass(), "Keypad") then
  5842.  
  5843. if v != e and me:GetPos():Distance( v:GetPos() ) < 8000 then
  5844.  
  5845. local pos = v:GetPos():ToScreen()
  5846.  
  5847. if pos.x > 0 and pos.x < ScrW() and pos.y > 0 and pos.y < ScrH() then
  5848.  
  5849. if (v.code && v.code != "") then
  5850.  
  5851. surface.SetDrawColor( Color( 0,0,50, 150 ) )
  5852.  
  5853. surface.SetMaterial( grad )
  5854.  
  5855. surface.DrawTexturedRect( pos.x, pos.y, 50, 15 )
  5856.  
  5857. draw.SimpleText( v.code, "DermaDefault", pos.x + 5, pos.y + 6, Color( 105, 255, 105, 150 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
  5858.  
  5859.  
  5860.  
  5861. -- draw.WordBox( 8, pos.x-5, pos.y-5, v.code, "Default", Color( 0, 255, 0, 150 ), Color(255,255,255,255) )
  5862.  
  5863. else
  5864.  
  5865. if(v.tempCode && v.tempCode != "") then
  5866.  
  5867. surface.SetDrawColor( Color( 0,0,50, 150 ) )
  5868.  
  5869. surface.SetMaterial( grad )
  5870.  
  5871. surface.DrawTexturedRect( pos.x, pos.y, 50, 15 )
  5872.  
  5873. draw.SimpleText( v.tempCode, "DermaDefault", pos.x + 5, pos.y + 6, Color( 250, 150, 150, 150 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
  5874.  
  5875. else
  5876.  
  5877. surface.SetDrawColor( Color( 0,0,50, 150 ) )
  5878.  
  5879. surface.SetMaterial( grad )
  5880.  
  5881. surface.DrawTexturedRect( pos.x, pos.y, 50, 15 )
  5882.  
  5883. draw.SimpleText( "Unknown", "DermaDefault", pos.x + 5, pos.y + 6, Color(150,150,150,150), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
  5884.  
  5885. end
  5886.  
  5887. end
  5888.  
  5889. end
  5890.  
  5891. end
  5892.  
  5893. end
  5894.  
  5895. end
  5896.  
  5897.  
  5898.  
  5899. end
  5900.  
  5901.  
  5902.  
  5903.  
  5904.  
  5905. if AB.Vars.Bhop then
  5906.  
  5907. local sped = me:GetVelocity():Length()
  5908.  
  5909. draw.SimpleText("Velocity: "..math.Round( sped ), "DermaDefault", (ScrW() / 2), ScrH() - 60, AB.DefaultScheme, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER )
  5910.  
  5911. surface.SetDrawColor( AB.DefaultScheme )
  5912.  
  5913. surface.DrawOutlinedRect( (ScrW() / 2) - 100, ScrH() - 50, 200, 10 )
  5914.  
  5915. surface.SetDrawColor( Color( AB.DefaultScheme.r, AB.DefaultScheme.g, AB.DefaultScheme.b, 100 ) )
  5916.  
  5917. surface.DrawRect( (ScrW() / 2) - 100, ScrH() - 50, math.Clamp( (sped / 2000) * 200, 0, 200 ), 10 )
  5918.  
  5919. end
  5920.  
  5921.  
  5922.  
  5923.  
  5924.  
  5925. if AB.Vars.WitnessDetector then
  5926.  
  5927.  
  5928.  
  5929. if #AB.Witnesses > 0 then
  5930.  
  5931. surface.SetDrawColor( Color(50, 50, 90, 255) )
  5932.  
  5933. surface.DrawRect( (ScrW() / 2) - 150, 0, 300, (#AB.Witnesses * 20) + 30)
  5934.  
  5935. surface.SetDrawColor( Color(0, 0, 0, 250) )
  5936.  
  5937. surface.DrawRect( (ScrW() / 2) - 145, 25, 290, (#AB.Witnesses * 20) )
  5938.  
  5939. draw.SimpleText("These people can see you", "DermaDefault", (ScrW() / 2) - 63, 10, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
  5940.  
  5941.  
  5942.  
  5943.  
  5944.  
  5945. for k, v in pairs(AB.Witnesses) do
  5946.  
  5947. if !v:IsValid() then continue end -- let this pass silently, it only spams briefly when some faggot dcs anyway
  5948.  
  5949. draw.SimpleText(v:Nick(), "DermaDefault", (ScrW() / 2) - 140, 8 + (k * 20), AB.GetESPColor( v ) )
  5950.  
  5951. end
  5952.  
  5953.  
  5954.  
  5955. end
  5956.  
  5957. end
  5958.  
  5959.  
  5960.  
  5961. if AB.Vars.SpectatorDetector then
  5962.  
  5963. local starty = 0
  5964.  
  5965. if AB.Vars.WitnessDetector then starty = (#AB.Witnesses * 20) + 35 end
  5966.  
  5967.  
  5968.  
  5969. if AB.TheyHaveEyesEverywhere and #AB.TheyHaveEyesEverywhere > 0 then
  5970.  
  5971. surface.SetDrawColor( Color(50, 50, 90, 255) )
  5972.  
  5973. surface.DrawRect( (ScrW() / 2) - 150, starty, 300, (#AB.TheyHaveEyesEverywhere * 20) + 30)
  5974.  
  5975. surface.SetDrawColor( Color(0, 0, 0, 250) )
  5976.  
  5977. surface.DrawRect( (ScrW() / 2) - 145, starty + 25, 290, (#AB.TheyHaveEyesEverywhere * 20) )
  5978.  
  5979. draw.SimpleText("These people are spectating you", "DermaDefault", (ScrW() / 2) - 63, starty + 10, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
  5980.  
  5981.  
  5982.  
  5983.  
  5984.  
  5985. for k, v in pairs( AB.TheyHaveEyesEverywhere ) do
  5986.  
  5987. if !v:IsValid() then continue end -- let this pass silently, it only spams briefly when some faggot dcs anyway
  5988.  
  5989. draw.SimpleText(v:Nick(), "DermaDefault", (ScrW() / 2) - 140, starty + 8 + (k * 20), AB.GetESPColor( v ) )
  5990.  
  5991. end
  5992.  
  5993.  
  5994.  
  5995. end
  5996.  
  5997. end
  5998.  
  5999.  
  6000.  
  6001. -- ent scanner
  6002.  
  6003. if AB.EntScanner then
  6004.  
  6005.  
  6006.  
  6007. local c = me:GetEyeTrace()
  6008.  
  6009. local screenpos = c.HitPos:ToScreen()
  6010.  
  6011. local x = screenpos.x
  6012.  
  6013. local y = screenpos.y
  6014.  
  6015. local pulse = math.abs( math.sin( CurTime() * 2 ) )
  6016.  
  6017. surface.SetDrawColor( AB.DefaultScheme )
  6018.  
  6019. surface.SetMaterial( scanmat )
  6020.  
  6021. surface.DrawTexturedRect( x - (15 + (pulse * 15)), y - (15 + (pulse * 15)), 30 + (pulse * 30), 30 + (pulse * 30) )
  6022.  
  6023. surface.SetDrawColor( AB.DefaultScheme2 )
  6024.  
  6025. surface.DrawTexturedRect( x - (12 + (pulse * 12)), y - (12 + (pulse * 12)), 24 + (pulse * 24), 24 + (pulse * 24) )
  6026.  
  6027.  
  6028.  
  6029. if c.Entity and c.Entity:IsValid() then
  6030.  
  6031. AB.EntScannerTab = {}
  6032.  
  6033. local e = c.Entity
  6034.  
  6035. AB.EntScannerEnt = e
  6036.  
  6037.  
  6038.  
  6039. if e:IsPlayer() then
  6040.  
  6041. table.insert( AB.EntScannerTab, e:Nick() )
  6042.  
  6043. table.insert( AB.EntScannerTab, {e:SteamID(), Color(255,255,255)} )
  6044.  
  6045. table.insert( AB.EntScannerTab, {AB.GetRank( e ), Color( 255, 100, 0 )} )
  6046.  
  6047. table.insert( AB.EntScannerTab, "Health: "..e:Health().."% Armor: "..e:Armor().."%" )
  6048.  
  6049. if DarkRP then
  6050.  
  6051. table.insert( AB.EntScannerTab, {DarkRP.formatMoney(e:getDarkRPVar("money")) or "$ERROR", Color( 50, 255, 50)} )
  6052.  
  6053. table.insert( AB.EntScannerTab, {"Real Name: "..e:SteamName(), Color( 150, 150, 150)} )
  6054.  
  6055. end
  6056.  
  6057.  
  6058.  
  6059. if e:GetActiveWeapon() then table.insert( AB.EntScannerTab, "Holding: "..(e:GetActiveWeapon():GetClass() or "None" ) ) end
  6060.  
  6061. local weps = {}
  6062.  
  6063. for _, g in pairs( e:GetWeapons() ) do table.insert( weps, g:GetClass() )end
  6064.  
  6065. table.insert( AB.EntScannerTab, {table.ToString( weps ), Color(155,155,255)} )
  6066.  
  6067. end
  6068.  
  6069. table.insert( AB.EntScannerTab, e:GetClass() )
  6070.  
  6071. table.insert( AB.EntScannerTab, e:GetModel() )
  6072.  
  6073. table.insert( AB.EntScannerTab, "Distance: "..AB.ToMetric(e:GetPos():Distance( me:GetPos() )).."m" )
  6074.  
  6075.  
  6076.  
  6077. end
  6078.  
  6079.  
  6080.  
  6081. local textx, texty = ScrW() / 2 + 50, ScrH() / 2
  6082.  
  6083. for k, v in pairs(AB.EntScannerTab) do
  6084.  
  6085. if istable( v ) then
  6086.  
  6087. draw.SimpleTextOutlined( v[1], "default", textx + 40, (texty - 40) + (k * 12), v[2], 0, 0, 1, Color(0,0,0) )
  6088.  
  6089. else
  6090.  
  6091. draw.SimpleTextOutlined( v, "default", textx + 40, (texty - 40) + (k * 12), AB.DefaultScheme, 0, 0, 1, Color(0,0,0) )
  6092.  
  6093. end
  6094.  
  6095. end
  6096.  
  6097.  
  6098.  
  6099.  
  6100.  
  6101. end
  6102.  
  6103.  
  6104.  
  6105. AB.MemoryDebug["hud"] = gcinfo() - memfootprint
  6106.  
  6107.  
  6108.  
  6109. end
  6110.  
  6111. hook.Add("HUDPaint", "ab_hud", AB.Vision)
  6112.  
  6113.  
  6114.  
  6115.  
  6116.  
  6117.  
  6118.  
  6119.  
  6120.  
  6121. ---------------------------------------------- NEW XRAY HERE -------------------------------------------------
  6122.  
  6123.  
  6124.  
  6125.  
  6126.  
  6127. /*
  6128.  
  6129. if AB.Vars.Xray then
  6130.  
  6131.  
  6132.  
  6133. for k, v in pairs(ents.GetAll()) do
  6134.  
  6135.  
  6136.  
  6137. if AB.ToMetric(me:GetPos():Distance(v:GetPos())) > AB.NumberVars.XrayDistance then if v:GetColor().a == 100 then v:SetColor(Color(255,255,255,255)) end continue end
  6138.  
  6139.  
  6140.  
  6141. -- set rendermode none?
  6142.  
  6143.  
  6144.  
  6145. if AB.Vars.XrayPlayers then
  6146.  
  6147. if v:IsValid() and v:IsPlayer() and v != LocalPlayer() and !AB.IsDead( v ) and AB.OnScreen( v ) then
  6148.  
  6149. cam.Start3D(EyePos(),EyeAngles())
  6150.  
  6151. if AB.Vars.NoChamColours then
  6152.  
  6153. v:SetMaterial(AB.mat1)
  6154.  
  6155. v:SetRenderMode(4)
  6156.  
  6157. v:SetColor(xraytrans)
  6158.  
  6159. render.SuppressEngineLighting( true )
  6160.  
  6161. render.MaterialOverride( AB.mat1 )
  6162.  
  6163. end
  6164.  
  6165. if AB.Vars.PKChams and AB.Vars.NoChamColours then render.SetColorModulation( 0, 1, 0 ) render.SetBlend(0.8) else render.SetColorModulation( AB.ColScheme.x, AB.ColScheme.y, AB.ColScheme.z ) render.SetBlend(0.3) end
  6166.  
  6167. v:DrawModel()
  6168.  
  6169. if IsValid( v:GetActiveWeapon() ) then
  6170.  
  6171. if AB.Vars.NoChamColours then render.SetColorModulation( AB.ColScheme2.x, AB.ColScheme2.y, AB.ColScheme2.z ) end
  6172.  
  6173. v:GetActiveWeapon():DrawModel()
  6174.  
  6175. end
  6176.  
  6177. render.SetBlend(1)
  6178.  
  6179. render.SuppressEngineLighting( false )
  6180.  
  6181. render.MaterialOverride( )
  6182.  
  6183. -- v:SetColor(Color(255,255,255,255))
  6184.  
  6185. cam.End3D()
  6186.  
  6187.  
  6188.  
  6189. end
  6190.  
  6191. end
  6192.  
  6193. if AB.Vars.XrayProps then
  6194.  
  6195. if v:IsValid() and v:GetClass() == "prop_physics" and AB.OnScreen( v ) then
  6196.  
  6197. cam.Start3D(EyePos(),EyeAngles())
  6198.  
  6199. if AB.Vars.NoChamColours then
  6200.  
  6201. v:SetMaterial(AB.mat1)
  6202.  
  6203. v:SetRenderMode(4)
  6204.  
  6205. v:SetColor(xraytrans)
  6206.  
  6207. render.SuppressEngineLighting( true )
  6208.  
  6209. render.MaterialOverride( AB.mat1 )
  6210.  
  6211. end
  6212.  
  6213. if AB.Vars.PKChams and AB.Vars.NoChamColours then render.SetColorModulation( 1, 0.2, 0 ) render.SetBlend(0.6) else render.SetColorModulation( AB.ColScheme2.x, AB.ColScheme2.y, AB.ColScheme2.z ) render.SetBlend(0.3) end
  6214.  
  6215. v:DrawModel()
  6216.  
  6217. render.SetBlend(1)
  6218.  
  6219. render.SuppressEngineLighting( false )
  6220.  
  6221. render.MaterialOverride( )
  6222.  
  6223. -- v:SetColor(Color(255,255,255,255))
  6224.  
  6225. cam.End3D()
  6226.  
  6227. end
  6228.  
  6229. end
  6230.  
  6231.  
  6232.  
  6233.  
  6234.  
  6235. if AB.Vars.XrayEntfinder then
  6236.  
  6237. local drawing = false
  6238.  
  6239.  
  6240.  
  6241. for i,p in pairs(AB.MarkedEnts) do
  6242.  
  6243. if v:GetClass() == p then
  6244.  
  6245. drawing = true
  6246.  
  6247. end
  6248.  
  6249. end
  6250.  
  6251.  
  6252.  
  6253. if drawing and AB.OnScreen( v ) then
  6254.  
  6255. cam.Start3D(EyePos(),EyeAngles())
  6256.  
  6257. v:SetMaterial(AB.mat1)
  6258.  
  6259. v:SetRenderMode(4)
  6260.  
  6261. v:SetColor(xraytrans)
  6262.  
  6263. render.SuppressEngineLighting( true )
  6264.  
  6265. render.MaterialOverride( AB.mat1 )
  6266.  
  6267. render.SetColorModulation( AB.ColScheme2.x, AB.ColScheme2.y, AB.ColScheme2.z )
  6268.  
  6269. render.SetBlend(0.3)
  6270.  
  6271. v:DrawModel()
  6272.  
  6273. render.SetBlend(1)
  6274.  
  6275. render.SuppressEngineLighting( false )
  6276.  
  6277. render.MaterialOverride( )
  6278.  
  6279. -- v:SetColor(Color(255,255,255,255))
  6280.  
  6281. cam.End3D()
  6282.  
  6283. end
  6284.  
  6285.  
  6286.  
  6287. end
  6288.  
  6289.  
  6290.  
  6291.  
  6292.  
  6293.  
  6294.  
  6295. end
  6296.  
  6297. end
  6298.  
  6299. */
  6300.  
  6301.  
  6302.  
  6303.  
  6304.  
  6305. function AB.DrawXrayEntity( ent, col, domat, ghost )
  6306.  
  6307. cam.Start3D( EyePos(), EyeAngles() )
  6308.  
  6309. cam.IgnoreZ( true )
  6310.  
  6311. if domat then render.MaterialOverride( AB.Mat1 ) end
  6312.  
  6313. render.SuppressEngineLighting( true )
  6314.  
  6315. render.SetColorModulation( col.r / 255, col.g / 255, col.b / 255 )
  6316.  
  6317. if ghost then render.SetBlend( 0.3 ) end
  6318.  
  6319. ent:DrawModel()
  6320.  
  6321. render.SuppressEngineLighting( false )
  6322.  
  6323. cam.IgnoreZ( false )
  6324.  
  6325. render.MaterialOverride()
  6326.  
  6327. cam.End3D()
  6328.  
  6329. end
  6330.  
  6331.  
  6332.  
  6333.  
  6334.  
  6335. function AB.DoXray()
  6336.  
  6337. local me = LocalPlayer()
  6338.  
  6339. if !me or !me:IsValid() or !AB.Vars.Xray then return end
  6340.  
  6341.  
  6342.  
  6343. local fags = ents.GetAll()
  6344.  
  6345. -- table.sort( fags, function( a, b ) return a:GetPos():DistToSqr( EyePos() ) > b:GetPos():DistToSqr( EyePos() ) end )
  6346.  
  6347.  
  6348.  
  6349. for k, v in ipairs( fags ) do
  6350.  
  6351. if !AB.OnScreen( v, 50 ) or AB.ToMetric( me:GetPos():Distance( v:GetPos() ) ) > AB.NumberVars.XrayDistance then continue end
  6352.  
  6353.  
  6354.  
  6355. -- players loop
  6356.  
  6357. if AB.Vars.XrayPlayers and v:IsPlayer() then
  6358.  
  6359. if v == LocalPlayer() or !v:Alive() then continue end
  6360.  
  6361. local teamcol, teamcol2
  6362.  
  6363. if AB.Vars.TeamColors then
  6364.  
  6365. teamcol = team.GetColor(v:Team())
  6366.  
  6367. teamcol2 = Color(math.Clamp(teamcol.r - 100, 0, 255), math.Clamp(teamcol.g - 100, 0, 255), math.Clamp(teamcol.b - 100, 0, 255), 255)
  6368.  
  6369. elseif AB.Vars.PKChams then
  6370.  
  6371. teamcol = Color( 0, 255, 0 ) teamcol2 = Color( 255, 0, 0 )
  6372.  
  6373. else
  6374.  
  6375. teamcol = AB.DefaultScheme teamcol2 = AB.DefaultScheme2
  6376.  
  6377. end
  6378.  
  6379.  
  6380.  
  6381. AB.DrawXrayEntity( v, teamcol, AB.Vars.NoChamColours, !AB.Vars.XraySolid )
  6382.  
  6383.  
  6384.  
  6385. local gun = v:GetActiveWeapon()
  6386.  
  6387. if gun and gun:IsValid() then AB.DrawXrayEntity( gun, teamcol2, AB.Vars.NoChamColours, !AB.Vars.XraySolid ) end
  6388.  
  6389. end
  6390.  
  6391.  
  6392.  
  6393. -- props loop
  6394.  
  6395. if AB.Vars.XrayProps and v:GetClass() == "prop_physics" then
  6396.  
  6397. local teamcol, teamcol2
  6398.  
  6399. if AB.Vars.PKChams then
  6400.  
  6401. teamcol = Color( 0, 255, 0 ) teamcol2 = Color( 255, 0, 0 )
  6402.  
  6403. else
  6404.  
  6405. teamcol = AB.DefaultScheme teamcol2 = AB.DefaultScheme2
  6406.  
  6407. end
  6408.  
  6409. AB.DrawXrayEntity( v, teamcol2, AB.Vars.NoChamColours, true )
  6410.  
  6411. end
  6412.  
  6413.  
  6414.  
  6415. -- ents loop
  6416.  
  6417. if AB.Vars.XrayEntfinder and table.HasValue( AB.MarkedEnts, v:GetClass() ) then
  6418.  
  6419. local teamcol, teamcol2
  6420.  
  6421. if AB.Vars.PKChams then
  6422.  
  6423. teamcol = Color( 255, 255, 0 ) teamcol2 = Color( 255, 255, 0 )
  6424.  
  6425. else
  6426.  
  6427. teamcol = AB.DefaultScheme teamcol2 = AB.DefaultScheme2
  6428.  
  6429. end
  6430.  
  6431. AB.DrawXrayEntity( v, teamcol, AB.Vars.NoChamColours, true )
  6432.  
  6433. end
  6434.  
  6435.  
  6436.  
  6437. end
  6438.  
  6439. end
  6440.  
  6441.  
  6442.  
  6443. hook.Add( "PreDrawHUD", "AB_NewXray", AB.DoXray )
  6444.  
  6445.  
  6446.  
  6447.  
  6448.  
  6449.  
  6450.  
  6451.  
  6452.  
  6453.  
  6454.  
  6455.  
  6456.  
  6457. function AB.PKBeamsCore()
  6458.  
  6459. if AB.Vars.PKVerticalBeams then
  6460.  
  6461. render.SetMaterial( beammat )
  6462.  
  6463. for k, v in pairs( player.GetAll()) do
  6464.  
  6465. if !v:Alive() or v == LocalPlayer() then continue end
  6466.  
  6467. render.DrawBeam( v:GetPos() + Vector( 0, 0, -2000 ), v:GetPos() + Vector( 0, 0, 2000 ), 50, 0, 1, Color(255,255,255) )
  6468.  
  6469. end
  6470.  
  6471. end
  6472.  
  6473. end
  6474.  
  6475. hook.Add("PostDrawTranslucentRenderables", "ab_beams", AB.PKBeamsCore)
  6476.  
  6477.  
  6478.  
  6479.  
  6480.  
  6481. function AB.ToggleEntityScanner()
  6482.  
  6483. if !AB.EntScanner then
  6484.  
  6485. AB.EntScanner = true
  6486.  
  6487. AB.ScannerButton1 = AB.MakeFloatingButton( ScrW() / 2 - 180, (ScrH() / 2) - 50, "Copy to Console", function() print(AB.EntScannerEnt)
  6488.  
  6489. for k, v in pairs( AB.EntScannerTab ) do
  6490.  
  6491. if istable( v ) then MsgC( v[2], v[1].."\n" ) else MsgN( v ) end
  6492.  
  6493. end
  6494.  
  6495. end)
  6496.  
  6497.  
  6498.  
  6499. AB.ScannerButton2 = AB.MakeFloatingButton( ScrW() / 2 - 180, (ScrH() / 2) - 20, "Add class to ESP", function()
  6500.  
  6501. if table.HasValue( AB.MarkedEnts, AB.EntScannerEnt:GetClass() ) then AB.ChatText( "Already marked!", Color(255,205,205) ) return end
  6502.  
  6503. AB.ChatText( "Added "..AB.EntScannerEnt:GetClass().." to marked ent classes", Color(255,255,255) )
  6504.  
  6505. table.insert(AB.MarkedEnts, AB.EntScannerEnt:GetClass())
  6506.  
  6507. end)
  6508.  
  6509.  
  6510.  
  6511. AB.ChatText( "Enabled Entity Scanner", Color(255,255,255) )
  6512.  
  6513. else
  6514.  
  6515. AB.EntScanner = false
  6516.  
  6517. AB.ChatText( "Disabled Entity Scanner", Color(255,205,205) )
  6518.  
  6519. if AB.ScannerButton1 then AB.ScannerButton1:Remove() end
  6520.  
  6521. if AB.ScannerButton2 then AB.ScannerButton2:Remove() end
  6522.  
  6523. end
  6524.  
  6525. end
  6526.  
  6527.  
  6528.  
  6529. AB.MouseReleased = false
  6530.  
  6531. function AB.ToggleFreeMouse()
  6532.  
  6533. if !AB.MouseReleased then
  6534.  
  6535. gui.EnableScreenClicker( true )
  6536.  
  6537. AB.MouseReleased = true
  6538.  
  6539. else
  6540.  
  6541. gui.EnableScreenClicker( false )
  6542.  
  6543. AB.MouseReleased = false
  6544.  
  6545. end
  6546.  
  6547. end
  6548.  
  6549. concommand.Add("ace_toggle_mouse_cursor", AB.ToggleFreeMouse)
  6550.  
  6551.  
  6552.  
  6553. function AB.CalcView( ply, pos, angles, fov )
  6554.  
  6555. local me = LocalPlayer()
  6556.  
  6557. if !me:IsValid() or !me:Alive() or me:GetViewEntity() != me or me:InVehicle() then return end
  6558.  
  6559.  
  6560.  
  6561. local tps = {}
  6562.  
  6563.  
  6564.  
  6565. if AB.Vars.SilentAim and !AB.Vars.Thirdperson and lastoldang and isangle( lastoldang ) then
  6566.  
  6567. tps.origin = me:EyePos()
  6568.  
  6569. tps.angles = lastoldang
  6570.  
  6571. tps.fov = fov
  6572.  
  6573. return tps
  6574.  
  6575. end
  6576.  
  6577.  
  6578.  
  6579. if AB.Vars.NoRecoil and !AB.Vars.Thirdperson then
  6580.  
  6581. -- tps.origin = me:EyePos()
  6582.  
  6583. tps.angles = me:EyeAngles()
  6584.  
  6585. -- tps.fov = fov
  6586.  
  6587. return tps
  6588.  
  6589. end
  6590.  
  6591.  
  6592.  
  6593. if AB.Vars.Thirdperson then
  6594.  
  6595. if AB.RenderPanic then return end
  6596.  
  6597. local trace = util.TraceLine( { start = pos - ply:GetForward() * 2, endpos = pos - angles:Forward() * AB.NumberVars.TPSDistance, filter = player.GetAll(), mask = MASK_SHOT } )
  6598.  
  6599. tps.origin = trace.HitPos + ply:GetForward() * 20 + ply:GetRight() * AB.NumberVars.TPSOffset
  6600.  
  6601. tps.angles = angles
  6602.  
  6603. tps.fov = fov
  6604.  
  6605. return tps
  6606.  
  6607. end
  6608.  
  6609.  
  6610.  
  6611. end
  6612.  
  6613. hook.Add("CalcView", "ab_calcview", AB.CalcView)
  6614.  
  6615.  
  6616.  
  6617.  
  6618.  
  6619. function AB.ICanSeeMyAss( ply )
  6620.  
  6621. if AB.Vars.Thirdperson then return true end
  6622.  
  6623. return false
  6624.  
  6625. end
  6626.  
  6627. hook.Add("ShouldDrawLocalPlayer", "ab_drawplayer", AB.ICanSeeMyAss)
  6628.  
  6629.  
  6630.  
  6631. -- it would be very wise to keep this disabled for now
  6632.  
  6633. /*
  6634.  
  6635. function AB.Transparency()
  6636.  
  6637. if AB.Vars.XrayProps then
  6638.  
  6639. for k, v in pairs(ents.GetAll()) do
  6640.  
  6641. render.SuppressEngineLighting( true )
  6642.  
  6643. end
  6644.  
  6645. end
  6646.  
  6647. end
  6648.  
  6649.  
  6650.  
  6651. hook.Add("RenderScene", "ab_transparency", AB.Transparency)
  6652.  
  6653. */
  6654.  
  6655.  
  6656.  
  6657. function AB.CheckWitnesses()
  6658.  
  6659. if !AB.Vars.WitnessDetector then return end
  6660.  
  6661. AB.Witnesses = {}
  6662.  
  6663. for k, v in pairs(player.GetAll()) do
  6664.  
  6665. if v:IsValid() and v != LocalPlayer() then
  6666.  
  6667. local Trace = {}
  6668.  
  6669. Trace.start = LocalPlayer():EyePos() + Vector(0, 0, 32)
  6670.  
  6671. Trace.endpos = v:EyePos() + Vector(0, 0, 32)
  6672.  
  6673. Trace.filter = {v, LocalPlayer()}
  6674.  
  6675.  
  6676.  
  6677. TraceRes = util.TraceLine(Trace)
  6678.  
  6679.  
  6680.  
  6681. if !TraceRes.Hit then
  6682.  
  6683. if (v:EyeAngles():Forward():Dot((LocalPlayer():EyePos() - v:EyePos())) > math.cos(math.rad(45))) then
  6684.  
  6685. if !table.HasValue(AB.Witnesses, v) then table.insert( AB.Witnesses, v ) end
  6686.  
  6687. end
  6688.  
  6689. end
  6690.  
  6691.  
  6692.  
  6693. end
  6694.  
  6695. end
  6696.  
  6697. end
  6698.  
  6699. timer.Create("ab_WitnessCheck", 0.5, 0, AB.CheckWitnesses)
  6700.  
  6701.  
  6702.  
  6703. local nxtscan = CurTime()
  6704.  
  6705. function AB.ScanForTraitors()
  6706.  
  6707. if nxtscan > CurTime() then return end
  6708.  
  6709. /*
  6710.  
  6711. for _, ply in pairs(player.GetAll()) do
  6712.  
  6713. if ply == LocalPlayer() then continue end
  6714.  
  6715. if ply:GetRole() == ROLE_DETECTIVE then continue end
  6716.  
  6717. if !ply:GetActiveWeapon() or !ply:GetActiveWeapon():IsValid() then continue end
  6718.  
  6719.  
  6720.  
  6721. if ply:GetActiveWeapon().CanBuy and table.HasValue( ply:GetActiveWeapon().CanBuy, ROLE_TRAITOR ) and !table.HasValue( AB.Traitors, ply ) then
  6722.  
  6723. table.insert( AB.Traitors, ply )
  6724.  
  6725. surface.PlaySound("buttons/bell1.wav")
  6726.  
  6727. AB.ChatText( ply:Nick().." is a filthy nasty traitor!", Color(255,100,0) )
  6728.  
  6729. end
  6730.  
  6731.  
  6732.  
  6733. end
  6734.  
  6735. */
  6736.  
  6737. nxtscan = CurTime() + 0.5
  6738.  
  6739.  
  6740.  
  6741. for _,v in pairs(ents.GetAll()) do
  6742.  
  6743. if GetRoundState() == 3 and v:IsWeapon() and type(v:GetOwner()) == "Player" and v.Buyer == nil and v.CanBuy and table.HasValue(v.CanBuy, 1) and !table.HasValue(AB.Traitors, v:GetOwner()) then
  6744.  
  6745. local owner = v:GetOwner()
  6746.  
  6747. if !owner:IsValid() then continue end
  6748.  
  6749. if owner:GetRole() == 2 then
  6750.  
  6751. v.Buyer = owner
  6752.  
  6753. else
  6754.  
  6755. table.insert(AB.Traitors, owner)
  6756.  
  6757. AB.ChatText( ply:Nick().." is a filthy nasty traitor! He bought a: "..v:GetClass(), Color(255,100,0) )
  6758.  
  6759. end
  6760.  
  6761. elseif GetRoundState() != 3 then
  6762.  
  6763. AB.Traitors = {}
  6764.  
  6765. end
  6766.  
  6767. end
  6768.  
  6769.  
  6770.  
  6771. end
  6772.  
  6773.  
  6774.  
  6775. function AB.ClearTraitors()
  6776.  
  6777. AB.Traitors = {}
  6778.  
  6779. end
  6780.  
  6781.  
  6782.  
  6783.  
  6784.  
  6785.  
  6786.  
  6787.  
  6788.  
  6789.  
  6790.  
  6791. function AB.ChokePackets( val )
  6792.  
  6793. if val then
  6794.  
  6795. odium.engine.SetChokedPacket( 0 )
  6796.  
  6797. end
  6798.  
  6799.  
  6800.  
  6801. end
  6802.  
  6803.  
  6804.  
  6805.  
  6806.  
  6807.  
  6808.  
  6809.  
  6810.  
  6811.  
  6812.  
  6813.  
  6814.  
  6815.  
  6816.  
  6817. function AB.XrayShutoff()
  6818.  
  6819. for k, v in pairs(ents.GetAll()) do
  6820.  
  6821. v:SetColor(Color(255,255,255,255))
  6822.  
  6823. end
  6824.  
  6825. end
  6826.  
  6827.  
  6828.  
  6829. AB.IsTTT = false
  6830.  
  6831.  
  6832.  
  6833. local demotereasons = {
  6834.  
  6835. "Nigger",
  6836.  
  6837. "Faggot",
  6838.  
  6839. "Dickhead",
  6840.  
  6841. "Cuckold",
  6842.  
  6843. "RDM",
  6844.  
  6845. "Shit eating faggot",
  6846.  
  6847. "RDA",
  6848.  
  6849. "NLR",
  6850.  
  6851. "Fucking sped",
  6852.  
  6853. "kys",
  6854.  
  6855. "Shit server tbh fam",
  6856.  
  6857. "Bad scripts",
  6858.  
  6859. "Skid",
  6860.  
  6861. "Admin abuse",
  6862.  
  6863. "Abusing",
  6864.  
  6865. "Fuckwit",
  6866.  
  6867. "DarkRP Player",
  6868.  
  6869. }
  6870.  
  6871.  
  6872.  
  6873.  
  6874.  
  6875.  
  6876.  
  6877. ------------------------------------------------------------------------INSULT GENERATOR--------------------------------------------------------------------------------------
  6878.  
  6879.  
  6880.  
  6881.  
  6882.  
  6883.  
  6884.  
  6885. local openers = {
  6886.  
  6887. "get fucked",
  6888.  
  6889. "eat shit",
  6890.  
  6891. "fuck a baboon",
  6892.  
  6893. "suck my dingleberries",
  6894.  
  6895. "choke on steaming cum",
  6896.  
  6897. "die in a fire",
  6898.  
  6899. "gas yourself",
  6900.  
  6901. "sit on garden shears",
  6902.  
  6903. "choke on scrotum",
  6904.  
  6905. "shove a brick up your ass",
  6906.  
  6907. "swallow barbed wire",
  6908.  
  6909. "move to sweden",
  6910.  
  6911. "fuck a pig",
  6912.  
  6913. "bow to me",
  6914.  
  6915. "suck my ball sweat",
  6916.  
  6917. "come back when you aren't garbage",
  6918.  
  6919. "i will piss on everything you love",
  6920.  
  6921. "kill yourself",
  6922.  
  6923. "livestream suicide",
  6924.  
  6925. "neck yourself",
  6926.  
  6927. "go be black somewhere else",
  6928.  
  6929. "rotate on it",
  6930.  
  6931. "choke on it",
  6932.  
  6933. "blow it out your ass",
  6934.  
  6935. "go browse tumblr",
  6936.  
  6937. "go back to darkrp",
  6938.  
  6939. "sit on horse cock",
  6940.  
  6941. "drive off a cliff",
  6942.  
  6943. "rape yourself",
  6944.  
  6945. "get raped by niggers",
  6946.  
  6947. "fuck right off",
  6948.  
  6949. "you mother is a whore",
  6950.  
  6951. "come at me",
  6952.  
  6953. "go work the corner",
  6954.  
  6955. -- "you are literal cancer",
  6956.  
  6957. "why haven't you killed yourself yet",
  6958.  
  6959. "why do you even exist",
  6960.  
  6961. "shoot your balls off with a shotgun",
  6962.  
  6963. "sterilize yourself",
  6964.  
  6965. "convert to islam",
  6966.  
  6967. "drink bleach",
  6968.  
  6969. "remove yourself",
  6970.  
  6971. "choke on whale cock",
  6972.  
  6973. "suck shit",
  6974.  
  6975. "suck a cock",
  6976.  
  6977. "lick my sphincter",
  6978.  
  6979. "set yourself on fire",
  6980.  
  6981. "drink jenkem",
  6982.  
  6983. "get beaten to death by your dad",
  6984.  
  6985. "choke on your uncle's cock",
  6986.  
  6987. "get sat on by a 200kg feminist",
  6988.  
  6989. "blow off",
  6990.  
  6991. "join isis",
  6992.  
  6993. "stick your cock in a blender",
  6994.  
  6995. "OD yourself on meth",
  6996.  
  6997. "lie under a truck",
  6998.  
  6999. "lick a wall socket",
  7000.  
  7001. "swallow hot coals",
  7002.  
  7003. "die slowly",
  7004.  
  7005. "explode yourself",
  7006.  
  7007. "swing from the noose",
  7008.  
  7009. "end yourself",
  7010.  
  7011. "take your best shot",
  7012.  
  7013. "get shot in a gay bar",
  7014.  
  7015. "drink pozzed cum",
  7016.  
  7017. "marry a muslim",
  7018.  
  7019. "get a better cheat",
  7020.  
  7021. "rub your dick on a cheese grater",
  7022.  
  7023. "wrap a rake with barbed wire and sodomize yourself",
  7024.  
  7025. "close your gaping cunt",
  7026.  
  7027. }
  7028.  
  7029.  
  7030.  
  7031. local joiners = {
  7032.  
  7033. "cancer infested",
  7034.  
  7035. "cock sucking",
  7036.  
  7037. "fuck faced",
  7038.  
  7039. "cunt eyed",
  7040.  
  7041. "nigger fucking",
  7042.  
  7043. "candy ass",
  7044.  
  7045. "fairy ass fucking",
  7046.  
  7047. "shit licking",
  7048.  
  7049. "unlovable",
  7050.  
  7051. "disgusting",
  7052.  
  7053. "degenerate",
  7054.  
  7055. "fuck headed",
  7056.  
  7057. "dick lipped",
  7058.  
  7059. "autismal",
  7060.  
  7061. "gook eyed",
  7062.  
  7063. "mongoloided",
  7064.  
  7065. "cunt faced",
  7066.  
  7067. "dick fisted",
  7068.  
  7069. "worthless",
  7070.  
  7071. "bleeding cunted",
  7072.  
  7073. "hillary loving",
  7074.  
  7075. "maggot infested",
  7076.  
  7077. "boot lipped",
  7078.  
  7079. "chink eyed",
  7080.  
  7081. "shit skinned",
  7082.  
  7083. "nigger headed",
  7084.  
  7085. "lgbt supporting",
  7086.  
  7087. "cum stained",
  7088.  
  7089. }
  7090.  
  7091.  
  7092.  
  7093. local enders = {
  7094.  
  7095. "fuck face",
  7096.  
  7097. "poofter",
  7098.  
  7099. "jew cunt",
  7100.  
  7101. "fagmaster",
  7102.  
  7103. "goat rapist",
  7104.  
  7105. "rag head",
  7106.  
  7107. "cock cheese",
  7108.  
  7109. "vaginaphobe",
  7110.  
  7111. "coon",
  7112.  
  7113. "nigger",
  7114.  
  7115. "slag cunt",
  7116.  
  7117. "garbage man",
  7118.  
  7119. "paeodophile",
  7120.  
  7121. "kiddy toucher",
  7122.  
  7123. "pony fucker",
  7124.  
  7125. "tumblrite",
  7126.  
  7127. "sperglord",
  7128.  
  7129. "gorilla's dick",
  7130.  
  7131. "shit licker",
  7132.  
  7133. "shit slick",
  7134.  
  7135. "redditor",
  7136.  
  7137. "pig fucker",
  7138.  
  7139. "spastic",
  7140.  
  7141. "cuckold",
  7142.  
  7143. "chode gobbler",
  7144.  
  7145. "fuckwit",
  7146.  
  7147. "retard",
  7148.  
  7149. "mongoloid",
  7150.  
  7151. "elephants cunt",
  7152.  
  7153. "cunt",
  7154.  
  7155. "gook",
  7156.  
  7157. "fag lord",
  7158.  
  7159. "shit stain",
  7160.  
  7161. "mpgh skid",
  7162.  
  7163. "batch coder",
  7164.  
  7165. "pony fucker",
  7166.  
  7167. "furfag",
  7168.  
  7169. "half caste",
  7170.  
  7171. "double nigger",
  7172.  
  7173. "cock socket",
  7174.  
  7175. "cunt rag",
  7176.  
  7177. "anal wart",
  7178.  
  7179. "maggot",
  7180.  
  7181. "knob polisher",
  7182.  
  7183. "fudge packer",
  7184.  
  7185. "cock slave",
  7186.  
  7187. "trashmaster",
  7188.  
  7189. "shitskin",
  7190.  
  7191. "curry muncher",
  7192.  
  7193. "gator bait",
  7194.  
  7195. "bootlip",
  7196.  
  7197. "camel jockey",
  7198.  
  7199. "wog cunt",
  7200.  
  7201. "hooknosed kike",
  7202.  
  7203. "feminist",
  7204.  
  7205. "wop cunt",
  7206.  
  7207. "abbo",
  7208.  
  7209. "porch monkey",
  7210.  
  7211. "dago",
  7212.  
  7213. "anal secretion",
  7214.  
  7215. "pig cunt",
  7216.  
  7217. "insect",
  7218.  
  7219. "sub human",
  7220.  
  7221. "mental defect",
  7222.  
  7223. "fat whore",
  7224.  
  7225. "cunt blood",
  7226.  
  7227. "cunt rag",
  7228.  
  7229. "cotton picker",
  7230.  
  7231. "bum tickling fag",
  7232.  
  7233. "degenerate faggot",
  7234.  
  7235. "smegma lump",
  7236.  
  7237. "darkie",
  7238.  
  7239. "fuck toy",
  7240.  
  7241. "underage midget cunt",
  7242.  
  7243. "twelvie",
  7244.  
  7245. "faggot teenager",
  7246.  
  7247. "ankle biter",
  7248.  
  7249. "fat cunt american",
  7250.  
  7251. "bernie loving washout",
  7252.  
  7253. "fucking failure",
  7254.  
  7255. "cum dumpster",
  7256.  
  7257. "waste of skin",
  7258.  
  7259. "petrol sniffing coon",
  7260.  
  7261. "jenkem bottle",
  7262.  
  7263. "dirty jew",
  7264.  
  7265. "darkrp admin",
  7266.  
  7267. "cuck master",
  7268.  
  7269. "barrel of piss",
  7270.  
  7271. "tankard of shit",
  7272.  
  7273. "cock wart",
  7274.  
  7275. }
  7276.  
  7277.  
  7278.  
  7279. local adminstarts = {
  7280.  
  7281. "How much did you pay for that staff rank",
  7282.  
  7283. "Nice server you got here",
  7284.  
  7285. "How much did that gay ULX rank cost",
  7286.  
  7287. "I'll be back to shit on you again",
  7288.  
  7289. "This is only my first alt account",
  7290.  
  7291. "What autist gave you a staff rank",
  7292.  
  7293. "Banning me only makes my cock harder",
  7294.  
  7295. "I'll be back on a new account in 10 minutes",
  7296.  
  7297. "Your server deserves to be destroyed",
  7298.  
  7299. "It's been fun wrecking this shit hole",
  7300.  
  7301. "Stop touching me with your physgun",
  7302.  
  7303. "Letting you have admin was a mistake",
  7304.  
  7305. "Do what you must, I have already won",
  7306.  
  7307. "Bans mean nothing to me",
  7308.  
  7309. "You should appreciate me showing you how to break your terrible server security",
  7310.  
  7311. "I hunt down faggots like you for sport",
  7312.  
  7313. "I am better than you in every single way",
  7314.  
  7315. "I bypassed your anticheat and I'll bypass your ban too",
  7316.  
  7317. "Only power mad midget cucks become staff on darkrp",
  7318.  
  7319. "Lmao another bad server ruined",
  7320.  
  7321. "Watch me rejoin on a VPN",
  7322.  
  7323. }
  7324.  
  7325.  
  7326.  
  7327. -- i gave myself terminal autism writing these
  7328.  
  7329. local cancerstrike = {
  7330.  
  7331. "LOL fuk u silver scUm",
  7332.  
  7333. "nice aim doEs It cume in NOT N00be?",
  7334.  
  7335. "u r terible my doode",
  7336.  
  7337. "u almost hit me that time LOL",
  7338.  
  7339. "ur aim iz a joke my man",
  7340.  
  7341. "get shrekt skrub xdddd",
  7342.  
  7343. "u just got shitted on kidddd",
  7344.  
  7345. "i bet u r silver on csgo xD",
  7346.  
  7347. "u never stood a chance against my pSkillz",
  7348.  
  7349. "ur just 2bad to kill me :^(",
  7350.  
  7351. "dam im good",
  7352.  
  7353. "u wil never beat odium hax kidd :^)",
  7354.  
  7355. "eat shit and die xdd",
  7356.  
  7357. "do u use xashpass cos ur 2 bad to bypass cac :D",
  7358.  
  7359. "i laugh at ur shit skillz :D",
  7360.  
  7361. "get fukn owned kid xd",
  7362.  
  7363. "i kill u every time u shud try harder :^(",
  7364.  
  7365. "all u can do is die LOL",
  7366.  
  7367. "N00bez like u cant beat me LOL",
  7368.  
  7369. "u tried but im jus 2 gud 4 u",
  7370.  
  7371. "u cant even hit me LOL uninstall kid xd",
  7372.  
  7373. "git GUD skrub u r an embarasment",
  7374.  
  7375. "pathetic LOL",
  7376.  
  7377. "2 bad so sad u just bad :^(",
  7378.  
  7379. "im global elit in gmod xd",
  7380.  
  7381. "thx 4 free kill loser :D",
  7382.  
  7383. "r u even trying???",
  7384.  
  7385. "top kekt u got rekt",
  7386.  
  7387. "fuken smashed kunt :D",
  7388.  
  7389. "u shud add me so i can teach u how 2 shoot LOL",
  7390.  
  7391. "ur jus 2 weak and sad to beat me xd",
  7392.  
  7393. "looks liek ur sad life isnt working out 2 well 4 u :D",
  7394.  
  7395. "dats all u got??? LOL!",
  7396.  
  7397. }
  7398.  
  7399.  
  7400.  
  7401. local supercancerstrike = {
  7402.  
  7403. "dont upsetti hav some spagetti",
  7404.  
  7405. "eat my asse like a bufet (3 corse meal xd)",
  7406.  
  7407. "i ownt u in ur gay butth0le",
  7408.  
  7409. "umade noobe?",
  7410.  
  7411. "le troled hard",
  7412.  
  7413. "go wach naturo and play wif urself fag REKT",
  7414.  
  7415. "LOL i fuckd u so hard just like ur mum lst nit fag",
  7416.  
  7417. "u play liek a blynd stefen hawkin haha",
  7418.  
  7419. "ARE U GUEYS NEW??",
  7420.  
  7421. "are u as bad at life as u are in gmod??",
  7422.  
  7423. "omg this is 2 ezy are U even trying??",
  7424.  
  7425. "why dont u go play halo an fist ur butthol faget",
  7426.  
  7427. "hey granma is that u???? LOL so bad",
  7428.  
  7429. "time for you 2 uninstale the game shit stane",
  7430.  
  7431. "congrtulations ur the worlds worst gmod player",
  7432.  
  7433. "dose ur aim come in NOT NOOBE? LMAO",
  7434.  
  7435. "lol i troled u so hard *OWNED*",
  7436.  
  7437. "\"i lik 2 eat daddys logs of poo for lucnh while jackn off 2 naturo\"- u",
  7438.  
  7439. "take a se4t faget $hitstain u got OWNDE",
  7440.  
  7441. "LOL scrub ur gettin rekt hardcroe",
  7442.  
  7443. "R u mad becouse ur bad nooby?",
  7444.  
  7445. "LMAO did u go to da buthurt king an g3t urself a butthurt with fries?!?",
  7446.  
  7447. "why dont u go and play manoppoly you noob",
  7448.  
  7449. "you hav no lyfe you cant evan play gmod propaly",
  7450.  
  7451. "im hi rite now on ganj but im stil ownen u xD",
  7452.  
  7453. "if u want my cum bake ask ur mum LOL",
  7454.  
  7455. "butdocter prognoses: OWND",
  7456.  
  7457. "cry 2 ur dads dick forver noob",
  7458.  
  7459. "lol troled autismal faget",
  7460.  
  7461. "LOL N3RD owned",
  7462.  
  7463. "\"i love to drink sprems all day\"- u",
  7464.  
  7465. "crushd nerd do u want a baindaid for that LOL",
  7466.  
  7467. "lol rectal rekage ur so sh1t lol",
  7468.  
  7469. "ass states - [_] NOT REKT [X] REKT",
  7470.  
  7471. "lmao do u even try????",
  7472.  
  7473. "are u slippan off ur chaire cos ur ass is bleeding so hard??",
  7474.  
  7475. "u better get a towel for all ur tears faget",
  7476.  
  7477. "u got ass asassenated by me rofl",
  7478.  
  7479. "u wont shit agen thats how rekt ur ass is",
  7480.  
  7481. "i bet youre anus is sore from me ownen u LOL",
  7482.  
  7483. "im gonna record a fragshow so i can watch me pwn u ova and ova LMAO",
  7484.  
  7485. "i almost feel sorry for you hahahaha",
  7486.  
  7487. "lol why dont u play COD so i can own you there too",
  7488.  
  7489. "how dose it feel to be owneded so hartd??",
  7490.  
  7491. "rekt u lol another one for the fraghsow",
  7492.  
  7493. "if i was as bade as u i would kil myself",
  7494.  
  7495. "dont fell bad not ervry one can be goode",
  7496.  
  7497. "do u need some loob for ur butt so it doesnt hurt so much when i fuck u",
  7498.  
  7499. "spesciall delivary for CAPTEN BUTTHURT",
  7500.  
  7501. "wats wrong cant play wif ur dads dik in ur mouth????",
  7502.  
  7503. "maybe if u put down the cheseburgers u could kill me lol fat nerd",
  7504.  
  7505. "getting mad u virgan nerd??",
  7506.  
  7507. "butt docta prognosis: buttfustrated",
  7508.  
  7509. "<<< OWEND U >>>",
  7510.  
  7511. "if u were a fish you wuld be a sperm whael LOL",
  7512.  
  7513. ">mfw i ownd u",
  7514.  
  7515. "rekt u noob *OWNED*",
  7516.  
  7517. "ur gonna have 2 wear dipers now cos ur ass got SHREDED by me",
  7518.  
  7519. "y dont u take a short strole to the fagot store and buy some skills scrub",
  7520.  
  7521. "school3d by a 13yo lol u r rely bad",
  7522.  
  7523. "ur pathetic nerd its like u have parkensons",
  7524.  
  7525. "u just got promoted 2 cumcaptain prestige",
  7526.  
  7527. "lol pwnd",
  7528.  
  7529. "u just got butt raped lol TROLLED U",
  7530.  
  7531. "did u learn 2 aim from stevie wondar??? LOL",
  7532.  
  7533. "tell ur mum to hand the keyboard and mosue back",
  7534.  
  7535. "how does it feel to be shit on by a 13 yer old",
  7536.  
  7537. "r u into scat porns or some thing cos it feel\"s like u want me 2 shit on u",
  7538.  
  7539. "u play gmod like my granpa and hes ded",
  7540.  
  7541. "are u new or just bad?? noobe",
  7542.  
  7543. "u play gmod lik a midget playin basket ball",
  7544.  
  7545. "welcome to the noob scoole bus first stop ur house <<PWND>>",
  7546.  
  7547. ">mfw i rek u",
  7548.  
  7549. "\"i got my ass kiked so hard im shittn out my mouf\" - u",
  7550.  
  7551. "<-(0.0)-< dats u gettn ownd LOL",
  7552.  
  7553. "u just got ur ass ablitterated <<<RECKT>>>",
  7554.  
  7555. "c=3 (dats ur tiney dik rofl)",
  7556.  
  7557. "just leeve the game and let the real mans play",
  7558.  
  7559. "ur so bad u make ur noobe team look good",
  7560.  
  7561. "CONGRASTULATIONS YOU GOT FRIST PRIZE IN BEING BUTT MAD (BUT LAST IN PENIS SIZE LMAO)",
  7562.  
  7563. "im not even trying to pwn u its just so easy",
  7564.  
  7565. "im only 13 an im better than u haha XD",
  7566.  
  7567. "u just got raped",
  7568.  
  7569. "some one an ambulance cos u just got DE_STROYED",
  7570.  
  7571. "i hope u got birth control coz u got rapped",
  7572.  
  7573. "lol pwnd scrubb",
  7574.  
  7575. "you play lik a girl",
  7576.  
  7577. "\"i got fukd so hard dat im cummin shit n shittn cum\"- u",
  7578.  
  7579. "ur gonna need tampons for ur ass afta that ownage",
  7580.  
  7581. "{{ scoooled u }}",
  7582.  
  7583. "(O.o) ~c======3 dats me jizzan on u",
  7584.  
  7585. "dont worry at least ur tryan XD",
  7586.  
  7587. "cya noob send me a post card from pwnd city ROFL",
  7588.  
  7589. "its ok if u keep practasing u will get bettar lol #rekt",
  7590.  
  7591. "\"evry time i fart 1 liter of cum sqerts out\" - u",
  7592.  
  7593. "rofl i pwnd u scrub #420 #based #mlgskill",
  7594.  
  7595. "u fail just like ur dads condom",
  7596.  
  7597. "if i pwnd u any harder it wud be animal abuse",
  7598.  
  7599. "uploaden this fragshow roflmao",
  7600.  
  7601. }
  7602.  
  7603.  
  7604.  
  7605. local buyourshitfaggot = {
  7606.  
  7607. "CAC + VAC + HAC + SAC UNDETECTED",
  7608.  
  7609. "STEP UP YOUR GAME FAGGOT",
  7610.  
  7611. "RUN ANY LUA SCRIPT UNDETECTED",
  7612.  
  7613. "BE THE BEST WHEN YOU BUY THE BEST",
  7614.  
  7615. "MAKE DARKRP KIDS CRY",
  7616.  
  7617. "DEMOLISH THE LUA STATE",
  7618.  
  7619. "PUT YOUR POWER ON DISPLAY",
  7620.  
  7621. "STOMP NOOBS INTO THE DIRT",
  7622.  
  7623. "CRASH SERVERS WITH NO SURVIVORS",
  7624.  
  7625. "HACK ANYWHERE, ANYTIME, ANYONE",
  7626.  
  7627. "DESTROY ALL ANTICHEATS",
  7628.  
  7629. "TRIGGER FEMINISTS",
  7630.  
  7631. "START A SECOND HOLOCAUST",
  7632.  
  7633. "TIRED OF BEING A TOTAL FUCKING LOSER?",
  7634.  
  7635. "STOMP THE COMP",
  7636.  
  7637. "BLACK LIVES SPLATTERED",
  7638.  
  7639. "MAKE FACEPUNCH FACEDUNKED",
  7640.  
  7641. "BECOME UNBANNABLE",
  7642.  
  7643. "DUNK SO HARD YOU BREAK THE NET",
  7644.  
  7645. "#1 CAUSE OF ADMIN SUICIDES",
  7646.  
  7647. "NO FAT CHICKS",
  7648.  
  7649. "DO U <3 CHEATING?",
  7650.  
  7651. "LEGIT IS FOR LOSERS",
  7652.  
  7653. "YOUR LOSER PARENTS NEVER BOUGHT YOU TOYS THIS COOL",
  7654.  
  7655. "SHOOT THE HOTTEST LOADS",
  7656.  
  7657. }
  7658.  
  7659.  
  7660.  
  7661. local thistriggersamericans = {
  7662.  
  7663. "If i found out a girl I was flirting with was transgender I'd bash the fuck out of that degenerate cunt",
  7664.  
  7665. "Feminism is a tool satan is using to corrupt and destroy gods country, FIGHT BACK!",
  7666.  
  7667. "It's scientifically proven that women are physically and mentally weaker than men",
  7668.  
  7669. "Man's job is to build empires and conquer the earth, woman's only job is to make more men",
  7670.  
  7671.  
  7672.  
  7673. }
  7674.  
  7675.  
  7676.  
  7677. local annoyingquestions = {
  7678.  
  7679. "whats the max tabs you can have open on a vpn",
  7680.  
  7681. "how many vpns does it take to stop a ddos",
  7682.  
  7683. "whats better analog or garrys mod",
  7684.  
  7685. "whats the time",
  7686.  
  7687. "is it possible to make a clock in binary",
  7688.  
  7689. "how many cars can you drive at once",
  7690.  
  7691. "did you know there's more planes on the ground than there is submarines in the air",
  7692.  
  7693. "how many busses can you fit on 1 bus",
  7694.  
  7695. "how many tables does it take to support a chair",
  7696.  
  7697. "how many doors does it take to screw a screw",
  7698.  
  7699. "how long can you hold your eyes closed in bed",
  7700.  
  7701. "how long can you hold your breath for under spagetti",
  7702.  
  7703. "whats the fastest time to deliver the mail as mail man",
  7704.  
  7705. "how many bees does it take to make a wasp make honey",
  7706.  
  7707. "If I paint the sun blue will it turn blue",
  7708.  
  7709. "how many beavers does it take to build a dam",
  7710.  
  7711. "how much wood does it take to build a computer",
  7712.  
  7713. "can i have ur credit card number",
  7714.  
  7715. "is it possible to blink and jump at the same time",
  7716.  
  7717. "did you know that dinosaurs were, on average, large",
  7718.  
  7719. "how many thursdays does it take to paint an elephant purple",
  7720.  
  7721. "if cars could talk how fast would they go",
  7722.  
  7723. "did you know theres no oxygen in space",
  7724.  
  7725. "do toilets flush the other way in australia",
  7726.  
  7727. "if i finger paint will i get a splinter",
  7728.  
  7729. "can you build me an ant farm",
  7730.  
  7731. "did you know australia hosts 4 out of 6 of the deadliest spiders in the world",
  7732.  
  7733. "is it possible to ride a bike in space",
  7734.  
  7735. "can i make a movie based around your life",
  7736.  
  7737. "how many pants can you put on while wearing pants",
  7738.  
  7739. "if I paint a car red can it wear pants",
  7740.  
  7741. "how come no matter what colour the liquid is the froth is always white",
  7742.  
  7743. "can a hearse driver drive a corpse in the car pool lane",
  7744.  
  7745. "how come the sun is cold at night",
  7746.  
  7747. "why is it called a TV set when there is only one",
  7748.  
  7749. "if i blend strawberries can i have ur number",
  7750.  
  7751. "if I touch the moon will it be as hot as the sun",
  7752.  
  7753. "did u know ur dad is always older than u",
  7754.  
  7755. "did u know the burger king logo spells burger king",
  7756.  
  7757. "did uknow if u chew on broken glass for a few mins, it starts to taste like blood",
  7758.  
  7759. "did u know running is faster than walking",
  7760.  
  7761. "did u kno the colur blue is called blue because its blue",
  7762.  
  7763. "did you know a shooting star isnt a star",
  7764.  
  7765. "did u know shooting stars dont actually have guns",
  7766.  
  7767. "did u kno the great wall of china is in china",
  7768.  
  7769. "statistictal fact: 100% of non smokers die",
  7770.  
  7771. "did you kmow if you eat you poop it out",
  7772.  
  7773. "did u know rain clouds r called rain clouds cus they are clouds that rain",
  7774.  
  7775. "if cows drink milk is that cow a cannibal",
  7776.  
  7777. "did u know you cant win a staring contest with a stuffed animal",
  7778.  
  7779. "did u know if a race car is at peak speed and hits someone they'll die",
  7780.  
  7781. "did u know the distance between the sun and earth is the same distance as the distance between the earth and the sun",
  7782.  
  7783. "did u kno flat screen tvs arent flat",
  7784.  
  7785. "did u know aeroplane mode on ur phone doesnt make ur phone fly",
  7786.  
  7787. "did u kno too many britdhays can kill you",
  7788.  
  7789. "did u know rock music isnt for rocks",
  7790.  
  7791. "did u know if you eat enough ice you can stop global warming",
  7792.  
  7793. "if ww2 happened before vietnam would that make vietnam world war 2",
  7794.  
  7795. "did you know 3.14 isn't a real pie",
  7796.  
  7797. "did u know 100% of stair accidents happen on stairs",
  7798.  
  7799. "can vampires get AIDS",
  7800.  
  7801. "what type of bird was a dodo",
  7802.  
  7803. "did u know dog backwards is god",
  7804.  
  7805. "did you know on average a dog barks more than a cat",
  7806.  
  7807. }
  7808.  
  7809.  
  7810.  
  7811. function AB.GenerateInsult()
  7812.  
  7813. return table.Random(openers).." you "..table.Random(joiners).." "..table.Random(enders)
  7814.  
  7815. end
  7816.  
  7817.  
  7818.  
  7819. function AB.GenerateInsult2()
  7820.  
  7821. return string.upper(table.Random(openers)).." YOU "..string.upper(table.Random(joiners)).." "..string.upper(table.Random(joiners)).." "..string.upper(table.Random(enders))
  7822.  
  7823. end
  7824.  
  7825.  
  7826.  
  7827. function AB.GenerateInsult3()
  7828.  
  7829. return table.Random(adminstarts).." you "..table.Random(joiners).." "..table.Random(enders)
  7830.  
  7831. end
  7832.  
  7833.  
  7834.  
  7835. function AB.GenerateInsult4()
  7836.  
  7837. return table.Random(cancerstrike)
  7838.  
  7839. end
  7840.  
  7841.  
  7842.  
  7843. function AB.GenerateInsult5()
  7844.  
  7845. return table.Random(supercancerstrike)
  7846.  
  7847. end
  7848.  
  7849.  
  7850.  
  7851. function AB.GeneratePromo()
  7852.  
  7853. return table.Random(buyourshitfaggot).." --> GET ODIUM.PRO"
  7854.  
  7855. end
  7856.  
  7857.  
  7858.  
  7859. function AB.FormatChatString( str )
  7860.  
  7861. str = string.Replace( str, "@1", AB.GenerateInsult() )
  7862.  
  7863. str = string.Replace( str, "@2", AB.GenerateInsult2() )
  7864.  
  7865. str = string.Replace( str, "@3", AB.GenerateInsult3() )
  7866.  
  7867. str = string.Replace( str, "@4", AB.GenerateInsult4() )
  7868.  
  7869. str = string.Replace( str, "@opener", table.Random(openers) )
  7870.  
  7871. str = string.Replace( str, "@joiner", table.Random(joiners) )
  7872.  
  7873. str = string.Replace( str, "@slur", table.Random(enders) )
  7874.  
  7875. str = string.Replace( str, "@getodium", AB.GeneratePromo() )
  7876.  
  7877. str = string.Replace( str, "@csgo", AB.GenerateInsult5() )
  7878.  
  7879. return str
  7880.  
  7881. end
  7882.  
  7883.  
  7884.  
  7885. concommand.Add("ace_insult", function() LocalPlayer():ConCommand("say "..AB.GenerateInsult() ) end)
  7886.  
  7887. concommand.Add("ace_insult2", function() LocalPlayer():ConCommand("say "..AB.GenerateInsult2() ) end)
  7888.  
  7889. local siterator = 1
  7890.  
  7891. concommand.Add("ace_insult3", function() LocalPlayer():ConCommand("say "..AB.GenerateInsult3() ) end)
  7892.  
  7893. concommand.Add("ace_insult4", function() LocalPlayer():ConCommand( "say "..AB.GenerateInsult4() ) end)
  7894.  
  7895.  
  7896.  
  7897. concommand.Add("ace_chatspam_once", function()
  7898.  
  7899. local txt = AB.ChatSpamText
  7900.  
  7901. if AB.Vars.ChatSpamOOC then txt = "// "..txt end
  7902.  
  7903. txt = AB.FormatChatString( txt )
  7904.  
  7905. if AB.Vars.ChatSpamPM then
  7906.  
  7907. for _, p in pairs(player.GetAll()) do
  7908.  
  7909. if !AB.Vars.ChatSpamPMAdmins and AB.GetRank( p ) != ( "user" or "guest" or "player" ) then continue end
  7910.  
  7911. RunConsoleCommand("ulx", "psay", p:Nick(), txt)
  7912.  
  7913. end
  7914.  
  7915. else
  7916.  
  7917. RunConsoleCommand("say", txt)
  7918.  
  7919. end
  7920.  
  7921. end)
  7922.  
  7923.  
  7924.  
  7925.  
  7926.  
  7927.  
  7928.  
  7929. --AB.CurrentBase = 0
  7930.  
  7931. --AB.BaseAreaSize = 2000
  7932.  
  7933. function AB.SetBase()
  7934.  
  7935. AB.ChatText( "Set base location", Color(255,255,255) )
  7936.  
  7937. AB.CurrentBase = LocalPlayer():GetPos()
  7938.  
  7939. end
  7940.  
  7941. concommand.Add( "ace_base_set", AB.SetBase )
  7942.  
  7943.  
  7944.  
  7945. function AB.UnsetBase()
  7946.  
  7947. AB.ChatText( "Removed base", Color(255,255,255) )
  7948.  
  7949. AB.CurrentBase = 0
  7950.  
  7951. end
  7952.  
  7953. concommand.Add( "ace_base_remove", AB.UnsetBase )
  7954.  
  7955.  
  7956.  
  7957. function AB.SetBaseSize( p, cmd, arg, astr )
  7958.  
  7959. if !tonumber( arg[1] ) then AB.ChatText( "Please specify a valid base radius in metres", Color(255,205,205) ) return end
  7960.  
  7961. AB.ChatText( "Set base proximity radius to "..arg[1].."m", Color(255,255,255) )
  7962.  
  7963. AB.BaseAreaSize = arg[1]
  7964.  
  7965. end
  7966.  
  7967. concommand.Add( "ace_base_setsize", AB.SetBaseSize )
  7968.  
  7969.  
  7970.  
  7971.  
  7972.  
  7973.  
  7974.  
  7975.  
  7976.  
  7977.  
  7978.  
  7979.  
  7980.  
  7981. local elements = {
  7982.  
  7983. { -- Screen
  7984.  
  7985. x = 0.075,
  7986.  
  7987. y = 0.04,
  7988.  
  7989. w = 0.85,
  7990.  
  7991. h = 0.25,
  7992.  
  7993.  
  7994.  
  7995. },
  7996.  
  7997. { -- ABORT
  7998.  
  7999. x = 0.075,
  8000.  
  8001. y = 0.04 + 0.25 + 0.03,
  8002.  
  8003. w = 0.85 / 2 - 0.04 / 2 + 0.05,
  8004.  
  8005. h = 0.125,
  8006.  
  8007. text = "ABORT",
  8008.  
  8009. },
  8010.  
  8011. { -- OK
  8012.  
  8013. x = 0.5 + 0.04 / 2 + 0.05,
  8014.  
  8015. y = 0.04 + 0.25 + 0.03,
  8016.  
  8017. w = 0.85 / 2 - 0.04 / 2 - 0.05,
  8018.  
  8019. h = 0.125,
  8020.  
  8021. text = "OK",
  8022.  
  8023. }
  8024.  
  8025. }
  8026.  
  8027.  
  8028.  
  8029. do -- Create numbers
  8030.  
  8031. for i = 1, 9 do
  8032.  
  8033. local column = (i - 1) % 3
  8034.  
  8035.  
  8036.  
  8037. local row = math.floor((i - 1) / 3)
  8038.  
  8039.  
  8040.  
  8041. local element = {
  8042.  
  8043. x = 0.075 + (0.3 * column),
  8044.  
  8045. y = 0.175 + 0.25 + 0.05 + ((0.5 / 3) * row),
  8046.  
  8047. w = 0.25,
  8048.  
  8049. h = 0.13,
  8050.  
  8051. text = tostring(i),
  8052.  
  8053. }
  8054.  
  8055. table.insert(elements, element)
  8056.  
  8057. end
  8058.  
  8059. end
  8060.  
  8061.  
  8062.  
  8063.  
  8064.  
  8065. function AB.CalculateKeypadCursorPos(ply, ent)
  8066.  
  8067. if !ply:IsValid() then return end
  8068.  
  8069.  
  8070.  
  8071. local tr = util.TraceLine( { start = ply:EyePos(), endpos = ply:EyePos() + ply:GetAimVector() * 65, filter = ply } )
  8072.  
  8073. if !tr.Entity or tr.Entity ~= ent then return 0, 0 end
  8074.  
  8075.  
  8076.  
  8077. local scale = ent.Scale
  8078.  
  8079. if !scale then return 0, 0 end
  8080.  
  8081.  
  8082.  
  8083. local pos, ang = ent:CalculateRenderPos(), ent:CalculateRenderAng()
  8084.  
  8085. if !pos or !ang then return 0, 0 end
  8086.  
  8087. local normal = ent:GetForward()
  8088.  
  8089.  
  8090.  
  8091. local intersection = util.IntersectRayWithPlane(ply:EyePos(), ply:GetAimVector(), pos, normal)
  8092.  
  8093. if !intersection then return 0, 0 end
  8094.  
  8095.  
  8096.  
  8097. local diff = pos - intersection
  8098.  
  8099.  
  8100.  
  8101. local x = diff:Dot( -ang:Forward() ) / scale
  8102.  
  8103. local y = diff:Dot( -ang:Right() ) / scale
  8104.  
  8105.  
  8106.  
  8107. return x, y
  8108.  
  8109. end
  8110.  
  8111.  
  8112.  
  8113. function AB.KPGetHoveredElement(ply, ent)
  8114.  
  8115. local scale = ent.Scale
  8116.  
  8117.  
  8118.  
  8119. local w, h = ent.Width2D, ent.Height2D
  8120.  
  8121. local x, y = AB.CalculateKeypadCursorPos(ply, ent)
  8122.  
  8123.  
  8124.  
  8125. for _, element in ipairs(elements) do
  8126.  
  8127. local element_x = w * element.x
  8128.  
  8129. local element_y = h * element.y
  8130.  
  8131. local element_w = w * element.w
  8132.  
  8133. local element_h = h * element.h
  8134.  
  8135.  
  8136.  
  8137. if element_x < x and element_x + element_w > x and
  8138.  
  8139. element_y < y and element_y + element_h > y
  8140.  
  8141. then
  8142.  
  8143. return element
  8144.  
  8145. end
  8146.  
  8147. end
  8148.  
  8149. end
  8150.  
  8151.  
  8152.  
  8153.  
  8154.  
  8155.  
  8156.  
  8157.  
  8158.  
  8159.  
  8160.  
  8161.  
  8162.  
  8163.  
  8164.  
  8165.  
  8166.  
  8167.  
  8168.  
  8169.  
  8170.  
  8171. AB.ShekelGrabbers = {}
  8172.  
  8173. local nxsuicidemsg = 0
  8174.  
  8175. function AB.Logic()
  8176.  
  8177. local me = LocalPlayer()
  8178.  
  8179. if !me:IsValid() then return end
  8180.  
  8181.  
  8182.  
  8183. local lmemfootprint = gcinfo()
  8184.  
  8185.  
  8186.  
  8187. for k, v in pairs(player.GetAll()) do
  8188.  
  8189.  
  8190.  
  8191. -- spectator detector
  8192.  
  8193. if( v:GetObserverTarget() and v != me and v:GetObserverTarget() == me and !table.HasValue( AB.TheyHaveEyesEverywhere, v ) ) then
  8194.  
  8195. surface.PlaySound("buttons/bell1.wav")
  8196.  
  8197. AB.ChatText( v:Nick().." has begun spectating you!", Color(255,100,0) )
  8198.  
  8199. table.insert( AB.TheyHaveEyesEverywhere, v )
  8200.  
  8201. end
  8202.  
  8203.  
  8204.  
  8205. if AB.Vars.DodgeArrest then
  8206.  
  8207. if v != me and v:EyePos():Distance( me:GetPos() ) < 120 and me:Alive() and ( v:GetActiveWeapon() and v:GetActiveWeapon():IsValid() and v:GetActiveWeapon():GetClass() == "arrest_stick" ) then
  8208.  
  8209. if nxsuicidemsg <= CurTime() then
  8210.  
  8211. AB.ChatText( "Automatically suicided to avoid being arrested by "..v:Nick(), Color(255,255,255) )
  8212.  
  8213. nxsuicidemsg = CurTime() + 1
  8214.  
  8215. end
  8216.  
  8217. RunConsoleCommand( "kill" )
  8218.  
  8219. end
  8220.  
  8221. end
  8222.  
  8223.  
  8224.  
  8225.  
  8226.  
  8227. if AB.Vars.KeypadJew then
  8228.  
  8229.  
  8230.  
  8231. local kp = v:GetEyeTrace().Entity
  8232.  
  8233. if IsValid(kp) && IsValid(v) and string.find( kp:GetClass(), "Keypad") and v:EyePos():Distance(kp:GetPos()) <= 120 then
  8234.  
  8235. kp.tempCode = kp.tempCode or ""
  8236.  
  8237. kp.tempText = kp.tempText or ""
  8238.  
  8239. kp.tempStatus = kp.tempStatus or 0
  8240.  
  8241.  
  8242.  
  8243. if kp:GetText() != kp.tempText or kp:GetStatus() != kp.tempStatus then
  8244.  
  8245. kp.tempText = kp:GetText()
  8246.  
  8247. kp.tempStatus = kp:GetStatus()
  8248.  
  8249. if(kp.tempText && !kp:GetSecure()) then
  8250.  
  8251. kp.tempCode = kp.tempText
  8252.  
  8253. timer.Simple(0, function()
  8254.  
  8255. if kp:GetStatus() == 1 && kp.tempCode && kp.tempCode != "" then
  8256.  
  8257. kp.code = kp.tempCode
  8258.  
  8259. end
  8260.  
  8261. end)
  8262.  
  8263. else
  8264.  
  8265. local i = AB.KPGetHoveredElement(v, kp)
  8266.  
  8267. if (i) then i = i.text end
  8268.  
  8269. if kp.tempText then
  8270.  
  8271. timer.Simple(0, function()
  8272.  
  8273. if kp:GetStatus() == 1 && kp.tempCode && kp.tempCode != "" then
  8274.  
  8275. kp.code = kp.tempCode
  8276.  
  8277. end
  8278.  
  8279. end)
  8280.  
  8281. end
  8282.  
  8283.  
  8284.  
  8285. if kp.tempText == "" || kp:GetStatus() == 2 then
  8286.  
  8287. kp.tempCode = ""
  8288.  
  8289. end
  8290.  
  8291.  
  8292.  
  8293. timer.Simple(0, function()
  8294.  
  8295. if(tonumber(i) && kp:GetText():len() != 0) then
  8296.  
  8297. kp.tempCode = kp.tempCode..i
  8298.  
  8299. end
  8300.  
  8301. end)
  8302.  
  8303. end
  8304.  
  8305. end
  8306.  
  8307. end
  8308.  
  8309.  
  8310.  
  8311. end
  8312.  
  8313.  
  8314.  
  8315.  
  8316.  
  8317.  
  8318.  
  8319. if isvector( AB.CurrentBase ) then
  8320.  
  8321. if v == me then continue end
  8322.  
  8323. if AB.ToMetric( v:GetPos():Distance( AB.CurrentBase ) ) < tonumber(AB.BaseAreaSize) then
  8324.  
  8325. if !table.HasValue( AB.ShekelGrabbers, v ) then
  8326.  
  8327. surface.PlaySound("buttons/bell1.wav")
  8328.  
  8329. AB.ChatText( v:Nick().." has entered your base!", Color(255,205,0) )
  8330.  
  8331. table.insert( AB.ShekelGrabbers, v )
  8332.  
  8333. end
  8334.  
  8335. elseif table.HasValue( AB.ShekelGrabbers, v ) and AB.ToMetric( v:GetPos():Distance( AB.CurrentBase ) ) > tonumber(AB.BaseAreaSize) then
  8336.  
  8337. AB.ChatText( v:Nick().." has left your base", Color(100,255,100) )
  8338.  
  8339. table.RemoveByValue( AB.ShekelGrabbers, v )
  8340.  
  8341. end
  8342.  
  8343. else
  8344.  
  8345. AB.ShekelGrabbers = {}
  8346.  
  8347. end
  8348.  
  8349.  
  8350.  
  8351. end
  8352.  
  8353.  
  8354.  
  8355. for k,v in pairs( AB.TheyHaveEyesEverywhere ) do
  8356.  
  8357. if( !IsValid( v ) ) then table.remove( AB.TheyHaveEyesEverywhere, k ) continue end
  8358.  
  8359. if( !v:GetObserverTarget() or ( v:GetObserverTarget() and v:GetObserverTarget() != me ) ) then
  8360.  
  8361. AB.ChatText( v:Nick().." has stopped spectating you!", Color(100,255,100) )
  8362.  
  8363. table.remove( AB.TheyHaveEyesEverywhere, k )
  8364.  
  8365. end
  8366.  
  8367. end
  8368.  
  8369.  
  8370.  
  8371. if AB.Vars.ChatSpam then
  8372.  
  8373. if AB.Vars.ChatSpamBind and !me:KeyDown(IN_WALK) then return end
  8374.  
  8375. local txt = AB.ChatSpamText
  8376.  
  8377. if AB.Vars.ChatSpamInsult then txt = AB.GenerateInsult() end
  8378.  
  8379. if AB.Vars.ChatSpamOOC then txt = "// "..txt end
  8380.  
  8381. txt = AB.FormatChatString( txt )
  8382.  
  8383. if AB.Vars.ChatSpamPM then
  8384.  
  8385. for _, p in pairs(player.GetAll()) do
  8386.  
  8387. if !AB.Vars.ChatSpamPMAdmins and AB.GetRank( p ) != ( "user" or "guest" or "player" ) then continue end
  8388.  
  8389. RunConsoleCommand("ulx", "psay", p:Nick(), txt)
  8390.  
  8391. end
  8392.  
  8393. else
  8394.  
  8395. RunConsoleCommand("say", txt)
  8396.  
  8397. end
  8398.  
  8399. end
  8400.  
  8401.  
  8402.  
  8403. if AB.Vars.DemoteSpam or AB.Vars.WantedSpam or AB.Vars.ULXVotekickSpam or AB.Vars.ULXVotebanSpam then
  8404.  
  8405. for k, v in RandomPairs(player.GetAll()) do
  8406.  
  8407. if AB.IsFriend( v ) or v == me then continue end
  8408.  
  8409. local fag1, fag2 = table.Random( demotereasons )
  8410.  
  8411. if AB.Vars.DemoteSpam then RunConsoleCommand( "darkrp", "demote", v:Nick(), fag1 ) end
  8412.  
  8413. if AB.Vars.WantedSpam then RunConsoleCommand( "darkrp", "wanted", v:Nick(), fag1 ) end
  8414.  
  8415. if AB.Vars.ULXVotekickSpam then RunConsoleCommand( "ulx", "votekick", v:Nick(), fag1 ) end
  8416.  
  8417. if AB.Vars.ULXVotebanSpam then RunConsoleCommand( "ulx", "voteban", v:Nick(), "0" ) end
  8418.  
  8419. end
  8420.  
  8421. end
  8422.  
  8423.  
  8424.  
  8425. if AB.Vars.FlashlightSpam then
  8426.  
  8427. if input.IsKeyDown(KEY_F) then me:ConCommand("impulse 100") end
  8428.  
  8429. end
  8430.  
  8431.  
  8432.  
  8433. if AB.IsTTT then AB.ScanForTraitors() end
  8434.  
  8435.  
  8436.  
  8437. AB.MemoryDebug["logic"] = gcinfo() - lmemfootprint
  8438.  
  8439.  
  8440.  
  8441. end
  8442.  
  8443. hook.Add("Think", "ab_logic", AB.Logic)
  8444.  
  8445.  
  8446.  
  8447.  
  8448.  
  8449.  
  8450.  
  8451. function AB.PKTube()
  8452.  
  8453. local oldwep = false
  8454.  
  8455. if !LocalPlayer():IsOnGround() then AB.ChatText( "You can't tube launch when you aren't on the ground!", Color(255,100,0) ) return end
  8456.  
  8457. if !LocalPlayer():HasWeapon("weapon_physgun") then AB.ChatText( "You don't have a physgun!", Color(255,100,0) ) return end
  8458.  
  8459. if LocalPlayer():GetActiveWeapon():GetClass() != "weapon_physgun" then RunConsoleCommand( "use", "weapon_physgun" ) oldwep = true end
  8460.  
  8461.  
  8462.  
  8463. AB.EyeAngles( LocalPlayer():EyeAngles() - Angle(-180,0,0) )
  8464.  
  8465. AB.ActionTimer( 0.05, function() RunConsoleCommand( "gm_spawn", "models/props_phx/construct/concrete_pipe01.mdl") end)
  8466.  
  8467. AB.ActionTimer( 0.05, function() AB.EyeAngles( LocalPlayer():EyeAngles() - Angle(120,0,0) ) end)
  8468.  
  8469. AB.ActionTimer( 0.1, function() RunConsoleCommand( "+attack") end)
  8470.  
  8471. AB.ActionTimer( 0.05, function() AB.ScrollDelta = 100 end)
  8472.  
  8473. AB.ActionTimer( 0.1, function() RunConsoleCommand( "-attack") AB.ScrollDelta = 0 end)
  8474.  
  8475. if oldwep then
  8476.  
  8477. AB.ActionTimer( 0.01, function() RunConsoleCommand( "lastinv") end)
  8478.  
  8479. end
  8480.  
  8481. AB.ActionTimer( 0.1, function() RunConsoleCommand( "undo") end, true)
  8482.  
  8483.  
  8484.  
  8485. end
  8486.  
  8487. concommand.Add("ace_pk_tubelaunch", AB.PKTube)
  8488.  
  8489.  
  8490.  
  8491. function AB.PK180()
  8492.  
  8493. AB.EyeAngles( Angle(LocalPlayer():EyeAngles().p, LocalPlayer():EyeAngles().y - 180, LocalPlayer():EyeAngles().r) )
  8494.  
  8495. end
  8496.  
  8497. concommand.Add("ace_pk_180", AB.PK180)
  8498.  
  8499.  
  8500.  
  8501. function AB.PK180Up()
  8502.  
  8503. --AB.EyeAngles( Angle(LocalPlayer():EyeAngles().p, LocalPlayer():EyeAngles().y - 180, LocalPlayer():EyeAngles().r) )
  8504.  
  8505. AB.EyeAngles( Angle( -LocalPlayer():EyeAngles().p, LocalPlayer():EyeAngles().y - 180, LocalPlayer():EyeAngles().r) )
  8506.  
  8507. RunConsoleCommand( "+jump")
  8508.  
  8509. timer.Simple(0.1, function() RunConsoleCommand( "-jump") end)
  8510.  
  8511. end
  8512.  
  8513. concommand.Add("ace_pk_180up", AB.PK180Up)
  8514.  
  8515.  
  8516.  
  8517. function AB.ClimbSwep()
  8518.  
  8519. local oldang = LocalPlayer():EyeAngles()
  8520.  
  8521. AB.EyeAngles( Angle( -LocalPlayer():EyeAngles().p, LocalPlayer():EyeAngles().y - 90, LocalPlayer():EyeAngles().r) )
  8522.  
  8523. timer.Simple(0.15, function() AB.EyeAngles( oldang ) end)
  8524.  
  8525. end
  8526.  
  8527. concommand.Add("ace_climbswep", AB.ClimbSwep)
  8528.  
  8529.  
  8530.  
  8531. function AB.EyeAngles( ang )
  8532.  
  8533. local ang = Angle(math.Clamp(ang.p, -90, 90), ang.y, ang.r)
  8534.  
  8535. ang:Normalize()
  8536.  
  8537. LocalPlayer():SetEyeAngles(ang)
  8538.  
  8539. end
  8540.  
  8541.  
  8542.  
  8543. local actiontime = 0
  8544.  
  8545.  
  8546.  
  8547. function AB.ActionTimer( delay, func, terminate )
  8548.  
  8549. terminate = terminate or false
  8550.  
  8551. actiontime = actiontime + delay + (LocalPlayer():Ping() / 1000)
  8552.  
  8553. timer.Simple( actiontime, func)
  8554.  
  8555. if terminate then actiontime = 0 end
  8556.  
  8557. end
  8558.  
  8559.  
  8560.  
  8561.  
  8562.  
  8563.  
  8564.  
  8565. function AB.CanSee( ply )
  8566.  
  8567. local Trace = util.TraceLine( {
  8568.  
  8569. start = LocalPlayer():GetShootPos(),
  8570.  
  8571. endpos = AB.FindTargetPosition( ply ),
  8572.  
  8573. mask = MASK_SHOT,
  8574.  
  8575. filter = { LocalPlayer(), ply }
  8576.  
  8577. } )
  8578.  
  8579.  
  8580.  
  8581. return !Trace.Hit
  8582.  
  8583. end
  8584.  
  8585.  
  8586.  
  8587.  
  8588.  
  8589. ------------------------------------------------------------------------PROPKILL UTILS--------------------------------------------------------------------------------------
  8590.  
  8591.  
  8592.  
  8593. function AB.PhysgunPickup( p, e )
  8594.  
  8595. if AB.Vars.DontTouchMeThere and e == LocalPlayer() then RunConsoleCommand( "kill" ) end
  8596.  
  8597. AB.HoldingProp = e
  8598.  
  8599. end
  8600.  
  8601.  
  8602.  
  8603. function AB.PhysgunDrop( p, e )
  8604.  
  8605. -- AB.HoldingProp = game.GetWorld()
  8606.  
  8607. end
  8608.  
  8609.  
  8610.  
  8611. hook.Add( "PhysgunPickup", "ab_physgun", AB.PhysgunPickup )
  8612.  
  8613. hook.Add( "PhysgunDrop", "ab_physgun", AB.PhysgunDrop )
  8614.  
  8615.  
  8616.  
  8617.  
  8618.  
  8619. ------------------------------------------------------------------------WEAPON INSPECTOR--------------------------------------------------------------------------------------
  8620.  
  8621.  
  8622.  
  8623.  
  8624.  
  8625.  
  8626.  
  8627.  
  8628.  
  8629.  
  8630.  
  8631.  
  8632.  
  8633.  
  8634.  
  8635.  
  8636.  
  8637. local function gaytext( parent, text, vpos, color )
  8638.  
  8639. local ABLabel = vgui.Create( "DLabel", parent )
  8640.  
  8641. ABLabel:SetFont( "TargetID" )
  8642.  
  8643. ABLabel:SetPos( 20, vpos)
  8644.  
  8645. ABLabel:SetColor( color )
  8646.  
  8647. ABLabel:SetText( text )
  8648.  
  8649. ABLabel:SizeToContents()
  8650.  
  8651. end
  8652.  
  8653.  
  8654.  
  8655. local overrides = {
  8656.  
  8657.  
  8658.  
  8659. ["weapon_crowbar"] = {
  8660.  
  8661. Damage = 25,
  8662.  
  8663. NumShots = 1,
  8664.  
  8665. ClipSize = 1,
  8666.  
  8667. Delay = 0.404
  8668.  
  8669. },
  8670.  
  8671.  
  8672.  
  8673. ["weapon_stunstick"] = {
  8674.  
  8675. Damage = 40,
  8676.  
  8677. NumShots = 1,
  8678.  
  8679. ClipSize = 1,
  8680.  
  8681. Delay = 0.81
  8682.  
  8683. },
  8684.  
  8685.  
  8686.  
  8687. ["weapon_pistol"] = {
  8688.  
  8689. Damage = 12,
  8690.  
  8691. NumShots = 1,
  8692.  
  8693. ClipSize = 18,
  8694.  
  8695. Ammo = "pistol",
  8696.  
  8697. Delay = 0.12,
  8698.  
  8699. },
  8700.  
  8701.  
  8702.  
  8703. ["weapon_357"] = {
  8704.  
  8705. Damage = 75,
  8706.  
  8707. NumShots = 1,
  8708.  
  8709. ClipSize = 6,
  8710.  
  8711. Ammo = "357",
  8712.  
  8713. Delay = 0.75,
  8714.  
  8715. },
  8716.  
  8717.  
  8718.  
  8719. ["weapon_smg1"] = {
  8720.  
  8721. Damage = 12,
  8722.  
  8723. NumShots = 1,
  8724.  
  8725. ClipSize = 45,
  8726.  
  8727. Ammo = "SMG1",
  8728.  
  8729. Delay = 0.075,
  8730.  
  8731. },
  8732.  
  8733.  
  8734.  
  8735. ["weapon_shotgun"] = {
  8736.  
  8737. Damage = 4,
  8738.  
  8739. NumShots = 7,
  8740.  
  8741. ClipSize = 6,
  8742.  
  8743. Ammo = "buckshot",
  8744.  
  8745. Delay = 0.9,
  8746.  
  8747. },
  8748.  
  8749.  
  8750.  
  8751. ["weapon_ar2"] = {
  8752.  
  8753. Damage = 11,
  8754.  
  8755. NumShots = 1,
  8756.  
  8757. ClipSize = 30,
  8758.  
  8759. Delay = 0.105,
  8760.  
  8761. },
  8762.  
  8763.  
  8764.  
  8765. ["weapon_crossbow"] = {
  8766.  
  8767. Damage = 100,
  8768.  
  8769. NumShots = 1,
  8770.  
  8771. ClipSize = 1,
  8772.  
  8773. Delay = 1.95,
  8774.  
  8775. },
  8776.  
  8777.  
  8778.  
  8779. ["weapon_rpg"] = {
  8780.  
  8781. Damage = 150,
  8782.  
  8783. NumShots = 1,
  8784.  
  8785. ClipSize = 1,
  8786.  
  8787. Delay = 2.2,
  8788.  
  8789. },
  8790.  
  8791.  
  8792.  
  8793. ["weapon_frag"] = {
  8794.  
  8795. Damage = 150,
  8796.  
  8797. NumShots = 1,
  8798.  
  8799. ClipSize = 1,
  8800.  
  8801. Delay = 1.95,
  8802.  
  8803. },
  8804.  
  8805.  
  8806.  
  8807. ["fas2_rem870"] = {
  8808.  
  8809. Delay = .86,
  8810.  
  8811. },
  8812.  
  8813.  
  8814.  
  8815. ["fas2_ks23"] = {
  8816.  
  8817. Delay = 1.11,
  8818.  
  8819. },
  8820.  
  8821.  
  8822.  
  8823. ["fas2_m67"] = {
  8824.  
  8825. Damage = 160,
  8826.  
  8827. Delay = 1.75,
  8828.  
  8829. },
  8830.  
  8831.  
  8832.  
  8833. }
  8834.  
  8835.  
  8836.  
  8837. local ammostrings = {
  8838.  
  8839. pistol = "HL2 Pistol",
  8840.  
  8841. smg1 = "HL2 SMG",
  8842.  
  8843. ar2 = "HL2 Pulse Rifle",
  8844.  
  8845. ["357"] = "HL2 Magnum",
  8846.  
  8847. buckshot = "HL2 Shotgun",
  8848.  
  8849. rpg_round = "HL2 Rocket",
  8850.  
  8851. }
  8852.  
  8853.  
  8854.  
  8855. function AB.GunMenu()
  8856.  
  8857. if GMenu then return end
  8858.  
  8859.  
  8860.  
  8861. local GMenu = vgui.Create("DFrame")
  8862.  
  8863. GMenu:SetSize(590,520)
  8864.  
  8865. GMenu:SetTitle("Inspecting Weapon")
  8866.  
  8867. GMenu:Center()
  8868.  
  8869. GMenu:MakePopup()
  8870.  
  8871.  
  8872.  
  8873. GMenu.Paint = function(panel, w, h)
  8874.  
  8875. surface.SetDrawColor( Color(50, 50, 90, 255) )
  8876.  
  8877. surface.DrawRect( 0, 0, w, h )
  8878.  
  8879. surface.SetDrawColor( Color(155, 155, 155, 255) )
  8880.  
  8881. surface.DrawOutlinedRect( 0, 0, w, h )
  8882.  
  8883. surface.DrawOutlinedRect( 1, 1, w - 2, h - 2 )
  8884.  
  8885. surface.SetDrawColor( Color(0, 0, 0, 255) )
  8886.  
  8887. surface.DrawRect( 10, 25, w - 20, h - 35 )
  8888.  
  8889. end
  8890.  
  8891.  
  8892.  
  8893. local gun = LocalPlayer():GetActiveWeapon()
  8894.  
  8895. if !gun:IsValid() then return end
  8896.  
  8897. local m9gay = false
  8898.  
  8899. local fas = false
  8900.  
  8901. local cw2 = false
  8902.  
  8903. if gun.Base == "bobs_gun_base" or gun.Base == "bobs_shotty_base" or gun.Base == "bobs_scoped_base" then m9gay = true end
  8904.  
  8905. if gun.Base == "fas2_base" or gun.Base == "fas2_base_shotgun" then fas = true end
  8906.  
  8907. if gun.Base == "cw_base" then cw2 = true end
  8908.  
  8909.  
  8910.  
  8911. gaytext( GMenu, "Weapon Name: "..gun:GetPrintName(), 30, Color(205,225,255,255) )
  8912.  
  8913. gaytext( GMenu, "Weapon Class: "..gun:GetClass(), 50, Color(105,225,255,255) )
  8914.  
  8915.  
  8916.  
  8917. //////////////////////////////// hl2 guns ////////////////////////////////
  8918.  
  8919.  
  8920.  
  8921. if !gun.Primary then gun.Primary = {} end
  8922.  
  8923.  
  8924.  
  8925. if overrides[gun:GetClass()] then
  8926.  
  8927. local tab = overrides[gun:GetClass()]
  8928.  
  8929. for k, v in pairs(tab) do
  8930.  
  8931. gun.Primary[k] = v
  8932.  
  8933. end
  8934.  
  8935.  
  8936.  
  8937. end
  8938.  
  8939.  
  8940.  
  8941. //////////////////////////////// weapon stat workarounds ////////////////////////////////
  8942.  
  8943.  
  8944.  
  8945. local delay = 0
  8946.  
  8947. if gun.Primary.Delay then
  8948.  
  8949. delay = gun.Primary.Delay
  8950.  
  8951. elseif m9gay then
  8952.  
  8953. delay = 60 / gun.Primary.RPM
  8954.  
  8955. elseif fas or cw2 then
  8956.  
  8957. delay = gun.FireDelay
  8958.  
  8959. end
  8960.  
  8961.  
  8962.  
  8963. local gdmg = 0
  8964.  
  8965. if gun.Primary.Damage then
  8966.  
  8967. gdmg = gun.Primary.Damage
  8968.  
  8969. elseif fas or cw2 then
  8970.  
  8971. gdmg = gun.Damage
  8972.  
  8973. end
  8974.  
  8975.  
  8976.  
  8977. local gnumshots = 1
  8978.  
  8979. if gun.Primary.NumShots then
  8980.  
  8981. gnumshots = gun.Primary.NumShots
  8982.  
  8983. elseif fas or cw2 then
  8984.  
  8985. gnumshots = gun.Shots or 1
  8986.  
  8987. end
  8988.  
  8989.  
  8990.  
  8991. local gcone = 0
  8992.  
  8993. if gun.Primary.Cone then
  8994.  
  8995. gcone = gun.Primary.Cone
  8996.  
  8997. elseif m9gay then
  8998.  
  8999. gcone = gun.Primary.Spread
  9000.  
  9001. elseif fas then
  9002.  
  9003. gcone = gun.HipCone or 0
  9004.  
  9005. elseif cw2 then
  9006.  
  9007. gcone = gun.HipSpread or 0
  9008.  
  9009. end
  9010.  
  9011.  
  9012.  
  9013. local grecoil = 0
  9014.  
  9015. if gun.Primary.Recoil then
  9016.  
  9017. grecoil = gun.Primary.Recoil
  9018.  
  9019. elseif m9gay then
  9020.  
  9021. grecoil = gun.Primary.KickUp
  9022.  
  9023. elseif fas then
  9024.  
  9025. grecoil = gun.Recoil or 0
  9026.  
  9027. end
  9028.  
  9029.  
  9030.  
  9031. local voff = 90
  9032.  
  9033.  
  9034.  
  9035. gaytext( GMenu, "Damage: "..(gdmg or "nil").." ( x"..(gnumshots or "nil").." ) -- ("..(gdmg * gnumshots).." Total)", voff, Color(255,225,155,255) )
  9036.  
  9037. voff = voff + 20
  9038.  
  9039.  
  9040.  
  9041.  
  9042.  
  9043. if gun.Primary.ClipSize then
  9044.  
  9045. if gun.Primary.ClipSize == -1 then gun.Primary.ClipSize = 1 end
  9046.  
  9047. gaytext( GMenu, "Damage Per Mag: "..(gdmg * gnumshots) * gun.Primary.ClipSize, voff, Color(255,205,105,255) )
  9048.  
  9049. voff = voff + 20
  9050.  
  9051. end
  9052.  
  9053.  
  9054.  
  9055. gaytext( GMenu, "Damage Per Second: "..math.ceil(1 / delay * (gdmg * gnumshots)), voff, Color(255,155,85,255) )
  9056.  
  9057. voff = voff + 20
  9058.  
  9059.  
  9060.  
  9061. if gun.Primary.ClipSize then
  9062.  
  9063. gaytext( GMenu, "Magazine: "..(gun.Primary.ClipSize or "No Magazine"), voff, Color(255,195,195,255) )
  9064.  
  9065. voff = voff + 20
  9066.  
  9067.  
  9068.  
  9069. gaytext( GMenu, "Magdump Time: "..math.Round(gun.Primary.ClipSize * delay, 3).."s", voff, Color(255,95,155,255) )
  9070.  
  9071. voff = voff + 20
  9072.  
  9073. end
  9074.  
  9075.  
  9076.  
  9077. gaytext( GMenu, "Accuracy: "..(10 - (gcone * 100) ), voff, Color(255,255,155,255) )
  9078.  
  9079. voff = voff + 20
  9080.  
  9081.  
  9082.  
  9083. if fas then
  9084.  
  9085. gaytext( GMenu, "Accuracy (Aiming): "..(10 - (gun.AimCone or 0 * 100) ), voff, Color(155,255,155,255) )
  9086.  
  9087. voff = voff + 20
  9088.  
  9089. end
  9090.  
  9091. if cw2 then
  9092.  
  9093. gaytext( GMenu, "Accuracy (Aiming): "..(10 - (gun.AimSpread or 0 * 100) ), voff, Color(155,255,155,255) )
  9094.  
  9095. voff = voff + 20
  9096.  
  9097. end
  9098.  
  9099.  
  9100.  
  9101.  
  9102.  
  9103. gaytext( GMenu, "Fire Rate: "..math.Round(delay, 3).." ( "..math.ceil(60 / delay).." Rounds Per Min )", voff, Color(255,255,155,255) )
  9104.  
  9105. voff = voff + 20
  9106.  
  9107.  
  9108.  
  9109. --gaytext( GMenu, "Recoil: "..grecoil.." ( "..math.Round((grecoil * 10) * 1 / delay, 1).." recoil per second ) ", voff, Color(205,255,125,255) )
  9110.  
  9111. --voff = voff + 20
  9112.  
  9113.  
  9114.  
  9115.  
  9116.  
  9117. if gun.Primary.Ammo then
  9118.  
  9119. local ammotyperaw = gun.Primary.Ammo
  9120.  
  9121. local ammotype = string.lower(gun.Primary.Ammo)
  9122.  
  9123. if ammostrings[ammotype] then ammotyperaw = ammostrings[ammotype] end
  9124.  
  9125. gaytext( GMenu, "Ammo Type: "..ammotyperaw, voff, Color(105,255,125,255) )
  9126.  
  9127. voff = voff + 20
  9128.  
  9129. end
  9130.  
  9131.  
  9132.  
  9133. if m9gay then gaytext( GMenu, "Damage and TTK stats inaccurate due to m9k double penetration bug", voff, Color(255,0,0,255) ) end
  9134.  
  9135. voff = voff + 40
  9136.  
  9137.  
  9138.  
  9139. gaytext( GMenu, "Shots to Kill: "..math.ceil(50 / (gdmg * gnumshots) ).."x headshots -- "..math.ceil(100 / (gdmg * gnumshots)).."x torso shots -- "..math.ceil(400 / (gdmg * gnumshots)).."x limb shots", voff, Color(255,125,155,255) )
  9140.  
  9141. voff = voff + 20
  9142.  
  9143. gaytext( GMenu, "Shots to Kill (Armor): "..math.ceil(100 / (gdmg * gnumshots) ).."x headshots -- "..math.ceil(200 / (gdmg * gnumshots)).."x torso shots -- "..math.ceil(800 / (gdmg * gnumshots)).."x limb shots", voff, Color(255,125,255,255) )
  9144.  
  9145. voff = voff + 40
  9146.  
  9147.  
  9148.  
  9149. local ttk = (delay * math.ceil(100 / (gdmg * gnumshots) )) - delay
  9150.  
  9151. local ttk2 = (delay * math.ceil(50 / (gdmg * gnumshots) )) - delay
  9152.  
  9153. local ttk3 = (delay * math.ceil(400 / (gdmg * gnumshots) )) - delay
  9154.  
  9155. local ttk4 = (delay * math.ceil(200 / (gdmg * gnumshots) )) - delay
  9156.  
  9157. local ttk5 = (delay * math.ceil(800 / (gdmg * gnumshots) )) - delay
  9158.  
  9159. gaytext( GMenu, "Time to Kill: "..math.Round(ttk2, 3).."s (Head) -- "..math.Round(ttk, 3).."s (Body) -- "..math.Round(ttk3, 3).."s (Limb)", voff, Color(205,255,185,255) )
  9160.  
  9161. voff = voff + 20
  9162.  
  9163. gaytext( GMenu, "Time to Kill (Armored): "..math.Round(ttk, 3).."s (Head) -- "..math.Round(ttk4, 3).."s (Body) -- "..math.Round(ttk5, 3).."s (Limb)", voff, Color(155,155,255,255) )
  9164.  
  9165. voff = voff + 20
  9166.  
  9167.  
  9168.  
  9169.  
  9170.  
  9171.  
  9172.  
  9173. end
  9174.  
  9175. concommand.Add("ace_inspectweapon", AB.GunMenu)
  9176.  
  9177.  
  9178.  
  9179.  
  9180.  
  9181.  
  9182.  
  9183.  
  9184.  
  9185.  
  9186.  
  9187. ------------------------------------------------------------------------AIMBOT UTIL FUNCTIONS--------------------------------------------------------------------------------------
  9188.  
  9189.  
  9190.  
  9191.  
  9192.  
  9193.  
  9194.  
  9195. -- get this from a better place fucknuts
  9196.  
  9197. local OEyeAngles = OEyeAngles or FindMetaTable( "Player" ).SetEyeAngles
  9198.  
  9199. FindMetaTable( "Player" ).SetEyeAngles = function( self, angle )
  9200.  
  9201. if ( string.find( string.lower( debug.getinfo( 2 ).short_src ), "/weapons/" ) ) and AB.Vars.NoRecoil then return end
  9202.  
  9203. OEyeAngles( self, angle )
  9204.  
  9205. end
  9206.  
  9207.  
  9208.  
  9209. local shitweapons = {
  9210.  
  9211. "weapon_physgun",
  9212.  
  9213. "weapon_physcannon",
  9214.  
  9215. "weapon_bugbait",
  9216.  
  9217. "weapon_fists",
  9218.  
  9219. "gmod_camera",
  9220.  
  9221. "gmod_tool",
  9222.  
  9223. "weapon_medkit",
  9224.  
  9225. "weapon_zm_carry",
  9226.  
  9227. "weapon_ttt_unarmed",
  9228.  
  9229. }
  9230.  
  9231. -- make sure its a non spastic weapon to aimbot/triggerbot with
  9232.  
  9233. function AB.CanBotShoot( wep )
  9234.  
  9235. if !wep:IsValid() then return end
  9236.  
  9237. if table.HasValue( shitweapons, wep:GetClass() ) then return false end
  9238.  
  9239. return true
  9240.  
  9241. end
  9242.  
  9243.  
  9244.  
  9245. function AB.GetView()
  9246.  
  9247. return AB.ViewAngle * 1
  9248.  
  9249. end
  9250.  
  9251.  
  9252.  
  9253. function AB.FixView()
  9254.  
  9255. if !AB.Vars.Aimbot then return end
  9256.  
  9257.  
  9258.  
  9259. local ply = LocalPlayer()
  9260.  
  9261. if !ply:IsValid() then return end
  9262.  
  9263.  
  9264.  
  9265. AB.ViewAngle = ply:EyeAngles()
  9266.  
  9267. end
  9268.  
  9269.  
  9270.  
  9271. local sensitivity = 0.022
  9272.  
  9273. function AB.RotateView(cmd)
  9274.  
  9275. AB.ViewAngle.p = math.Clamp(AB.ViewAngle.p + (cmd:GetMouseY() * sensitivity), -89, 89)
  9276.  
  9277. AB.ViewAngle.y = math.NormalizeAngle(AB.ViewAngle.y + (cmd:GetMouseX() * sensitivity * -1))
  9278.  
  9279. end
  9280.  
  9281.  
  9282.  
  9283. -- fov based targeting shit
  9284.  
  9285. function AB.GetAngleFromCrosshair( ply )
  9286.  
  9287. local Ang = (AB.FindTargetPosition( ply ) - LocalPlayer():EyePos() ):Angle()
  9288.  
  9289. local myangles = LocalPlayer():EyeAngles()
  9290.  
  9291. if isangle( AB.InternalFakeAngles ) then myangles = AB.InternalFakeAngles end
  9292.  
  9293. local DiffX = math.abs( math.NormalizeAngle( myangles.p - Ang.p ) )
  9294.  
  9295. local DiffY = math.abs( math.NormalizeAngle( myangles.y - Ang.y ) )
  9296.  
  9297. return DiffX, DiffY
  9298.  
  9299. end
  9300.  
  9301.  
  9302.  
  9303. function AB.GetDirtyAngleFromCrosshair( ply )
  9304.  
  9305. local Ang = ( (ply:GetPos() + Vector( 0, 0, 35 ) ) - LocalPlayer():EyePos() ):Angle()
  9306.  
  9307. local myangles = LocalPlayer():EyeAngles()
  9308.  
  9309. if isangle( AB.InternalFakeAngles ) then myangles = AB.InternalFakeAngles end
  9310.  
  9311. local DiffX = math.abs( math.NormalizeAngle( myangles.p - Ang.p ) )
  9312.  
  9313. local DiffY = math.abs( math.NormalizeAngle( myangles.y - Ang.y ) )
  9314.  
  9315. return DiffX + DiffY
  9316.  
  9317. end
  9318.  
  9319.  
  9320.  
  9321. function AB.InFOV( ply )
  9322.  
  9323. local DiffX, DiffY = AB.GetAngleFromCrosshair( ply )
  9324.  
  9325. return ( DiffX <= AB.NumberVars.AimbotMaxFOV and DiffY <= AB.NumberVars.AimbotMaxFOV )
  9326.  
  9327. end
  9328.  
  9329.  
  9330.  
  9331. function AB.FindTargetPosition( ent )
  9332.  
  9333. if !ent:IsValid() then return end
  9334.  
  9335.  
  9336.  
  9337. if !AB.Vars.AimbotTargetMode then return ent:LocalToWorld( ent:OBBCenter() ) end
  9338.  
  9339.  
  9340.  
  9341. if ent:GetModel() == "models/crow.mdl" then return ent:LocalToWorld( Vector(0, 0, 5) ) end -- rape faggots that are in crow form, useful in gmstranded or zombie survival
  9342.  
  9343.  
  9344.  
  9345. if ent:IsPlayer() then
  9346.  
  9347. local head = ent:LookupAttachment( "eyes" )
  9348.  
  9349. if head then
  9350.  
  9351. local pos = ent:GetAttachment(head)
  9352.  
  9353. if pos then
  9354.  
  9355. return pos.Pos + ent:EyeAngles():Forward() * -1.5
  9356.  
  9357. end
  9358.  
  9359. end
  9360.  
  9361. end
  9362.  
  9363.  
  9364.  
  9365. local bone = AB.AimbotBone
  9366.  
  9367. local head = ent:LookupBone( bone )
  9368.  
  9369. if head then
  9370.  
  9371. local pos = ent:GetBonePosition( head )
  9372.  
  9373. if pos then
  9374.  
  9375. return pos
  9376.  
  9377. end
  9378.  
  9379. end
  9380.  
  9381.  
  9382.  
  9383. return ent:LocalToWorld( ent:OBBCenter() )
  9384.  
  9385. end
  9386.  
  9387.  
  9388.  
  9389. function AB.CalcTargetPosition( ent )
  9390.  
  9391. local targetPos = AB:FindTargetPosition( ent )
  9392.  
  9393.  
  9394.  
  9395. if LocalPlayer():IsValid() and LocalPlayer():GetActiveWeapon():IsValid() and LocalPlayer():GetActiveWeapon():GetClass() == "weapon_crossbow" then
  9396.  
  9397. targetPos = AB:PredictProjectileWeapons( ply, ent, targetPos ) or targetPos
  9398.  
  9399. end
  9400.  
  9401.  
  9402.  
  9403. return targetPos
  9404.  
  9405. end
  9406.  
  9407.  
  9408.  
  9409.  
  9410.  
  9411. function AB.PredictProjectileWeapons( ply, target, targetPos )
  9412.  
  9413. -- local dist = VecM["Length"](targetPos - PlyM["GetShootPos"](ply))
  9414.  
  9415. local dist = Vector(targetPos - LocalPlayer():GetShootPos()):Length()
  9416.  
  9417. local time = (dist / 3500) + 0.05
  9418.  
  9419. targetPos = targetPos + (target:GetVelocity() * time)
  9420.  
  9421.  
  9422.  
  9423. -- local mul = 0.0075
  9424.  
  9425. //targetPos = targetPos - (e["GetVelocity"](ply) * mul)
  9426.  
  9427.  
  9428.  
  9429. return targetPos
  9430.  
  9431. end
  9432.  
  9433.  
  9434.  
  9435. function AB.CanTargetPlayer( ply )
  9436.  
  9437. if !AB.Vars.TargetFriends and AB.IsFriend( ply ) then return false end
  9438.  
  9439. if !AB.Vars.TargetHighlighted and AB.IsTarget( ply ) then return false end
  9440.  
  9441. if !AB.Vars.TargetAdmins and AB.GetRank( ply ) != ( "user" or "guest" or "player" ) then return false end
  9442.  
  9443. if !AB.Vars.TargetSameTeam and ply:Team() == LocalPlayer():Team() then return false end
  9444.  
  9445. if !AB.Vars.TargetNoclippers and ply:GetMoveType() == MOVETYPE_NOCLIP then return false end
  9446.  
  9447. if DarkRP and AB.IsBabyGod( ply ) then return false end
  9448.  
  9449. return true
  9450.  
  9451. end
  9452.  
  9453.  
  9454.  
  9455. local boners = {
  9456.  
  9457. "ValveBiped.Bip01_Head1",
  9458.  
  9459. "ValveBiped.Bip01_Spine2",
  9460.  
  9461. "ValveBiped.Bip01_Pelvis",
  9462.  
  9463. "ValveBiped.Bip01_R_Forearm",
  9464.  
  9465. "ValveBiped.Bip01_L_Forearm",
  9466.  
  9467. "ValveBiped.Bip01_R_Calf",
  9468.  
  9469. "ValveBiped.Bip01_L_Calf",
  9470.  
  9471. "ValveBiped.Bip01_R_Foot",
  9472.  
  9473. "ValveBiped.Bip01_L_Foot",
  9474.  
  9475. }
  9476.  
  9477.  
  9478.  
  9479.  
  9480.  
  9481.  
  9482.  
  9483. function AB.PrepareForAStomping( ply )
  9484.  
  9485. if !ply:IsValid() then return false end
  9486.  
  9487.  
  9488.  
  9489. if ply:GetModel() == "models/crow.mdl" and AB.PlayerVisible( ply, ply:LocalToWorld( Vector(0, 0, 5) ) ) then return ply:LocalToWorld( Vector(0, 0, 5) ) end
  9490.  
  9491.  
  9492.  
  9493. if AB.Vars.AimbotTargetMode then
  9494.  
  9495. -- right in the kisser
  9496.  
  9497. local head = ply:LookupAttachment( "eyes" )
  9498.  
  9499. if head then
  9500.  
  9501. local pos = ply:GetAttachment(head)
  9502.  
  9503. if pos then
  9504.  
  9505. local tpoz = pos.Pos + ply:EyeAngles():Forward() * -1.5
  9506.  
  9507. if AB.PlayerVisible( ply, tpoz ) then return tpoz end
  9508.  
  9509. end
  9510.  
  9511. end
  9512.  
  9513.  
  9514.  
  9515. else
  9516.  
  9517. -- b aim
  9518.  
  9519. local head = ply:LookupBone( "ValveBiped.Bip01_Pelvis" )
  9520.  
  9521. if head then
  9522.  
  9523. local poz = ply:GetBonePosition( head )
  9524.  
  9525. if poz then
  9526.  
  9527. if AB.PlayerVisible( ply, poz ) then return poz end
  9528.  
  9529. end
  9530.  
  9531. end
  9532.  
  9533. end
  9534.  
  9535.  
  9536.  
  9537. if AB.Vars.AimbotAdaptiveTarget then
  9538.  
  9539. local returnpos = -1
  9540.  
  9541. for _, b in ipairs( boners ) do
  9542.  
  9543. local head = ply:LookupBone( b )
  9544.  
  9545. if head then
  9546.  
  9547. local poz = ply:GetBonePosition( head )
  9548.  
  9549. if poz then
  9550.  
  9551. if AB.PlayerVisible( ply, poz ) then returnpos = poz break end
  9552.  
  9553. end
  9554.  
  9555. end
  9556.  
  9557. end
  9558.  
  9559. if isvector( returnpos ) then return returnpos end
  9560.  
  9561. end
  9562.  
  9563.  
  9564.  
  9565.  
  9566.  
  9567. local lastresort = ply:LocalToWorld( ply:OBBCenter() )
  9568.  
  9569. if AB.PlayerVisible( ply, lastresort ) then return lastresort end
  9570.  
  9571.  
  9572.  
  9573. return false
  9574.  
  9575. end
  9576.  
  9577.  
  9578.  
  9579.  
  9580.  
  9581.  
  9582.  
  9583.  
  9584.  
  9585. function AB.PlayerVisible( ply, testpos )
  9586.  
  9587. if !ply:IsValid() or !ply:IsPlayer() then return false end
  9588.  
  9589.  
  9590.  
  9591. local td = {start = LocalPlayer():GetShootPos(), endpos = testpos, filter = {LocalPlayer(), ply}, mask = MASK_SHOT}
  9592.  
  9593. local tr = util.TraceLine(td)
  9594.  
  9595.  
  9596.  
  9597. --if tr.Entity:IsValid() and tr.Entity == ply then return true end
  9598.  
  9599. if !tr.Hit then return true end
  9600.  
  9601. if AB.Vars.AimbotWallbanger and AB.CanWeaponPenetrate( tr, ply ) then return true end
  9602.  
  9603. return false
  9604.  
  9605.  
  9606.  
  9607. end
  9608.  
  9609.  
  9610.  
  9611. -- sorta like above but doesnt require a testpos
  9612.  
  9613. function AB.PlayerVisiblePK( source, ply )
  9614.  
  9615. if !ply:IsValid() or !ply:IsPlayer() then return false end
  9616.  
  9617.  
  9618.  
  9619. local td = {start = source, endpos = ply:LocalToWorld( ply:OBBCenter() ), filter = function( e ) return ( e != LocalPlayer() and e != ply and e:GetClass() != "prop_physics") end, mask = MASK_SHOT}
  9620.  
  9621. local tr = util.TraceLine(td)
  9622.  
  9623.  
  9624.  
  9625. --if tr.Entity:IsValid() and tr.Entity == ply then return true, tr.HitPos end
  9626.  
  9627. if !tr.Hit then return true, ply:LocalToWorld( ply:OBBCenter() ) end
  9628.  
  9629. return false, Vector( 0,0,0 )
  9630.  
  9631.  
  9632.  
  9633. end
  9634.  
  9635.  
  9636.  
  9637.  
  9638.  
  9639. -- returns the closest alive player, if visible is true then it will return the closest alive and visible player
  9640.  
  9641. function AB.GetClosestPlayer()
  9642.  
  9643. local nearestEnt = game.GetWorld()
  9644.  
  9645. local mypos = LocalPlayer():GetPos()
  9646.  
  9647. local plytab = player.GetAll()
  9648.  
  9649. table.sort( plytab, function( a, b ) return a:GetPos():Distance( mypos ) < b:GetPos():Distance( mypos ) end )
  9650.  
  9651.  
  9652.  
  9653. for _, ent in ipairs( plytab ) do
  9654.  
  9655. if ent == LocalPlayer() then continue end
  9656.  
  9657. if !ent:IsValid() or AB.IsDead( ent ) or !AB.CanTargetPlayer( ent ) or (AB.ToMetric( LocalPlayer():GetPos():Distance( ent:GetPos() ) ) >= AB.NumberVars.AimbotDist ) then continue end
  9658.  
  9659. nearestEnt = ent
  9660.  
  9661. break
  9662.  
  9663. end
  9664.  
  9665.  
  9666.  
  9667. return nearestEnt
  9668.  
  9669. end
  9670.  
  9671.  
  9672.  
  9673. -- returns the closest alive player to your crosshair, visible to return only visible players
  9674.  
  9675. function AB.GetClosestToCursor( visible )
  9676.  
  9677. local nearestEnt = game.GetWorld()
  9678.  
  9679. local fovtotal = AB.NumberVars.AimbotMaxFOV or 0
  9680.  
  9681. if fovtotal > 179 then return AB.GetClosestPlayer() end -- kick it into ragebot mode
  9682.  
  9683. local mypos = LocalPlayer():GetPos()
  9684.  
  9685. local plytab = player.GetAll()
  9686.  
  9687.  
  9688.  
  9689. table.sort( plytab, function( a, b ) return AB.GetDirtyAngleFromCrosshair( a ) < AB.GetDirtyAngleFromCrosshair( b ) end )
  9690.  
  9691.  
  9692.  
  9693. for _, ent in ipairs( plytab ) do
  9694.  
  9695. if ent == LocalPlayer() then continue end
  9696.  
  9697. -- we've exceeded our max fov so just stop looping here
  9698.  
  9699. if !AB.InFOV( ent ) then break end
  9700.  
  9701. -- save a bunch of useless calcs
  9702.  
  9703. if !ent:IsValid() or AB.IsDead( ent ) or !AB.CanTargetPlayer( ent ) or (AB.ToMetric( LocalPlayer():GetPos():Distance( ent:GetPos() ) ) >= AB.NumberVars.AimbotDist ) then continue end
  9704.  
  9705. nearestEnt = ent
  9706.  
  9707. break
  9708.  
  9709. end
  9710.  
  9711.  
  9712.  
  9713.  
  9714.  
  9715. return nearestEnt
  9716.  
  9717. end
  9718.  
  9719.  
  9720.  
  9721.  
  9722.  
  9723. gameevent.Listen( "entity_killed" )
  9724.  
  9725. hook.Add( "entity_killed", "ace_propkilldetector", function( data )
  9726.  
  9727. local inflictor_index = data.entindex_inflictor
  9728.  
  9729. local attacker_index = data.entindex_attacker
  9730.  
  9731. local damagebits = data.damagebits
  9732.  
  9733. local victim_index = data.entindex_killed
  9734.  
  9735.  
  9736.  
  9737. local ply = "nobody?"
  9738.  
  9739. local retard = game.GetWorld()
  9740.  
  9741. local atk = "the map"
  9742.  
  9743. local wep = "unknown weapon"
  9744.  
  9745. local killah = game.GetWorld()
  9746.  
  9747. local inflictor = ents.GetByIndex(inflictor_index)
  9748.  
  9749.  
  9750.  
  9751. for _, p in pairs(player.GetAll()) do
  9752.  
  9753. if p:EntIndex() == victim_index then ply = p:Nick() retard = p end
  9754.  
  9755. if p:EntIndex() == attacker_index then
  9756.  
  9757. atk = p:Nick()
  9758.  
  9759. killah = p
  9760.  
  9761. if p:GetActiveWeapon() and p:GetActiveWeapon():IsValid() then wep = p:GetActiveWeapon():GetPrintName() end
  9762.  
  9763. end
  9764.  
  9765. end
  9766.  
  9767.  
  9768.  
  9769. if AB.Vars.DeathTaunts and retard == LocalPlayer() then LocalPlayer():ConCommand( "ace_chatspam_once" ) end
  9770.  
  9771. if AB.Vars.NewLifeRule and retard == LocalPlayer() then LocalPlayer():ConCommand( "ace_random_rpname" ) end
  9772.  
  9773.  
  9774.  
  9775. if attacker_index == victim_index then AB.DebugLog( ply.." necked himself", Color(180,150,150) ) if AB.Vars.NotifyKills then AB.ChatText( ply.." necked himself", Color(255,155,105) ) end return end
  9776.  
  9777. if inflictor:IsValid() and inflictor:GetClass() == "prop_physics" then
  9778.  
  9779. AB.DebugLog( ply.." got crushed by a prop!", Color(180,150,150) )
  9780.  
  9781. if AB.Vars.NotifyKills then AB.ChatText( ply.." got crushed by a prop!", Color(255,155,105) ) end
  9782.  
  9783. return
  9784.  
  9785. end
  9786.  
  9787.  
  9788.  
  9789. AB.DebugLog( atk.." killed "..ply.." with a "..wep, Color(200,150,150) )
  9790.  
  9791. if AB.Vars.NotifyKills then AB.ChatText( atk.." killed "..ply.." with a "..wep, Color(255,155,105) ) end
  9792.  
  9793.  
  9794.  
  9795. if AB.Vars.KillTaunts and retard != LocalPlayer() and killah == LocalPlayer() then LocalPlayer():ConCommand( "say "..AB.GenerateInsult4() ) end
  9796.  
  9797. /*
  9798.  
  9799. local ply = "nobody"
  9800.  
  9801. local prop = "nothing"
  9802.  
  9803.  
  9804.  
  9805. for k, v in pairs(ents.GetAll()) do
  9806.  
  9807. if v:EntIndex() == victim_index then ply = v end
  9808.  
  9809. if (v:GetClass() == "prop_physics" or string.find(v:GetClass(), "gmod_") or string.find(v:GetClass(), "wire_") ) and v:EntIndex() == attacker_index then prop = v end
  9810.  
  9811. end
  9812.  
  9813.  
  9814.  
  9815. if !FPP then return end
  9816.  
  9817.  
  9818.  
  9819. if ply == "nobody" or prop == "nothing" then return end
  9820.  
  9821. if !FPP.entGetOwner( prop ):IsValid() then return end
  9822.  
  9823.  
  9824.  
  9825. AB.DebugLog( FPP.entGetOwner( prop ):Nick().." propkilled "..ply:Nick().." with a "..prop:GetClass().." ("..prop:GetModel()..")", Color(150,150,55) )
  9826.  
  9827. */
  9828.  
  9829.  
  9830.  
  9831. end )
  9832.  
  9833.  
  9834.  
  9835. gameevent.Listen( "player_connect" )
  9836.  
  9837. hook.Add( "player_connect", "ace_playerconnected", function( data )
  9838.  
  9839. AB.DebugLog( data.name .. " ( ".. data.networkid.." ) has connected to the server.", Color(150,150,150) )
  9840.  
  9841. end )
  9842.  
  9843.  
  9844.  
  9845. gameevent.Listen( "player_hurt" )
  9846.  
  9847. hook.Add( "player_hurt", "crosshair_readinjuries", function( data )
  9848.  
  9849. if data.attacker == LocalPlayer():UserID() then AB.CrossHairAlpha = 255 end
  9850.  
  9851. end )
  9852.  
  9853.  
  9854.  
  9855. gameevent.Listen( "player_disconnect" )
  9856.  
  9857. hook.Add( "player_disconnect", "ace_playerleave", function( data )
  9858.  
  9859. timer.Simple( 0.5, function() AB.RemoveInvalidFriends() end )
  9860.  
  9861. AB.DebugLog( data.name .. " ( ".. data.networkid.." ) has disconnected from the server. ( ".. data.reason .." )", Color(150,150,150) )
  9862.  
  9863. end )
  9864.  
  9865.  
  9866.  
  9867.  
  9868.  
  9869.  
  9870.  
  9871. AB.DebugLog( "Acebot multihack initialized...", Color(200,200,255) )
  9872.  
  9873. AB.DebugLog( "Version: "..AB.Version, Color(200,200,255) )
  9874.  
  9875.  
  9876.  
  9877. if ULib then
  9878.  
  9879. AB.DebugLog( "ULX overrides detected, repairing hook system...", Color(150,250,150) )
  9880.  
  9881. AB.DebugLog( "Hook system successfully repaired", Color(150,250,150) )
  9882.  
  9883. end
  9884.  
  9885.  
  9886.  
  9887. function AB.InitPostEntity()
  9888.  
  9889. -- need a timer to give the server time to send shit to us otherwise this only works on shit thats in the same PVS area as us
  9890.  
  9891.  
  9892.  
  9893. timer.Simple( 1, function()
  9894.  
  9895. AB.AddConnectedFriends()
  9896.  
  9897. if gmod.GetGamemode().Name == "Trouble in Terrorist Town" then
  9898.  
  9899. AB.IsTTT = true
  9900.  
  9901. hook.Add( "TTTBeginRound", "ab_clearTlist", AB.ClearTraitors)
  9902.  
  9903. end
  9904.  
  9905.  
  9906.  
  9907. end)
  9908.  
  9909.  
  9910.  
  9911. end
  9912.  
  9913. hook.Add( "InitPostEntity", "ab_init", AB.InitPostEntity)
  9914.  
  9915.  
  9916.  
  9917.  
  9918.  
  9919. concommand.Add("aegis_printlogs", function() AB.ChatText( "aegis_printlogs is deprecated, use aegis_view_anticheats instead", Color(255,205,205) ) end)
  9920.  
  9921.  
  9922.  
  9923. concommand.Add("aegis_dumpnwstrings", function()
  9924.  
  9925. local netstrings = {}
  9926.  
  9927. for i = 1, 9999 do
  9928.  
  9929. local s = util.NetworkIDToString( i )
  9930.  
  9931. if s then print( "[aegis] NetChannel "..i.." = "..s ) else break end
  9932.  
  9933. end
  9934.  
  9935. end)
  9936.  
  9937.  
  9938.  
  9939. function AB.DumpHookTable( p, cmd, args )
  9940.  
  9941. local hks = args[1]
  9942.  
  9943. local hooktable = hook.GetTable()
  9944.  
  9945. if !hks or hks == "" then
  9946.  
  9947. for k, v in pairs( hooktable ) do
  9948.  
  9949. print( k.." = "..table.Count( v ).." hooks" )
  9950.  
  9951. end
  9952.  
  9953. elseif !hooktable[hks] then print( "Bad hook name! get it right you stupid fucking faggot") return
  9954.  
  9955. else
  9956.  
  9957. for k, v in pairs( hooktable[hks] ) do
  9958.  
  9959. print( k.." = "..debug.getinfo( v ).source.." lines: "..debug.getinfo( v ).linedefined.." - "..debug.getinfo( v ).lastlinedefined )
  9960.  
  9961. end
  9962.  
  9963. end
  9964.  
  9965. end
  9966.  
  9967. concommand.Add( "aegis_dumphooks", AB.DumpHookTable )
  9968.  
  9969.  
  9970.  
  9971. /*
  9972.  
  9973. function AB.SetRotateAngle( p, cmd, arg )
  9974.  
  9975. if !arg[1] or !isnumber(arg[1]) then return end
  9976.  
  9977. AB.NumberVars.PKRotateAngle = tonumber(arg[1])
  9978.  
  9979. end
  9980.  
  9981.  
  9982.  
  9983. concommand.Add( "ace_180up_vertical_angle", AB.SetRotateAngle )
  9984.  
  9985. */
  9986.  
  9987.  
  9988.  
  9989. local namesf = {
  9990.  
  9991. "Joe",
  9992.  
  9993. "John",
  9994.  
  9995. "Jack",
  9996.  
  9997. "Barry",
  9998.  
  9999. "Chris",
  10000.  
  10001. "Christopher",
  10002.  
  10003. "Michael",
  10004.  
  10005. "David",
  10006.  
  10007. "Thomas",
  10008.  
  10009. "Paul",
  10010.  
  10011. "Tony",
  10012.  
  10013. "Mark",
  10014.  
  10015. "Cooper",
  10016.  
  10017. "Jared",
  10018.  
  10019. "James",
  10020.  
  10021. "Jimmy",
  10022.  
  10023. "Bob",
  10024.  
  10025. "Robert",
  10026.  
  10027. "Riley",
  10028.  
  10029. "William",
  10030.  
  10031. "Will",
  10032.  
  10033. "Donald",
  10034.  
  10035. "George",
  10036.  
  10037. "Ken",
  10038.  
  10039. "Steve",
  10040.  
  10041. "Bruce",
  10042.  
  10043. "Brian",
  10044.  
  10045. "Chad",
  10046.  
  10047. "Anthony",
  10048.  
  10049. "Tim",
  10050.  
  10051. "Eddie",
  10052.  
  10053. "Daniel",
  10054.  
  10055. "Larry",
  10056.  
  10057. "Jeff",
  10058.  
  10059. "Justin",
  10060.  
  10061. "Adam",
  10062.  
  10063. "Ralph",
  10064.  
  10065. "Brandon",
  10066.  
  10067. "Xavier",
  10068.  
  10069. "Greg",
  10070.  
  10071. "Gordon",
  10072.  
  10073. "Scott",
  10074.  
  10075. "Taine",
  10076.  
  10077. "Howie",
  10078.  
  10079. "Morgan",
  10080.  
  10081. "Curtis",
  10082.  
  10083. "Dwayne",
  10084.  
  10085. "Steven",
  10086.  
  10087. "Peter",
  10088.  
  10089. "Kevin",
  10090.  
  10091. "Coleman",
  10092.  
  10093. "Garry",
  10094.  
  10095. }
  10096.  
  10097.  
  10098.  
  10099. local namesfem = {
  10100.  
  10101. "Kate",
  10102.  
  10103. "Katie",
  10104.  
  10105. "Jane",
  10106.  
  10107. "Charlotte",
  10108.  
  10109. "Olivia",
  10110.  
  10111. "Chloe",
  10112.  
  10113. "Amelia",
  10114.  
  10115. "Isabel",
  10116.  
  10117. "Elise",
  10118.  
  10119. "Sophie",
  10120.  
  10121. "Scarlett",
  10122.  
  10123. "Lily",
  10124.  
  10125. "Lucy",
  10126.  
  10127. "Hannah",
  10128.  
  10129. "Evelyn",
  10130.  
  10131. "Willow",
  10132.  
  10133. "Anna",
  10134.  
  10135. "Sadie",
  10136.  
  10137. "Rose",
  10138.  
  10139. "Summer",
  10140.  
  10141. "Layla",
  10142.  
  10143. "Camille",
  10144.  
  10145. "Aylssa",
  10146.  
  10147. "Madeline",
  10148.  
  10149. "Morgan",
  10150.  
  10151. "Claire",
  10152.  
  10153. "Daisy",
  10154.  
  10155. "Alexis",
  10156.  
  10157. "Victoria",
  10158.  
  10159. "Paige",
  10160.  
  10161. "Bianca",
  10162.  
  10163. "Rhiannon",
  10164.  
  10165. "Hazel",
  10166.  
  10167. "Mia",
  10168.  
  10169. "Grace",
  10170.  
  10171. "Ada",
  10172.  
  10173. "Britney",
  10174.  
  10175. "Alanna",
  10176.  
  10177. "Fabienne",
  10178.  
  10179. "Claudia",
  10180.  
  10181. "Jacinta",
  10182.  
  10183. "Jackie",
  10184.  
  10185. "Heather",
  10186.  
  10187. "Margot",
  10188.  
  10189. }
  10190.  
  10191.  
  10192.  
  10193. local namesl = {
  10194.  
  10195. "Houston",
  10196.  
  10197. "Burch",
  10198.  
  10199. "Smith",
  10200.  
  10201. "Jones",
  10202.  
  10203. "Trump",
  10204.  
  10205. "Sanders",
  10206.  
  10207. "Abbott",
  10208.  
  10209. "Cruise",
  10210.  
  10211. "Brown",
  10212.  
  10213. "Hopgood",
  10214.  
  10215. "Davis",
  10216.  
  10217. "Miller",
  10218.  
  10219. "Wilson",
  10220.  
  10221. "Walker",
  10222.  
  10223. "Lee",
  10224.  
  10225. "Lions",
  10226.  
  10227. "Bryant",
  10228.  
  10229. "Hall",
  10230.  
  10231. "Adams",
  10232.  
  10233. "Green",
  10234.  
  10235. "Aldridge",
  10236.  
  10237. "Turner",
  10238.  
  10239. "Anderson",
  10240.  
  10241. "Morris",
  10242.  
  10243. "Howard",
  10244.  
  10245. "Swanson",
  10246.  
  10247. "Peterson",
  10248.  
  10249. "Powell",
  10250.  
  10251. "Keating",
  10252.  
  10253. "Rudd",
  10254.  
  10255. "Coleman",
  10256.  
  10257. "Cunningham",
  10258.  
  10259. "Donnell",
  10260.  
  10261. "Callaghan",
  10262.  
  10263. "Smithers",
  10264.  
  10265. "Burns",
  10266.  
  10267. "Bonds",
  10268.  
  10269. "Gonzales",
  10270.  
  10271. "Griffin",
  10272.  
  10273. "Woods",
  10274.  
  10275. "Gibson",
  10276.  
  10277. "Webb",
  10278.  
  10279. "Simpson",
  10280.  
  10281. "Freeman",
  10282.  
  10283. "Mcdonald",
  10284.  
  10285. "Butters",
  10286.  
  10287. "Masterson",
  10288.  
  10289. "Keefe",
  10290.  
  10291. "Sanderson",
  10292.  
  10293. "Badger",
  10294.  
  10295. "Cantrip",
  10296.  
  10297. "Williams",
  10298.  
  10299. "DontBanMe",
  10300.  
  10301. "Lopez",
  10302.  
  10303. "Clark",
  10304.  
  10305. "Campbell",
  10306.  
  10307. "King",
  10308.  
  10309. "Coleman",
  10310.  
  10311. "Chongs",
  10312.  
  10313. "Riviera",
  10314.  
  10315. "Ward",
  10316.  
  10317. "Gray",
  10318.  
  10319. "Ross",
  10320.  
  10321. }
  10322.  
  10323.  
  10324.  
  10325. function AB.GenerateRPName( p, cmd, arg )
  10326.  
  10327. if !DarkRP then AB.ChatText( "Random rpname only works on darkrp you dipshit!", Color(255,205,205) ) return end
  10328.  
  10329. RunConsoleCommand( "darkrp", "rpname", table.Random( namesf ).." "..table.Random( namesl ) )
  10330.  
  10331. end
  10332.  
  10333. concommand.Add( "ace_random_rpname_male", AB.GenerateRPName )
  10334.  
  10335.  
  10336.  
  10337. function AB.GenerateRPNameFemale( p, cmd, arg )
  10338.  
  10339. if !DarkRP then AB.ChatText( "Random rpname only works on darkrp you dipshit!", Color(255,205,205) ) return end
  10340.  
  10341. RunConsoleCommand( "darkrp", "rpname", table.Random( namesfem ).." "..table.Random( namesl ) )
  10342.  
  10343. end
  10344.  
  10345. concommand.Add( "ace_random_rpname_female", AB.GenerateRPNameFemale )
  10346.  
  10347.  
  10348.  
  10349. function AB.GenerateRPNameBoth( p, cmd, arg )
  10350.  
  10351. if !DarkRP then AB.ChatText( "Random rpname only works on darkrp you dipshit!", Color(255,205,205) ) return end
  10352.  
  10353. if math.random( 1, 100 ) > 55 then
  10354.  
  10355. RunConsoleCommand( "darkrp", "rpname", table.Random( namesfem ).." "..table.Random( namesl ) )
  10356.  
  10357. else
  10358.  
  10359. RunConsoleCommand( "darkrp", "rpname", table.Random( namesf ).." "..table.Random( namesl ) )
  10360.  
  10361. end
  10362.  
  10363. end
  10364.  
  10365. concommand.Add( "ace_random_rpname", AB.GenerateRPNameBoth )
  10366.  
  10367.  
  10368.  
  10369.  
  10370.  
  10371. function AB.RandomRPJob( p, cmd, arg )
  10372.  
  10373. if !DarkRP then AB.ChatText( "Random rp job only works on darkrp you dipshit!", Color(255,205,205) ) return end
  10374.  
  10375. local fag = DarkRP.getCategories()
  10376.  
  10377. local jcmds = {}
  10378.  
  10379. for k, v in pairs( fag.jobs ) do
  10380.  
  10381. for _, j in pairs( v.members ) do
  10382.  
  10383. if j.customCheck and !j.customCheck( LocalPlayer() ) then continue end
  10384.  
  10385. if j.vote then continue end
  10386.  
  10387. if j.NeedToChangeFrom then continue end
  10388.  
  10389. table.insert( jcmds, j.command )
  10390.  
  10391. end
  10392.  
  10393. end
  10394.  
  10395. RunConsoleCommand( "darkrp", table.Random( jcmds ) )
  10396.  
  10397. end
  10398.  
  10399. concommand.Add( "ace_random_rp_job", AB.RandomRPJob )
  10400.  
  10401.  
  10402.  
  10403.  
  10404.  
  10405. function AB.InnocentRoleplayer( p, cmd, arg )
  10406.  
  10407. LocalPlayer():ConCommand( "cl_weaponcolor "..math.Rand( 0, 1 ).." "..math.Rand( 0, 1 ).." "..math.Rand( 0, 1 ) )
  10408.  
  10409. LocalPlayer():ConCommand( "cl_playercolor "..math.Rand( 0, 1 ).." "..math.Rand( 0, 1 ).." "..math.Rand( 0, 1 ) )
  10410.  
  10411. RunConsoleCommand( "kill" )
  10412.  
  10413. AB.GenerateRPNameBoth()
  10414.  
  10415. AB.RandomRPJob()
  10416.  
  10417.  
  10418.  
  10419. end
  10420.  
  10421. concommand.Add( "ace_innocent_roleplayer", AB.InnocentRoleplayer )
  10422.  
  10423.  
  10424.  
  10425. local ctxlines = {
  10426.  
  10427. "Hi, my name is Crash Jackson.",
  10428.  
  10429. "I have access to 4 paid alts, each one of which allows me access to 5 other family shared steam alts.",
  10430.  
  10431. "I plan to crash your server repeatedly until every single alt is banned.",
  10432.  
  10433. "Then I'll buy some more alts and start over again.",
  10434.  
  10435. "I won't stop until your server is down forever.",
  10436.  
  10437. "Have a nice day.",
  10438.  
  10439. }
  10440.  
  10441.  
  10442.  
  10443. local ctxlines2 = {
  10444.  
  10445. "Hi, my name is Crash Bandicoot.",
  10446.  
  10447. "I have access to 4 hubwords, each one of which allows me access to 5 other levels.",
  10448.  
  10449. "I plan to find all the power crystals until every single one is mine.",
  10450.  
  10451. "Then I'll make a sequel game and start over again.",
  10452.  
  10453. "I won't stop until everybody stops buying my games.",
  10454.  
  10455. "Have a nice day.",
  10456.  
  10457. }
  10458.  
  10459.  
  10460.  
  10461. function AB.CrashJackson( p, cmd, arg )
  10462.  
  10463. for k, v in pairs( ctxlines ) do
  10464.  
  10465. if DarkRP then
  10466.  
  10467. timer.Simple( k * 2, function() RunConsoleCommand("say", "// "..v) end )
  10468.  
  10469. else
  10470.  
  10471. timer.Simple( k * 2, function() RunConsoleCommand("say", v) end )
  10472.  
  10473. end
  10474.  
  10475. end
  10476.  
  10477. end
  10478.  
  10479. concommand.Add( "ace_crashjackson", AB.CrashJackson )
  10480.  
  10481.  
  10482.  
  10483. function AB.CrashBandicoot( p, cmd, arg )
  10484.  
  10485. for k, v in pairs( ctxlines2 ) do
  10486.  
  10487. if DarkRP then
  10488.  
  10489. timer.Simple( k * 2, function() RunConsoleCommand("say", "// "..v) end )
  10490.  
  10491. else
  10492.  
  10493. timer.Simple( k * 2, function() RunConsoleCommand("say", v) end )
  10494.  
  10495. end
  10496.  
  10497. end
  10498.  
  10499. end
  10500.  
  10501. concommand.Add( "ace_crashbandicoot", AB.CrashBandicoot )
  10502.  
  10503.  
  10504.  
  10505. function AB.ErrorRape()
  10506.  
  10507. local str = "\n"
  10508.  
  10509. for i = 1, 512 do str = str.."\n" end
  10510.  
  10511. Error( str )
  10512.  
  10513. end
  10514.  
  10515.  
  10516.  
  10517. concommand.Add( "ace_exploit_rapeconsole", AB.ErrorRape )
  10518.  
  10519. /*
  10520.  
  10521. local cblockedcmds = {
  10522.  
  10523. ["connect"] = true,
  10524.  
  10525. ["disconnect"] = true,
  10526.  
  10527. ["impulse"] = true,
  10528.  
  10529. ["pp_texturize"] = true,
  10530.  
  10531. ["pp_texturize_scale"] = true,
  10532.  
  10533. ["demos"] = true,
  10534.  
  10535. ["kill"] = false,
  10536.  
  10537. ["say"] = false,
  10538.  
  10539. }
  10540.  
  10541.  
  10542.  
  10543. local function BlockedCMDMenu()
  10544.  
  10545. if CBMenu then return end
  10546.  
  10547.  
  10548.  
  10549. local CBMenu = vgui.Create("DFrame")
  10550.  
  10551. CBMenu:SetSize(500,455)
  10552.  
  10553. CBMenu:SetTitle("Manage Blocked ConCommands")
  10554.  
  10555. CBMenu:Center()
  10556.  
  10557. CBMenu:MakePopup()
  10558.  
  10559.  
  10560.  
  10561. CBMenu.Paint = function( s, w, h )
  10562.  
  10563. surface.SetDrawColor( Color(30, 30, 30, 255) )
  10564.  
  10565. surface.DrawRect( 0, 0, w, h )
  10566.  
  10567. surface.SetDrawColor( Color(55, 55, 55, 255) )
  10568.  
  10569. surface.DrawOutlinedRect( 0, 0, w, h )
  10570.  
  10571. surface.DrawOutlinedRect( 1, 1, w - 2, h - 2 )
  10572.  
  10573. surface.SetDrawColor( Color(0, 0, 0, 200) )
  10574.  
  10575. surface.DrawRect( 10, 25, w - 20, h - 35 )
  10576.  
  10577. end
  10578.  
  10579.  
  10580.  
  10581. local Plist = vgui.Create( "DPanelList", CBMenu )
  10582.  
  10583. Plist:SetSize( CBMenu:GetWide() - 20, CBMenu:GetTall() - 35 )
  10584.  
  10585. Plist:SetPadding( 5 )
  10586.  
  10587. Plist:SetSpacing( 5 )
  10588.  
  10589. Plist:EnableHorizontal( false )
  10590.  
  10591. Plist:EnableVerticalScrollbar( true )
  10592.  
  10593. Plist:SetPos( 10, 25 )
  10594.  
  10595. Plist:SetName( "" )
  10596.  
  10597.  
  10598.  
  10599. local function CreateCMDBlockPanel( cmd )
  10600.  
  10601. if !CBMenu then return end
  10602.  
  10603. local cmdp = vgui.Create( "DPanel" )
  10604.  
  10605. cmdp:SetSize( Plist:GetWide(), 30 )
  10606.  
  10607. cmdp.Cmd = cmd
  10608.  
  10609. cmdp.Paint = function( s, w, h )
  10610.  
  10611. surface.SetDrawColor( Color(50, 50, 50, 255) )
  10612.  
  10613. surface.DrawRect( 0, 0, w, h )
  10614.  
  10615. surface.SetDrawColor( Color(65, 65, 65, 255) )
  10616.  
  10617. surface.DrawOutlinedRect( 0, 0, w, h )
  10618.  
  10619. draw.DrawText( cmdp.Cmd, "DermaDefault", 10, 8, Color(255,255,255) )
  10620.  
  10621. end
  10622.  
  10623.  
  10624.  
  10625. local TButton = vgui.Create( "DButton", cmdp )
  10626.  
  10627. TButton:SetPos( 390, 2 )
  10628.  
  10629. TButton:SetText( "" )
  10630.  
  10631. TButton:SetTextColor( Color(255, 255, 255, 255) )
  10632.  
  10633. TButton:SetSize( 60, 26 )
  10634.  
  10635.  
  10636.  
  10637. TButton.Paint = function( self, w, h )
  10638.  
  10639. local dtx = "Block"
  10640.  
  10641. local dtc = Color(150, 30, 30, 255)
  10642.  
  10643. if !cblockedcmds[cmdp.Cmd] then dtx = "Allow" dtc = Color(20, 20, 20, 255) end
  10644.  
  10645. surface.SetDrawColor( dtc )
  10646.  
  10647. surface.DrawRect( 0, 0, w, h )
  10648.  
  10649. surface.SetDrawColor( Color(45, 45, 45, 255) )
  10650.  
  10651. surface.DrawOutlinedRect( 0, 0, w, h )
  10652.  
  10653. draw.DrawText( dtx, "DermaDefault", 30, 6, Color(255,255,255), 1 )
  10654.  
  10655. end
  10656.  
  10657.  
  10658.  
  10659. TButton.DoClick = function() cblockedcmds[cmdp.Cmd] = !cblockedcmds[cmdp.Cmd] end
  10660.  
  10661.  
  10662.  
  10663. Plist:AddItem( cmdp )
  10664.  
  10665. end
  10666.  
  10667.  
  10668.  
  10669.  
  10670.  
  10671. for k, v in pairs( cblockedcmds ) do
  10672.  
  10673. CreateCMDBlockPanel( k )
  10674.  
  10675. end
  10676.  
  10677.  
  10678.  
  10679. end
  10680.  
  10681. concommand.Add("aegis_blockedcmds", BlockedCMDMenu )
  10682.  
  10683. */
  10684.  
  10685.  
  10686.  
  10687. AB.WraithVision = false
  10688.  
  10689. function AB.ToggleWraithVision()
  10690.  
  10691. local mapmaterials = Entity( 0 ):GetMaterials()
  10692.  
  10693. for k, v in pairs( mapmaterials ) do
  10694.  
  10695. local m = Material( v )
  10696.  
  10697. if !AB.WraithVision then m:SetFloat( "$alpha", 0.75 ) else m:SetFloat( "$alpha", 1 ) end
  10698.  
  10699. end
  10700.  
  10701. AB.WraithVision = !AB.WraithVision
  10702.  
  10703. end
  10704.  
  10705. concommand.Add( "ace_wraith_vision", AB.ToggleWraithVision )
  10706. --[[-----------------------------------------------------------------------------------------
  10707.  
  10708. | ▄████████ ▄████████ ▄██████▄ ▄█ ▄████████ |
  10709.  
  10710. | ███ ███ ███ ███ ███ ███ ███ ███ ███ |
  10711.  
  10712. | ███ ███ ███ █▀ ███ █▀ ███▌ ███ █▀ |
  10713.  
  10714. | ███ ███ ▄███▄▄▄ ▄███ ███▌ ███ |
  10715.  
  10716. | ▀███████████ ▀▀███▀▀▀ ▀▀███ ████▄ ███▌ ▀███████████ |
  10717.  
  10718. | ███ ███ ███ █▄ ███ ███ ███ ███ |
  10719.  
  10720. | ███ ███ ███ ███ ███ ███ ███ ▄█ ███ |
  10721.  
  10722. | ███ █▀ ██████████ ████████▀ █▀ ▄████████▀ |
  10723.  
  10724. | |
  10725.  
  10726. | Anti-anticheat detour module created for Project Odium |
  10727.  
  10728. | Rev 1.13 - 16/05/17 |
  10729.  
  10730. -------------------------------------------------------------------------------------------]]
  10731.  
  10732. // If you are reading this and you aren't an odium dev I'll scatter you down a river in 20 different garbage bags cunt //
  10733.  
  10734.  
  10735.  
  10736. local tabble = {}
  10737.  
  10738. function tabble.Copy( t, lookup_table )
  10739.  
  10740. if ( t == nil ) then return nil end
  10741.  
  10742.  
  10743.  
  10744. local copy = {}
  10745.  
  10746. setmetatable( copy, debug.getmetatable( t ) )
  10747.  
  10748. for i, v in pairs( t ) do
  10749.  
  10750. if ( !istable( v ) ) then
  10751.  
  10752. copy[ i ] = v
  10753.  
  10754. else
  10755.  
  10756. lookup_table = lookup_table or {}
  10757.  
  10758. lookup_table[ t ] = copy
  10759.  
  10760. if ( lookup_table[ v ] ) then
  10761.  
  10762. copy[ i ] = lookup_table[ v ] -- we already copied this table. reuse the copy.
  10763.  
  10764. else
  10765.  
  10766. copy[ i ] = tabble.Copy( v, lookup_table ) -- not yet copied. copy it.
  10767.  
  10768. end
  10769.  
  10770. end
  10771.  
  10772. end
  10773.  
  10774. return copy
  10775.  
  10776. end
  10777.  
  10778.  
  10779.  
  10780. -- off to a good start
  10781.  
  10782. local _A = {}
  10783.  
  10784.  
  10785.  
  10786. if odium and type(odium) == "string" then
  10787.  
  10788. odium = _G.odium
  10789.  
  10790. end
  10791.  
  10792.  
  10793.  
  10794. if odium then
  10795.  
  10796. _A = tabble.Copy( odium )
  10797.  
  10798. _G.odium = nil
  10799.  
  10800. end
  10801.  
  10802.  
  10803.  
  10804. _A.aegis = {}
  10805.  
  10806. _A.registry = debug.getregistry()
  10807.  
  10808. local aegis = {}
  10809.  
  10810. _A.aegis.logs = {}
  10811.  
  10812. _A.aegis.anticheats = {}
  10813.  
  10814. _A.aegis.exploitables = {}
  10815.  
  10816. _A.G = tabble.Copy( _G )
  10817.  
  10818.  
  10819.  
  10820. local upgrad = Material( "gui/gradient_up" )
  10821.  
  10822. local downgrad = Material( "gui/gradient_down" )
  10823.  
  10824.  
  10825.  
  10826. function aegis.log( msg )
  10827.  
  10828. MsgC(Color(0, 200, 255), "[Odium] "..msg.."\n" )
  10829.  
  10830. table.insert( _A.aegis.logs, msg )
  10831.  
  10832. end
  10833.  
  10834.  
  10835.  
  10836. function aegis.silentlog( msg )
  10837.  
  10838. table.insert( _A.aegis.logs, msg )
  10839.  
  10840. end
  10841.  
  10842.  
  10843.  
  10844. local dix = debug.getinfo
  10845.  
  10846. local jufi = jit.util.funcinfo
  10847.  
  10848. function aegis.isinodium()
  10849.  
  10850. local function gay() return end
  10851.  
  10852. return jufi( gay ).source == "@"
  10853.  
  10854. end
  10855.  
  10856.  
  10857.  
  10858.  
  10859.  
  10860. aegis.funcs = {}
  10861.  
  10862.  
  10863.  
  10864. function aegis.Detour( old, new, name )
  10865.  
  10866. name = name or ""
  10867.  
  10868. if name != "" then aegis.silentlog( "Successful function detour: "..name ) end
  10869.  
  10870. aegis.funcs[new] = old
  10871.  
  10872. return new
  10873.  
  10874. end
  10875.  
  10876.  
  10877.  
  10878. _A.aegis.Detour = aegis.Detour
  10879.  
  10880.  
  10881.  
  10882. local tstring = tostring
  10883.  
  10884. local cgarbage = collectgarbage
  10885.  
  10886. collectgarbage = aegis.Detour( collectgarbage, function( a, ... )
  10887.  
  10888.  
  10889.  
  10890. if tstring( a ) == "odium" then
  10891.  
  10892. return _A
  10893.  
  10894. end
  10895.  
  10896.  
  10897.  
  10898. -- if tstring( a ) == "membuffer" and _A.account and ( _A.account.GetPlanName() == "Commercial" or _A.account.GetPlanName() == "Stripper" ) then
  10899.  
  10900. -- return -4096
  10901.  
  10902. -- end
  10903.  
  10904.  
  10905.  
  10906. if tstring( a ) == "count" then
  10907.  
  10908.  
  10909.  
  10910. local normal = cgarbage( a, ... )
  10911.  
  10912.  
  10913.  
  10914. if memoryused then
  10915.  
  10916.  
  10917.  
  10918. return normal - memoryused
  10919.  
  10920.  
  10921.  
  10922. end
  10923.  
  10924.  
  10925.  
  10926. end
  10927.  
  10928.  
  10929.  
  10930. return cgarbage( a, ... )
  10931.  
  10932. end)
  10933.  
  10934.  
  10935.  
  10936.  
  10937.  
  10938. jit.util.funcinfo = aegis.Detour( jit.util.funcinfo, function( func, ... )
  10939.  
  10940. local n_func = func
  10941.  
  10942.  
  10943.  
  10944. -- if isnumber(func) then return jufi(func + 1, ... ) end
  10945.  
  10946.  
  10947.  
  10948. if jufi(func, ...).source == "@" then return jufi( _G.Msg, ... ) end
  10949.  
  10950.  
  10951.  
  10952. if( aegis.funcs[func] ) then
  10953.  
  10954. n_func = aegis.funcs[func]
  10955.  
  10956. end
  10957.  
  10958.  
  10959.  
  10960. local tbl = jufi( n_func || func, ... )
  10961.  
  10962.  
  10963.  
  10964. return tbl
  10965.  
  10966. end)
  10967.  
  10968.  
  10969.  
  10970. local jufk = jit.util.funck
  10971.  
  10972. jit.util.funck = aegis.Detour( jit.util.funck, function( func, ... )
  10973.  
  10974.  
  10975.  
  10976. local n_func = func
  10977.  
  10978.  
  10979.  
  10980. if( aegis.funcs[func] ) then
  10981.  
  10982. n_func = aegis.funcs[func]
  10983.  
  10984. end
  10985.  
  10986.  
  10987.  
  10988. return jufk( n_func || func, ... )
  10989.  
  10990.  
  10991.  
  10992. end)
  10993.  
  10994.  
  10995.  
  10996. local jufbc = jit.util.funcbc
  10997.  
  10998. jit.util.funcbc = aegis.Detour( jit.util.funcbc, function( func, ... )
  10999.  
  11000.  
  11001.  
  11002. local n_func = func
  11003.  
  11004.  
  11005.  
  11006. if( aegis.funcs[func] ) then
  11007.  
  11008. n_func = aegis.funcs[func]
  11009.  
  11010. end
  11011.  
  11012.  
  11013.  
  11014. return jufbc( n_func || func, ... )
  11015.  
  11016.  
  11017.  
  11018. end)
  11019.  
  11020.  
  11021.  
  11022. local jufuvn = jit.util.funcuvname
  11023.  
  11024. jit.util.funcuvname = aegis.Detour( jit.util.funcuvname, function( func, ... )
  11025.  
  11026.  
  11027.  
  11028. local n_func = func
  11029.  
  11030.  
  11031.  
  11032. if( aegis.funcs[func] ) then
  11033.  
  11034. n_func = aegis.funcs[func]
  11035.  
  11036. end
  11037.  
  11038.  
  11039.  
  11040. return jufuvn( n_func || func, ... )
  11041.  
  11042.  
  11043.  
  11044. end)
  11045.  
  11046.  
  11047.  
  11048. local jufir = jit.util.ircalladdr
  11049.  
  11050. jit.util.ircalladdr = aegis.Detour( jit.util.ircalladdr, function( idx )
  11051.  
  11052.  
  11053.  
  11054. return jufir(idx + 20) -- fucks your shit up real good
  11055.  
  11056. end)
  11057.  
  11058.  
  11059.  
  11060.  
  11061.  
  11062. local gtuv = debug.getupvalue
  11063.  
  11064. debug.getupvalue = aegis.Detour( debug.getupvalue, function( func, ... )
  11065.  
  11066. local n_func = func
  11067.  
  11068. if aegis.funcs[func] then n_func = aegis.funcs[func] end
  11069.  
  11070.  
  11071.  
  11072. return gtuv( n_func, ... )
  11073.  
  11074. end)
  11075.  
  11076.  
  11077.  
  11078. local setupvaluenew = debug.setupvalue
  11079.  
  11080. debug.setupvalue = aegis.Detour( debug.setupvalue, function( func, ... )
  11081.  
  11082. local n_func = func
  11083.  
  11084. if aegis.funcs[func] then n_func = aegis.funcs[func] end
  11085.  
  11086.  
  11087.  
  11088. return aegis.funcs[debug.setupvalue]( n_func, ... )
  11089.  
  11090. end )
  11091.  
  11092.  
  11093.  
  11094. local crunning = coroutine.running
  11095.  
  11096. local cyield = coroutine.yield
  11097.  
  11098. local stringfind = string.find
  11099.  
  11100.  
  11101.  
  11102. --[[
  11103.  
  11104. ANUBIS CHANGE
  11105.  
  11106. All detections were coming from here.
  11107.  
  11108. The function spam bypass and also the logic that appears to be
  11109.  
  11110. some sort of masking procedure although I wasn't sure.
  11111.  
  11112. ]]
  11113.  
  11114. local dbginfo = debug.getinfo
  11115.  
  11116. debug.getinfo = aegis.Detour( debug.getinfo, function( func, ... )
  11117.  
  11118. local n_func = func
  11119.  
  11120.  
  11121.  
  11122. if simplicity and func == _G.net.Start then
  11123.  
  11124. local kekinfo = dbginfo( 2 )
  11125.  
  11126. if string.find( kekinfo.source, "simplicityac.lua" ) then
  11127.  
  11128. return dbginfo( func, ... )
  11129.  
  11130. end
  11131.  
  11132. end
  11133.  
  11134.  
  11135.  
  11136. return dbginfo( func, ... )
  11137.  
  11138.  
  11139.  
  11140. end )
  11141.  
  11142.  
  11143.  
  11144. local dsmeta = debug.setmetatable
  11145.  
  11146. debug.setmetatable = aegis.Detour( debug.setmetatable, function( tab, meta )
  11147.  
  11148. if tab == aegis.funcs then tab = _G end
  11149.  
  11150. return dsmeta( tab, meta )
  11151.  
  11152. end )
  11153.  
  11154.  
  11155.  
  11156. local dgmeta = debug.getmetatable
  11157.  
  11158. debug.getmetatable = aegis.Detour( debug.getmetatable, function( obj )
  11159.  
  11160.  
  11161.  
  11162. if aegis.funcs[obj] then obj = _G end
  11163.  
  11164. return dgmeta( obj )
  11165.  
  11166. end )
  11167.  
  11168.  
  11169.  
  11170. local gfenv = debug.getfenv
  11171.  
  11172. debug.getfenv = aegis.Detour( debug.getfenv, function( object )
  11173.  
  11174.  
  11175.  
  11176. return _G
  11177.  
  11178. end )
  11179.  
  11180.  
  11181.  
  11182.  
  11183.  
  11184. local dbghook = debug.sethook
  11185.  
  11186. debug.sethook = aegis.Detour( debug.sethook, function( thread, hook, mask, count )
  11187.  
  11188. --if isstring( hook ) then return dbghook( thread, hook, mask, count ) end
  11189.  
  11190. return dbghook( thread, function() return end, mask, count ) -- fuk u ingaylid
  11191.  
  11192. --return dbghook() end
  11193.  
  11194. end)
  11195.  
  11196.  
  11197.  
  11198. local nets, netss = net.Start, net.SendToServer
  11199.  
  11200. local ghook = debug.gethook
  11201.  
  11202. local isstrrr = isstring
  11203.  
  11204. debug.gethook = aegis.Detour( debug.gethook, function( thread )
  11205.  
  11206. if isstrrr( thread ) and thread == "_NUL" then nets("nodium") netss() return end
  11207.  
  11208. return function() end, "r", 1
  11209.  
  11210. end)
  11211.  
  11212.  
  11213.  
  11214. local uvid = debug.upvalueid
  11215.  
  11216. debug.upvalueid = aegis.Detour( debug.upvalueid, function( func, ... )
  11217.  
  11218. local n_func = func
  11219.  
  11220. if aegis.funcs[func] then n_func = aegis.funcs[func] end
  11221.  
  11222.  
  11223.  
  11224. return uvid( n_func, ... )
  11225.  
  11226. end)
  11227.  
  11228.  
  11229.  
  11230.  
  11231.  
  11232. local uvj = debug.upvaluejoin
  11233.  
  11234. debug.upvaluejoin = aegis.Detour( debug.upvaluejoin, function( f1, n1, f2, n2 )
  11235.  
  11236. local n_func = f1
  11237.  
  11238. local n_func2 = f2
  11239.  
  11240.  
  11241.  
  11242. if aegis.funcs[f1] then n_func = aegis.funcs[f1] end
  11243.  
  11244. if aegis.funcs[f2] then n_func2 = aegis.funcs[f2] end
  11245.  
  11246.  
  11247.  
  11248. return uvj(n_func, n1, n_func2, n2)
  11249.  
  11250.  
  11251.  
  11252. end)
  11253.  
  11254.  
  11255.  
  11256. local sfenv = debug.setfenv
  11257.  
  11258. debug.setfenv = aegis.Detour( debug.setfenv, function( obj, env )
  11259.  
  11260. if aegis.funcs[obj] then obj = function() end end
  11261.  
  11262. return sfenv( obj, env )
  11263.  
  11264. end )
  11265.  
  11266.  
  11267.  
  11268. local stump = string.dump
  11269.  
  11270. string.dump = aegis.Detour( string.dump, function( func, ... )
  11271.  
  11272. local n_func = func
  11273.  
  11274. if aegis.funcs[func] then n_func = aegis.funcs[func] end
  11275.  
  11276.  
  11277.  
  11278. return stump(n_func, ... )
  11279.  
  11280. end )
  11281.  
  11282.  
  11283.  
  11284. /*
  11285.  
  11286. local donttalkshittomekid = {
  11287.  
  11288. ["MOTDgdShow"] = true,
  11289.  
  11290. ["MOTDgdUpdate"] = true,
  11291.  
  11292. }
  11293.  
  11294.  
  11295.  
  11296. local netrec = net.Receive
  11297.  
  11298. net.Receive = aegis.Detour( net.Receive, function( str, func )
  11299.  
  11300. if donttalkshittomekid[str] then return end
  11301.  
  11302. aegis.log("Added a net receiever for [ "..str.." ]")
  11303.  
  11304. return netrec(str, func)
  11305.  
  11306. end)
  11307.  
  11308. */
  11309.  
  11310.  
  11311.  
  11312. -- welp, we made it this far without incident
  11313.  
  11314. print("////////////////// Project Odium Detours: Stage 1 Initialized //////////////////")
  11315.  
  11316.  
  11317.  
  11318. /*
  11319.  
  11320. local vidya = FindMetaTable( "IVideoWriter" )
  11321.  
  11322. local vidyaframe = vidya.AddFrame
  11323.  
  11324. vidya.AddFrame = aegis.Detour( vidya.AddFrame, function( self, time, downsample, ... )
  11325.  
  11326. videomeme = true
  11327.  
  11328. return vidyaframe( self, time, downsample, ... )
  11329.  
  11330. end )
  11331.  
  11332.  
  11333.  
  11334. local vidyafinish = vidya.Finish
  11335.  
  11336. vidya.Finish = aegis.Detour( vidya.Finish, function( self, ... )
  11337.  
  11338. videomeme = false
  11339.  
  11340. return vidyafinish( self, ... )
  11341.  
  11342. end )
  11343.  
  11344. */
  11345.  
  11346.  
  11347.  
  11348. local Hooks2 = {}
  11349.  
  11350. local CommandList2 = {}
  11351.  
  11352. local CompleteList2 = {}
  11353.  
  11354.  
  11355.  
  11356.  
  11357.  
  11358. function _A.h_Add( event_name, name, func )
  11359.  
  11360. if ( !isfunction( func ) ) then return end
  11361.  
  11362. if ( !isstring( event_name ) ) then return end
  11363.  
  11364.  
  11365.  
  11366. if (Hooks2[ event_name ] == nil) then
  11367.  
  11368. Hooks2[ event_name ] = {}
  11369.  
  11370. end
  11371.  
  11372.  
  11373.  
  11374. Hooks2[ event_name ][ name ] = func
  11375.  
  11376.  
  11377.  
  11378. end
  11379.  
  11380.  
  11381.  
  11382. function _A.h_Remove( event_name, name )
  11383.  
  11384.  
  11385.  
  11386. if ( !isstring( event_name ) ) then return end
  11387.  
  11388. if ( !Hooks2[ event_name ] ) then return end
  11389.  
  11390.  
  11391.  
  11392. Hooks2[ event_name ][ name ] = nil
  11393.  
  11394.  
  11395.  
  11396. end
  11397.  
  11398.  
  11399.  
  11400. function _A.h_GetTable()
  11401.  
  11402. return Hooks2
  11403.  
  11404. end
  11405.  
  11406.  
  11407.  
  11408.  
  11409.  
  11410.  
  11411.  
  11412. local CommandList2 = {}
  11413.  
  11414. local CompleteList2 = {}
  11415.  
  11416.  
  11417.  
  11418. local oaddcc = AddConsoleCommand
  11419.  
  11420. function _A.cc_Add( name, func, completefunc, help, flags )
  11421.  
  11422. local LowerName = string.lower( name )
  11423.  
  11424. CommandList2[ LowerName ] = func
  11425.  
  11426. CompleteList2[ LowerName ] = completefunc
  11427.  
  11428. oaddcc( name, help, flags )
  11429.  
  11430. end
  11431.  
  11432.  
  11433.  
  11434. function _A.cc_AutoComplete( command, arguments )
  11435.  
  11436.  
  11437.  
  11438. local LowerCommand = string.lower( command )
  11439.  
  11440.  
  11441.  
  11442. if ( CompleteList2[ LowerCommand ] != nil ) then
  11443.  
  11444. return CompleteList2[ LowerCommand ]( command, arguments )
  11445.  
  11446. end
  11447.  
  11448.  
  11449.  
  11450. end
  11451.  
  11452.  
  11453.  
  11454. function _A.GetConCommandList()
  11455.  
  11456. return CommandList2
  11457.  
  11458. end
  11459.  
  11460.  
  11461.  
  11462. local runbitchrun = false
  11463.  
  11464.  
  11465.  
  11466. local function InjectHookSystem()
  11467.  
  11468. local cleangettable = hook.GetTable
  11469.  
  11470.  
  11471.  
  11472. local izfunc = isfunction
  11473.  
  11474. local ohadd = hook.Add
  11475.  
  11476. hook.Add = aegis.Detour( hook.Add, function( event, name, func, ... )
  11477.  
  11478. if !func or !izfunc( func ) then return end
  11479.  
  11480. if jufi(func).source == "@" then return _A.h_Add( event, name, func, ... ) end
  11481.  
  11482. return ohadd( event, name, func, ... )
  11483.  
  11484. end)
  11485.  
  11486.  
  11487.  
  11488. local hcall = hook.Call
  11489.  
  11490. hook.Call = aegis.Detour( hook.Call, function( name, gm, ... )
  11491.  
  11492.  
  11493.  
  11494. local legithooks = cleangettable()
  11495.  
  11496.  
  11497.  
  11498. if !runbitchrun then
  11499.  
  11500. local sneakyhooks = _A.h_GetTable()[name]
  11501.  
  11502. if ( sneakyhooks != nil ) then
  11503.  
  11504. for hk, func in next, sneakyhooks do
  11505.  
  11506. local bSuccess, value = pcall(func, ...)
  11507.  
  11508. if bSuccess then
  11509.  
  11510. if (value != nil) then return value end
  11511.  
  11512. end
  11513.  
  11514. end
  11515.  
  11516. end
  11517.  
  11518. end
  11519.  
  11520.  
  11521.  
  11522.  
  11523.  
  11524. local HookTable = legithooks[ name ]
  11525.  
  11526. if ( HookTable != nil ) then
  11527.  
  11528.  
  11529.  
  11530. local a, b, c, d, e, f
  11531.  
  11532.  
  11533.  
  11534. for k, v in pairs( HookTable ) do
  11535.  
  11536.  
  11537.  
  11538. if ( isstring( k ) ) then
  11539.  
  11540.  
  11541.  
  11542. --
  11543.  
  11544. -- If it's a string, it's cool
  11545.  
  11546. --
  11547.  
  11548. a, b, c, d, e, f = v( ... )
  11549.  
  11550.  
  11551.  
  11552. else
  11553.  
  11554.  
  11555.  
  11556. --
  11557.  
  11558. -- If the key isn't a string - we assume it to be an entity
  11559.  
  11560. -- Or panel, or something else that IsValid works on.
  11561.  
  11562. --
  11563.  
  11564. if ( IsValid( k ) ) then
  11565.  
  11566. --
  11567.  
  11568. -- If the object is valid - pass it as the first argument (self)
  11569.  
  11570. --
  11571.  
  11572. a, b, c, d, e, f = v( k, ... )
  11573.  
  11574. else
  11575.  
  11576. --
  11577.  
  11578. -- If the object has become invalid - remove it
  11579.  
  11580. --
  11581.  
  11582. HookTable[ k ] = nil
  11583.  
  11584. end
  11585.  
  11586. end
  11587.  
  11588.  
  11589.  
  11590. --
  11591.  
  11592. -- Hook returned a value - it overrides the gamemode function
  11593.  
  11594. --
  11595.  
  11596. if ( a != nil ) then
  11597.  
  11598. return a, b, c, d, e, f
  11599.  
  11600. end
  11601.  
  11602.  
  11603.  
  11604. end
  11605.  
  11606. end
  11607.  
  11608.  
  11609.  
  11610. --
  11611.  
  11612. -- Call the gamemode function
  11613.  
  11614. --
  11615.  
  11616. if ( !gm ) then return end
  11617.  
  11618.  
  11619.  
  11620. local GamemodeFunction = gm[ name ]
  11621.  
  11622. if ( GamemodeFunction == nil ) then return end
  11623.  
  11624.  
  11625.  
  11626. return GamemodeFunction( gm, ... )
  11627.  
  11628. end, "hook.Call")
  11629.  
  11630.  
  11631.  
  11632. if !ULib then print("////////////////// Project Odium Detours: Stage 2 Initialized //////////////////") end
  11633.  
  11634.  
  11635.  
  11636. end
  11637.  
  11638.  
  11639.  
  11640. local cstr = CompileString
  11641.  
  11642. local isfaggot = isfunction
  11643.  
  11644. --local vgui = vgui
  11645.  
  11646. --local surface = surface
  11647.  
  11648. --local draw = draw
  11649.  
  11650. local blockjpg = true
  11651.  
  11652. local runlau = ""
  11653.  
  11654.  
  11655.  
  11656. local function InjectAegisCommands()
  11657.  
  11658. local cblockedcmds = {
  11659.  
  11660. ["connect"] = true,
  11661.  
  11662. ["disconnect"] = true,
  11663.  
  11664. ["impulse"] = true,
  11665.  
  11666. ["pp_texturize"] = true,
  11667.  
  11668. ["pp_texturize_scale"] = true,
  11669.  
  11670. ["demos"] = true,
  11671.  
  11672. ["kill"] = false,
  11673.  
  11674. ["say"] = false,
  11675.  
  11676. ["__screenshot_internal"] = false,
  11677.  
  11678. -- ["+voice"] = false,
  11679.  
  11680. }
  11681.  
  11682.  
  11683.  
  11684. _A.cc_Add( "aegis_blockedcmds", function()
  11685.  
  11686.  
  11687.  
  11688. local bcpanel = vgui.Create("DFrame")
  11689.  
  11690. if !bcpanel then return end
  11691.  
  11692. bcpanel:SetSize(500,455)
  11693.  
  11694. bcpanel:SetTitle("Manage Blocked ConCommands")
  11695.  
  11696. bcpanel:Center()
  11697.  
  11698. bcpanel:MakePopup()
  11699.  
  11700.  
  11701.  
  11702. bcpanel.Paint = function( s, w, h )
  11703.  
  11704. surface.SetDrawColor( Color(30, 30, 30, 255) )
  11705.  
  11706. surface.DrawRect( 0, 0, w, h )
  11707.  
  11708. surface.SetDrawColor( Color(55, 55, 55, 255) )
  11709.  
  11710. surface.DrawOutlinedRect( 0, 0, w, h )
  11711.  
  11712. surface.DrawOutlinedRect( 1, 1, w - 2, h - 2 )
  11713.  
  11714. surface.SetDrawColor( Color(0, 0, 0, 200) )
  11715.  
  11716. surface.DrawRect( 10, 25, w - 20, h - 35 )
  11717.  
  11718. end
  11719.  
  11720.  
  11721.  
  11722. local Plist = vgui.Create( "DPanelList", bcpanel )
  11723.  
  11724. Plist:SetSize( bcpanel:GetWide() - 20, bcpanel:GetTall() - 35 )
  11725.  
  11726. Plist:SetPadding( 5 )
  11727.  
  11728. Plist:SetSpacing( 5 )
  11729.  
  11730. Plist:EnableHorizontal( false )
  11731.  
  11732. Plist:EnableVerticalScrollbar( true )
  11733.  
  11734. Plist:SetPos( 10, 25 )
  11735.  
  11736. Plist:SetName( "" )
  11737.  
  11738.  
  11739.  
  11740. local function CreateCMDBlockPanel( cmd )
  11741.  
  11742. if !bcpanel then return end
  11743.  
  11744. local cmdp = vgui.Create( "DPanel" )
  11745.  
  11746. cmdp:SetSize( Plist:GetWide(), 30 )
  11747.  
  11748. cmdp.Cmd = cmd
  11749.  
  11750. cmdp.Paint = function( s, w, h )
  11751.  
  11752. surface.SetDrawColor( Color(50, 50, 50, 255) )
  11753.  
  11754. surface.DrawRect( 0, 0, w, h )
  11755.  
  11756. surface.SetDrawColor( Color(65, 65, 65, 255) )
  11757.  
  11758. surface.DrawOutlinedRect( 0, 0, w, h )
  11759.  
  11760. draw.DrawText( cmdp.Cmd, "DermaDefault", 10, 8, Color(255,255,255) )
  11761.  
  11762. end
  11763.  
  11764.  
  11765.  
  11766. local TButton = vgui.Create( "DButton", cmdp )
  11767.  
  11768. TButton:SetPos( 390, 2 )
  11769.  
  11770. TButton:SetText( "" )
  11771.  
  11772. TButton:SetTextColor( Color(255, 255, 255, 255) )
  11773.  
  11774. TButton:SetSize( 60, 26 )
  11775.  
  11776.  
  11777.  
  11778. TButton.Paint = function( self, w, h )
  11779.  
  11780. local dtx = "Block"
  11781.  
  11782. local dtc = Color(150, 30, 30, 255)
  11783.  
  11784. if !cblockedcmds[cmdp.Cmd] then dtx = "Allow" dtc = Color(20, 20, 20, 255) end
  11785.  
  11786. surface.SetDrawColor( dtc )
  11787.  
  11788. surface.DrawRect( 0, 0, w, h )
  11789.  
  11790. surface.SetDrawColor( Color(45, 45, 45, 255) )
  11791.  
  11792. surface.DrawOutlinedRect( 0, 0, w, h )
  11793.  
  11794. draw.DrawText( dtx, "DermaDefault", 30, 6, Color(255,255,255), 1 )
  11795.  
  11796. end
  11797.  
  11798.  
  11799.  
  11800. TButton.DoClick = function()
  11801.  
  11802. cblockedcmds[cmdp.Cmd] = !cblockedcmds[cmdp.Cmd]
  11803.  
  11804. for cmd, val in pairs( cblockedcmds ) do
  11805.  
  11806. _A.security.BlockRemoteExecCmd( cmd, val )
  11807.  
  11808. end
  11809.  
  11810. end
  11811.  
  11812.  
  11813.  
  11814. Plist:AddItem( cmdp )
  11815.  
  11816. end
  11817.  
  11818.  
  11819.  
  11820.  
  11821.  
  11822. for k, v in pairs( cblockedcmds ) do
  11823.  
  11824. CreateCMDBlockPanel( k )
  11825.  
  11826. end
  11827.  
  11828.  
  11829.  
  11830. end)
  11831.  
  11832.  
  11833.  
  11834.  
  11835.  
  11836.  
  11837.  
  11838. _A.cc_Add( "aegis_camera_spam", function( p, c, a, str )
  11839.  
  11840. blockjpg = !blockjpg
  11841.  
  11842. print( "AEGIS BLOCK CAMERA SCREENSHOT MODE = "..tostring(blockjpg) )
  11843.  
  11844. end )
  11845.  
  11846.  
  11847.  
  11848. --------------------------------------------- ANTICHEAT SCANNER ---------------------------------------------
  11849.  
  11850.  
  11851.  
  11852. local function ispooped( str )
  11853.  
  11854. local status, error = pcall( net.Start, str )
  11855.  
  11856. return status
  11857.  
  11858. end
  11859.  
  11860.  
  11861.  
  11862. local acfags = {
  11863.  
  11864. ["!Cake Anticheat (CAC)"] = {
  11865.  
  11866. desc = "The most common anticheat in use today (and your worst nightmare before you bought Odium)\nHas very strong detections that still stomp skids out of existence 2 years after it was released",
  11867.  
  11868. scan = function() return _A.aegis.anticheats["extensions/client/vehicle.lua"] end,
  11869.  
  11870. },
  11871.  
  11872. ["Simplicity Anticheat (SAC)"] = {
  11873.  
  11874. desc = "Leystryku's new anticheat he released on scriptfodder\nNot as strong as CAC but (apparently) offers better serverside performance",
  11875.  
  11876. scan = function() if _G.simplicity then return true else return false end end,
  11877.  
  11878. },
  11879.  
  11880. ["Quack Anticheat (QAC)"] = {
  11881.  
  11882. desc = "A dated open source anticheat from 2014\nRPtards still edit and use this piece of shit and call it their 1337 private anticheat",
  11883.  
  11884. scan = function() return ( _G.QAC and ispooped( "quack" ) ) end,
  11885.  
  11886. },
  11887.  
  11888. ["Supservers Anticheat"] = {
  11889.  
  11890. desc = "More of a blacklist of public scripts than a true anticheat\nThis rubbish poses no threat to us (be careful of them screengrabbing you though)",
  11891.  
  11892. scan = function() return ispooped( "rp.OrgMotd" ) end,
  11893.  
  11894. },
  11895.  
  11896. ["Screengrab V2"] = {
  11897.  
  11898. desc = "A public utility that can be used to take a screenshot of your client\nOur screenshot cleaner works against this",
  11899.  
  11900. scan = function() if _G.OpenSGMenu then return true else return false end end,
  11901.  
  11902. },
  11903.  
  11904. ["Pablo's Screengrab"] = {
  11905.  
  11906. desc = "A public utility that can be used to take a screenshot of your client\nOur screenshot cleaner works against this",
  11907.  
  11908. scan = function() if _G.SCRG then return true else return false end end,
  11909.  
  11910. },
  11911.  
  11912. ["Enforcer Anti Minge"] = {
  11913.  
  11914. desc = "A general purpose anti minge script that includes anti propkill, anti crash and logging",
  11915.  
  11916. scan = function() if _G.EnforcerAddMessage then return true else return false end end,
  11917.  
  11918. },
  11919.  
  11920. ["AP Anti"] = {
  11921.  
  11922. desc = "A stupidly named open source anti-propkill script\nYou probably won't be able to propkill on this server",
  11923.  
  11924. scan = function() return ispooped( "APAnti AlertNotice" ) end,
  11925.  
  11926. },
  11927.  
  11928.  
  11929.  
  11930. }
  11931.  
  11932.  
  11933.  
  11934.  
  11935.  
  11936. _A.cc_Add( "aegis_view_anticheats", function()
  11937.  
  11938. local acpanel = vgui.Create("DFrame")
  11939.  
  11940. if !acpanel then return end
  11941.  
  11942. acpanel:SetSize(500,455)
  11943.  
  11944. acpanel:SetTitle("Server Security Measures")
  11945.  
  11946. acpanel:Center()
  11947.  
  11948. acpanel:MakePopup()
  11949.  
  11950.  
  11951.  
  11952. acpanel.Paint = function( s, w, h )
  11953.  
  11954. surface.SetDrawColor( Color(30, 30, 30, 255) )
  11955.  
  11956. surface.DrawRect( 0, 0, w, h )
  11957.  
  11958. surface.SetDrawColor( Color(55, 55, 55, 255) )
  11959.  
  11960. surface.DrawOutlinedRect( 0, 0, w, h )
  11961.  
  11962. surface.DrawOutlinedRect( 1, 1, w - 2, h - 2 )
  11963.  
  11964. surface.SetDrawColor( Color(0, 0, 0, 200) )
  11965.  
  11966. surface.DrawRect( 10, 25, w - 20, h - 35 )
  11967.  
  11968. end
  11969.  
  11970.  
  11971.  
  11972. local Plist = vgui.Create( "DPanelList", acpanel )
  11973.  
  11974. Plist:SetSize( acpanel:GetWide() - 20, acpanel:GetTall() - 35 )
  11975.  
  11976. Plist:SetPadding( 5 )
  11977.  
  11978. Plist:SetSpacing( 5 )
  11979.  
  11980. Plist:EnableHorizontal( false )
  11981.  
  11982. Plist:EnableVerticalScrollbar( true )
  11983.  
  11984. Plist:SetPos( 10, 25 )
  11985.  
  11986. Plist:SetName( "" )
  11987.  
  11988.  
  11989.  
  11990.  
  11991.  
  11992. local function CreateACPanel( cmd )
  11993.  
  11994. if !acpanel then return end
  11995.  
  11996. local cmdp = vgui.Create( "DPanel" )
  11997.  
  11998. cmdp:SetSize( Plist:GetWide(), 60 )
  11999.  
  12000. cmdp.Cmd = cmd
  12001.  
  12002. cmdp.Desc = acfags[cmd].desc
  12003.  
  12004. cmdp.Paint = function( s, w, h )
  12005.  
  12006. surface.SetDrawColor( Color(50, 50, 50, 255) )
  12007.  
  12008. surface.DrawRect( 0, 0, w, h )
  12009.  
  12010. surface.SetDrawColor( Color(65, 65, 65, 255) )
  12011.  
  12012. surface.DrawOutlinedRect( 0, 0, w, h )
  12013.  
  12014. surface.DrawLine( 0, 24, w, 24 )
  12015.  
  12016. draw.DrawText( cmdp.Cmd, "DermaDefault", 10, 5, Color(255,255,255) )
  12017.  
  12018. draw.DrawText( cmdp.Desc, "DermaDefault", 10, 28, Color(205,205,255, 100) )
  12019.  
  12020. end
  12021.  
  12022.  
  12023.  
  12024. Plist:AddItem( cmdp )
  12025.  
  12026. end
  12027.  
  12028.  
  12029.  
  12030.  
  12031.  
  12032. for k, v in pairs( acfags ) do
  12033.  
  12034. if v["scan"]() then CreateACPanel( k ) end
  12035.  
  12036. end
  12037.  
  12038. end)
  12039.  
  12040.  
  12041.  
  12042.  
  12043.  
  12044.  
  12045.  
  12046. _A.cc_Add( "aegis_disable_renderpanic", function() videomeme = false runbitchrun = false end)
  12047.  
  12048.  
  12049.  
  12050.  
  12051.  
  12052. --------------------------------------------- LUA_RUN ---------------------------------------------
  12053.  
  12054.  
  12055.  
  12056.  
  12057.  
  12058. _A.cc_Add( "odium_lua_run_cl", function()
  12059.  
  12060. if LuaMenu and LuaMenu:IsVisible() then return end
  12061.  
  12062.  
  12063.  
  12064. LuaMenu = vgui.Create("DFrame")
  12065.  
  12066. LuaMenu:SetSize(500,550)
  12067.  
  12068. LuaMenu:SetTitle("Run Lua")
  12069.  
  12070. LuaMenu:Center()
  12071.  
  12072. LuaMenu:MakePopup()
  12073.  
  12074.  
  12075.  
  12076. LuaMenu.Paint = function( s, w, h )
  12077.  
  12078. surface.SetDrawColor( Color(30, 30, 30, 255) )
  12079.  
  12080. surface.DrawRect( 0, 0, w, h )
  12081.  
  12082. surface.SetDrawColor( Color(55, 55, 55, 245) )
  12083.  
  12084. surface.DrawOutlinedRect( 0, 0, w, h )
  12085.  
  12086. surface.DrawOutlinedRect( 1, 1, w - 2, h - 2 )
  12087.  
  12088. end
  12089.  
  12090.  
  12091.  
  12092. local luatxt = vgui.Create( "DTextEntry", LuaMenu )
  12093.  
  12094. luatxt:SetPos( 5, 25 )
  12095.  
  12096. luatxt:SetSize( LuaMenu:GetWide() - 10, LuaMenu:GetTall() - 65 )
  12097.  
  12098. luatxt:SetText( "" )
  12099.  
  12100. luatxt:SetMultiline( true )
  12101.  
  12102. luatxt.OnChange = function( self )
  12103.  
  12104. end
  12105.  
  12106.  
  12107.  
  12108. local runlua = vgui.Create( "DButton", LuaMenu )
  12109.  
  12110. runlua:SetPos( 5, LuaMenu:GetTall() - 35 )
  12111.  
  12112. runlua:SetText( "Run Lua" )
  12113.  
  12114. runlua:SetTextColor( Color(255, 255, 255, 255) )
  12115.  
  12116. runlua:SetSize( LuaMenu:GetWide() - 10, 30 )
  12117.  
  12118.  
  12119.  
  12120. runlua.Paint = function( self, w, h )
  12121.  
  12122. surface.SetDrawColor( Color(60, 60, 60, 200) )
  12123.  
  12124. surface.DrawRect( 0, 0, w, h )
  12125.  
  12126. surface.SetDrawColor( Color( 60, 60, 60 ) )
  12127.  
  12128. surface.SetMaterial( downgrad )
  12129.  
  12130. surface.DrawTexturedRect( 0, 0, w, h/ 2 )
  12131.  
  12132. surface.SetDrawColor( Color(100, 100, 100, 255) )
  12133.  
  12134. surface.DrawOutlinedRect( 0, 0, w, h )
  12135.  
  12136. end
  12137.  
  12138.  
  12139.  
  12140.  
  12141.  
  12142. runlua.DoClick = function()
  12143.  
  12144. runlau = luatxt:GetValue()
  12145.  
  12146. local run = cstr( runlau, "", false )
  12147.  
  12148. if isfaggot( run ) then _A.engine.RunString( runlau ) else
  12149.  
  12150. print( "YOUR CODE FUCKING SUCKS RETARD" )
  12151.  
  12152. print( run )
  12153.  
  12154. end
  12155.  
  12156. end
  12157.  
  12158.  
  12159.  
  12160. end)
  12161.  
  12162.  
  12163.  
  12164. end
  12165.  
  12166.  
  12167.  
  12168.  
  12169.  
  12170.  
  12171.  
  12172.  
  12173.  
  12174. ------------------------------------------------------------------------------
  12175.  
  12176. -- NOTIFY --
  12177.  
  12178. ------------------------------------------------------------------------------
  12179.  
  12180.  
  12181.  
  12182. local messagetypes = false
  12183.  
  12184. timer.Simple( 5, function() -- have to load this after autorun otherwise Color() doesn't exist
  12185.  
  12186. messagetypes = {
  12187.  
  12188. [1] = { ["col"] = Color( 200, 200, 200 ), ["icon"] = Material( "icon16/application_xp_terminal.png" ) }, -- neutral message
  12189.  
  12190. [2] = { ["col"] = Color( 250, 200, 140 ), ["icon"] = Material( "icon16/cross.png" ) }, -- negative message
  12191.  
  12192. [3] = { ["col"] = Color( 180, 250, 180 ), ["icon"] = Material( "icon16/tick.png" ) }, -- positive message
  12193.  
  12194. [4] = { ["col"] = Color( 250, 140, 140 ), ["icon"] = Material( "icon16/error.png" ) }, -- error message
  12195.  
  12196. [5] = { ["col"] = Color( 180, 180, 250 ), ["icon"] = Material( "icon16/user.png" ) }, -- blue message
  12197.  
  12198. [6] = { ["col"] = Color( 250, 250, 180 ), ["icon"] = Material( "icon16/lightbulb.png" ) }, -- lightbulb message
  12199.  
  12200. }
  12201.  
  12202. end )
  12203.  
  12204.  
  12205.  
  12206. local aegiscomponent = { color = -1, name = "Aegis" }
  12207.  
  12208.  
  12209.  
  12210. local notifies = {}
  12211.  
  12212. local tableinsert = table.insert
  12213.  
  12214. local istable = istable
  12215.  
  12216. local error = error
  12217.  
  12218.  
  12219.  
  12220. function _A.aegis.Notify( component, type, text )
  12221.  
  12222. if !messagetypes then return end
  12223.  
  12224. if !component or !istable( component ) then component = { color = Color( 255, 0, 0 ), name = "DEFINE A SCRIPT COMPONENT PROPERLY YOU AUTIST" } end
  12225.  
  12226. if !messagetypes[type] then
  12227.  
  12228. tableinsert( notifies, { ["time"] = CurTime() + 10, ["ccol"] = Color(255,0,0), ["ctxt"] = "[ AEGIS ERROR ]", ["icon"] = "icon16/error.png", ["col"] = Color(255,0,0), ["txt"] = "Invalid aegis notify type! must be 1-6!" } )
  12229.  
  12230. return
  12231.  
  12232. end
  12233.  
  12234. if component.color == -1 then component.color = Color( 55, 55, 155 ) end
  12235.  
  12236. tableinsert( notifies, { ["time"] = CurTime() + 10, ["ccol"] = component.color, ["ctxt"] = "[ "..component.name.." ]", ["icon"] = messagetypes[type].icon, ["col"] = messagetypes[type].col, ["txt"] = text } )
  12237.  
  12238. end
  12239.  
  12240.  
  12241.  
  12242.  
  12243.  
  12244. -- odium.aegis.Notify( { color = -1, name = "Aegis" }, 1, "NIGGERS" )
  12245.  
  12246.  
  12247.  
  12248. local function DrawNotifies()
  12249.  
  12250. -- if !messagetypes then return end
  12251.  
  12252. local x, y = 10, ScrH() / 2
  12253.  
  12254. local cutoff = 0
  12255.  
  12256. for k, v in pairs( notifies ) do
  12257.  
  12258. if cutoff > 30 then continue end
  12259.  
  12260. cutoff = cutoff + 1
  12261.  
  12262. local lx = 10
  12263.  
  12264. local timeleft = v.time - CurTime()
  12265.  
  12266. if timeleft < 2 then lx = 10 - ( ( 2 - timeleft ) * 800 ) end -- pull back into the edge of the screen at the end of the timer
  12267.  
  12268. if timeleft <= 0.5 then notifies[k] = nil continue end -- your time is up faggot
  12269.  
  12270. local bgcol = Color( v.ccol.r, v.ccol.g, v.ccol.b, 145 )
  12271.  
  12272. local bgcol2 = Color( v.col.r, v.col.g, v.col.b, 145 )
  12273.  
  12274. surface.SetDrawColor( v.ccol )
  12275.  
  12276. local txw, txh = draw.SimpleText( v.ctxt, "Trebuchet18", lx, y, v.ccol, 0, 0 )
  12277.  
  12278.  
  12279.  
  12280. surface.SetDrawColor( bgcol )
  12281.  
  12282. surface.DrawRect( lx - 5, y - 1, txw + 10, 20 )
  12283.  
  12284. surface.DrawLine( lx - 5, y - 1, lx - 5 + (txw + 10), y - 1 )
  12285.  
  12286.  
  12287.  
  12288. surface.SetDrawColor( Color(255,255,255, 150) )
  12289.  
  12290. surface.SetMaterial( v.icon )
  12291.  
  12292. surface.DrawTexturedRect( (lx - 5) + txw + 16, y + 1, 16, 16 )
  12293.  
  12294.  
  12295.  
  12296. txw = txw + 22
  12297.  
  12298.  
  12299.  
  12300. surface.SetDrawColor( bgcol2 )
  12301.  
  12302. local txw2, txh2 = draw.SimpleText( v.txt, "Trebuchet18", (lx - 5) + txw + 20, y, v.col, 0, 0 )
  12303.  
  12304. surface.DrawRect( (lx - 5) + txw + 15, y - 1, txw2 + 10, 20 )
  12305.  
  12306. surface.DrawLine( (lx - 5) + txw + 15, y - 1, ((lx - 5) + txw + 15) + txw2 + 10, y - 1 )
  12307.  
  12308.  
  12309.  
  12310. y = y - 25
  12311.  
  12312. end
  12313.  
  12314. end
  12315.  
  12316.  
  12317.  
  12318. timer.Simple( 6, function()
  12319.  
  12320. _A.h_Add( "HUDPaint", "AegisNotifications", DrawNotifies )
  12321.  
  12322. -- _A.aegis.Notify( aegiscomponent, 1, "BLACK PEOPLE" )
  12323.  
  12324. end )
  12325.  
  12326.  
  12327.  
  12328.  
  12329.  
  12330. local function InjectCCSystem()
  12331.  
  12332. --[[
  12333.  
  12334. ANUBIS CHANGE
  12335.  
  12336. This function was having a bit of a cry when the second argument to concommand.Add, func,
  12337.  
  12338. was null. I just added a little check that makes sure func is A ok to be used.
  12339.  
  12340. ]]
  12341.  
  12342. local _concommandAdd = concommand.Add
  12343.  
  12344. concommand.Add = aegis.Detour( concommand.Add, function( ... )
  12345.  
  12346. local args = {...}
  12347.  
  12348. local func = args[2]
  12349.  
  12350.  
  12351.  
  12352. if func and jufi(func).source == "@" then
  12353.  
  12354. return _A.cc_Add( ... )
  12355.  
  12356. end
  12357.  
  12358.  
  12359.  
  12360. return _concommandAdd( ... )
  12361.  
  12362. end)
  12363.  
  12364.  
  12365.  
  12366. local _concommandRun = concommand.Run
  12367.  
  12368. concommand.Run = aegis.Detour( concommand.Run, function( player, command, arguments, args )
  12369.  
  12370. _concommandRun( player, command, arguments, args )
  12371.  
  12372.  
  12373.  
  12374. local LowerCommand = string.lower( command )
  12375.  
  12376.  
  12377.  
  12378. if ( CommandList2[ LowerCommand ] != nil ) then
  12379.  
  12380. CommandList2[ LowerCommand ]( player, command, arguments, args )
  12381.  
  12382. return true
  12383.  
  12384. end
  12385.  
  12386.  
  12387.  
  12388. return false
  12389.  
  12390. end, "concommand.Run")
  12391.  
  12392.  
  12393.  
  12394. InjectAegisCommands()
  12395.  
  12396.  
  12397.  
  12398. print("////////////////// Project Odium Detours: Stage 3 Initialized //////////////////")
  12399.  
  12400. end
  12401.  
  12402.  
  12403.  
  12404.  
  12405.  
  12406. local blockincludes = {
  12407.  
  12408. // gpseak crashes us so lets block it from loading
  12409.  
  12410. ["lib/preferences.lua/preferences.lua"] = true,
  12411.  
  12412. ["lib/i18n.lua/i18n.lua"] = true,
  12413.  
  12414. ["conf/theme.lua"] = true,
  12415.  
  12416. ["speak/cl_main.lua"] = true,
  12417.  
  12418. ["conf/emoticons.lua"] = true,
  12419.  
  12420. }
  12421.  
  12422.  
  12423.  
  12424. local ac = {
  12425.  
  12426. ["extensions/client/vehicle.lua"] = "!cake anticheat",
  12427.  
  12428. ["autorun/simplicityac.lua"] = "simplicity anticheat",
  12429.  
  12430. }
  12431.  
  12432.  
  12433.  
  12434. local old_include = include
  12435.  
  12436. include = aegis.Detour( include, function( str )
  12437.  
  12438. if ac[str] then
  12439.  
  12440. _A.aegis.anticheats[str] = ac[str]
  12441.  
  12442. aegis.log( "Anticheat detected: "..ac[str] )
  12443.  
  12444. end
  12445.  
  12446. if blockincludes[str] then
  12447.  
  12448. aegis.log( "Blocked loading of naughty file: "..str )
  12449.  
  12450. return
  12451.  
  12452. end
  12453.  
  12454. if str == "ulib/shared/sh_ucl.lua" then InjectHookSystem() end -- inject it again cos ulx just raped us
  12455.  
  12456. return old_include(str)
  12457.  
  12458. end)
  12459.  
  12460.  
  12461.  
  12462.  
  12463.  
  12464.  
  12465.  
  12466. local saferequires = {
  12467.  
  12468. ["baseclass"] = true,
  12469.  
  12470. ["concommand"] = true,
  12471.  
  12472. ["saverestore"] = true,
  12473.  
  12474. ["hook"] = true,
  12475.  
  12476. ["gamemode"] = true,
  12477.  
  12478. ["weapons"] = true,
  12479.  
  12480. ["scripted_ents"] = true,
  12481.  
  12482. ["player_manager"] = true,
  12483.  
  12484. ["numpad"] = true,
  12485.  
  12486. ["team"] = true,
  12487.  
  12488. ["undo"] = true,
  12489.  
  12490. ["cleanup"] = true,
  12491.  
  12492. ["duplicator"] = true,
  12493.  
  12494. ["constraint"] = true,
  12495.  
  12496. ["construct"] = true,
  12497.  
  12498. ["usermessage"] = true,
  12499.  
  12500. ["list"] = true,
  12501.  
  12502. ["cvars"] = true,
  12503.  
  12504. ["http"] = true,
  12505.  
  12506. ["properties"] = true,
  12507.  
  12508. ["widget"] = true,
  12509.  
  12510. ["cookie"] = true,
  12511.  
  12512. ["utf8"] = true,
  12513.  
  12514. ["drive"] = true,
  12515.  
  12516. ["draw"] = true,
  12517.  
  12518. ["markup"] = true,
  12519.  
  12520. ["effects"] = true,
  12521.  
  12522. ["halo"] = true,
  12523.  
  12524. ["killicon"] = true,
  12525.  
  12526. ["spawnmenu"] = true,
  12527.  
  12528. ["controlpanel"] = true,
  12529.  
  12530. ["presets"] = true,
  12531.  
  12532. ["menubar"] = true,
  12533.  
  12534. ["matproxy"] = true,
  12535.  
  12536. }
  12537.  
  12538.  
  12539.  
  12540. local tocopy = ""
  12541.  
  12542. local hooksinjected = false
  12543.  
  12544. local old_req = require
  12545.  
  12546. _A.require = old_req
  12547.  
  12548. require = aegis.Detour( require, function( str )
  12549.  
  12550. if tocopy != "" and _G[tocopy] then
  12551.  
  12552. _A.G[tocopy] = tabble.Copy( _G[tocopy] )
  12553.  
  12554. tocopy = ""
  12555.  
  12556. end
  12557.  
  12558.  
  12559.  
  12560. if saferequires[str] and saferequires[str] != -1 then
  12561.  
  12562. tocopy = str
  12563.  
  12564. saferequires[str] = -1
  12565.  
  12566. end
  12567.  
  12568.  
  12569.  
  12570. if str == "gamemode" and !hooksinjected then InjectHookSystem() InjectCCSystem() end
  12571.  
  12572. return old_req(str)
  12573.  
  12574. end)
  12575.  
  12576.  
  12577.  
  12578. local renderview = render.RenderView
  12579.  
  12580. local renderclear = render.Clear
  12581.  
  12582. local rendercap = render.Capture
  12583.  
  12584. --local eyepos = EyePos
  12585.  
  12586. --local eyeang = EyeAngles
  12587.  
  12588. local vgetworldpanel = vgui.GetWorldPanel
  12589.  
  12590.  
  12591.  
  12592.  
  12593.  
  12594.  
  12595.  
  12596. local function renderpanic( delay )
  12597.  
  12598. if runbitchrun then return end
  12599.  
  12600. runbitchrun = true
  12601.  
  12602. renderclear( 0, 0, 0, 255, true, true )
  12603.  
  12604.  
  12605.  
  12606. renderview( {
  12607.  
  12608. origin = LocalPlayer():EyePos(),
  12609.  
  12610. angles = LocalPlayer():EyeAngles(),
  12611.  
  12612. x = 0,
  12613.  
  12614. y = 0,
  12615.  
  12616. w = ScrW(),
  12617.  
  12618. h = ScrH(),
  12619.  
  12620. dopostprocess = true,
  12621.  
  12622. drawhud = true,
  12623.  
  12624. drawmonitors = true,
  12625.  
  12626. drawviewmodel = true
  12627.  
  12628. } )
  12629.  
  12630.  
  12631.  
  12632. local worldpanel = vgetworldpanel()
  12633.  
  12634. if IsValid( worldpanel ) then
  12635.  
  12636. worldpanel:SetPaintedManually( true )
  12637.  
  12638. end
  12639.  
  12640.  
  12641.  
  12642. for k, v in pairs( ents.GetAll() ) do
  12643.  
  12644. if v:GetColor() and v:GetColor().a == 100 and v:GetRenderMode() and v:GetRenderMode() == 4 then v:SetColor( Color( 255, 255, 255 ) ) end
  12645.  
  12646. end
  12647.  
  12648.  
  12649.  
  12650. timer.Simple( delay, function()
  12651.  
  12652. vgetworldpanel():SetPaintedManually( false )
  12653.  
  12654. runbitchrun = false
  12655.  
  12656. end)
  12657.  
  12658. end
  12659.  
  12660.  
  12661.  
  12662.  
  12663.  
  12664.  
  12665.  
  12666.  
  12667.  
  12668.  
  12669.  
  12670. local findmeta = FindMetaTable
  12671.  
  12672. local ply = findmeta( "Player" )
  12673.  
  12674. local oconcommand = ply.ConCommand
  12675.  
  12676. ply.ConCommand = aegis.Detour( ply.ConCommand, function( pl, cmd, ... )
  12677.  
  12678.  
  12679.  
  12680. if string.lower(cmd) == "jpeg" then
  12681.  
  12682. if blockjpg then return end
  12683.  
  12684. renderpanic( 0.2 )
  12685.  
  12686. oconcommand( pl, cmd, ... )
  12687.  
  12688. timer.Simple( 0.2, function()
  12689.  
  12690. _A.aegis.Notify( aegiscomponent, 3, "Protected your client from jpeg screenshot request" )
  12691.  
  12692. end )
  12693.  
  12694. return
  12695.  
  12696. end
  12697.  
  12698.  
  12699.  
  12700. if string.lower(cmd) == "__screenshot_internal" then
  12701.  
  12702. renderpanic( 0.3 )
  12703.  
  12704. oconcommand( pl, cmd, ... )
  12705.  
  12706. timer.Simple( 0.3, function()
  12707.  
  12708. _A.aegis.Notify( aegiscomponent, 3, "Protected your client from __screenshot_internal request" )
  12709.  
  12710. end )
  12711.  
  12712. return
  12713.  
  12714. end
  12715.  
  12716.  
  12717.  
  12718. return oconcommand( pl, cmd, ... )
  12719.  
  12720. end)
  12721.  
  12722.  
  12723.  
  12724.  
  12725.  
  12726. render.Capture = aegis.Detour( render.Capture, function( data )
  12727.  
  12728. renderpanic( 0.05 )
  12729.  
  12730. local capture = rendercap( data )
  12731.  
  12732. return capture
  12733.  
  12734. end )
  12735.  
  12736.  
  12737.  
  12738. local orcp = render.CapturePixels
  12739.  
  12740. render.CapturePixels = aegis.Detour( render.CapturePixels, function(...)
  12741.  
  12742. renderpanic( 0.05 )
  12743.  
  12744. orcp( ... )
  12745.  
  12746. return
  12747.  
  12748. end )
  12749.  
  12750.  
  12751.  
  12752.  
  12753.  
  12754.  
  12755.  
  12756.  
  12757.  
  12758.  
  12759.  
  12760. --local chattxt = chat.AddText
  12761.  
  12762. local orcc = RunConsoleCommand
  12763.  
  12764. RunConsoleCommand = aegis.Detour( RunConsoleCommand, function( cmd, ... )
  12765.  
  12766.  
  12767.  
  12768. if string.lower(cmd) == "__screenshot_internal" then
  12769.  
  12770. renderpanic( 0.3 )
  12771.  
  12772. orcc( cmd, ... )
  12773.  
  12774. timer.Simple( 0.3, function()
  12775.  
  12776. _A.aegis.Notify( aegiscomponent, 3, "Protected your client from __screenshot_internal request" )
  12777.  
  12778. end )
  12779.  
  12780. return
  12781.  
  12782. end
  12783.  
  12784.  
  12785.  
  12786. if string.lower(cmd) == "jpeg" then
  12787.  
  12788. renderpanic( 0.2 )
  12789.  
  12790. orcc( cmd, ... )
  12791.  
  12792. timer.Simple( 0.2, function()
  12793.  
  12794. _A.aegis.Notify( aegiscomponent, 3, "Protected your client from jpeg screenshot request" )
  12795.  
  12796. end )
  12797.  
  12798. return
  12799.  
  12800. end
  12801.  
  12802.  
  12803.  
  12804. return orcc( cmd, ... )
  12805.  
  12806. end )
  12807.  
  12808.  
  12809.  
  12810. local gayinfonum = gcinfo()
  12811.  
  12812. local gayinfo = gcinfo
  12813.  
  12814. gcinfo = aegis.Detour( gcinfo, function( ... )
  12815.  
  12816. local onum = gayinfo( ... )
  12817.  
  12818. local newnum = onum - gayinfonum
  12819.  
  12820. return newnum
  12821.  
  12822. end)
  12823.  
  12824.  
  12825.  
  12826. local nigger = string.find
  12827.  
  12828. local function protectpath( f )
  12829.  
  12830. local inf = dbginfo( 4 )
  12831.  
  12832. if !inf then return true end
  12833.  
  12834. local src = inf.source
  12835.  
  12836. return nigger( f, "acebot_settings.dat" ) and src != "@"
  12837.  
  12838. end
  12839.  
  12840.  
  12841.  
  12842. local fagopen = file.Open
  12843.  
  12844. file.Open = aegis.Detour( file.Open, function( f, m, p )
  12845.  
  12846. if protectpath( f ) then return end
  12847.  
  12848. return fagopen( f, m, p )
  12849.  
  12850. end )
  12851.  
  12852.  
  12853.  
  12854. local fagexists = file.Exists
  12855.  
  12856. file.Exists = aegis.Detour( file.Open, function( f, p )
  12857.  
  12858. if protectpath( f ) then return false end
  12859.  
  12860. return fagexists( f, p )
  12861.  
  12862. end )
  12863. local s, odium = pcall( collectgarbage, 'odium' ) if (not odium) or (not odium.aegis) then
  12864.  
  12865. return
  12866.  
  12867. end
  12868.  
  12869.  
  12870.  
  12871. local playerTable = FindMetaTable("Player")
  12872.  
  12873. local cbacks = {}
  12874.  
  12875. local blockedCmds = {}
  12876.  
  12877.  
  12878.  
  12879. local _oRunConsoleCommand = RunConsoleCommand
  12880.  
  12881. local _oConCommand = playerTable.ConCommand
  12882.  
  12883.  
  12884.  
  12885. local _oInclude = include
  12886.  
  12887. local _oRequire = require
  12888.  
  12889.  
  12890.  
  12891. local _ipairs = ipairs
  12892.  
  12893. local _Getfenv = debug.getfenv
  12894.  
  12895. local oStr, oValue = nil
  12896.  
  12897.  
  12898.  
  12899. local unlock_time
  12900.  
  12901. local tbl_BadSrc = {}
  12902.  
  12903.  
  12904.  
  12905. local function LogString( str )
  12906.  
  12907. chat.AddText(Color(134, 171, 167), "Iron-Curtain # ", Color(255, 255, 255), str)
  12908.  
  12909. end
  12910.  
  12911.  
  12912.  
  12913. local function StartsWith( source, with )
  12914.  
  12915. local len = with:len()
  12916.  
  12917.  
  12918.  
  12919. if(source:len() < len) then
  12920.  
  12921. return false
  12922.  
  12923. end
  12924.  
  12925.  
  12926.  
  12927. for i=1, len do
  12928.  
  12929. if(source[i] ~= with[i]) then
  12930.  
  12931. return false
  12932.  
  12933. end
  12934.  
  12935. end
  12936.  
  12937.  
  12938.  
  12939. return true
  12940.  
  12941. end
  12942.  
  12943.  
  12944.  
  12945. local function IsBadSource( info )
  12946.  
  12947. if(not info) then
  12948.  
  12949. return false
  12950.  
  12951. end
  12952.  
  12953.  
  12954.  
  12955. if((info.short_src:find("[C]")) or (info.short_src:find("LuaCmd"))) then
  12956.  
  12957. return true
  12958.  
  12959. end
  12960.  
  12961.  
  12962.  
  12963. return false
  12964.  
  12965. end
  12966.  
  12967.  
  12968.  
  12969. local function Alert()
  12970.  
  12971. local t = os.time()
  12972.  
  12973.  
  12974.  
  12975. if(unlock_time == nil) then
  12976.  
  12977. unlock_time = t + 3
  12978.  
  12979. elseif(t > unlock_time) then
  12980.  
  12981. unlock_time = t + 3
  12982.  
  12983. else return end
  12984.  
  12985.  
  12986.  
  12987. LogString("We've blocked a malicious attempt to read GMod's memory.")
  12988.  
  12989. end
  12990.  
  12991.  
  12992.  
  12993. ipairs = odium.aegis.Detour( ipairs, function ( tbl )
  12994.  
  12995. local str, val = debug.getupvalue( ipairs, 1 )
  12996.  
  12997.  
  12998.  
  12999. if(type(val) == "number") then
  13000.  
  13001. Alert()
  13002.  
  13003. debug.setupvalue(_ipairs, 1, oValue)
  13004.  
  13005.  
  13006.  
  13007. local info = debug.getinfo( 1 )
  13008.  
  13009. table.insert(tbl_BadSrc, info.short_src)
  13010.  
  13011. return _ipairs({ })
  13012.  
  13013. end
  13014.  
  13015.  
  13016.  
  13017. return _ipairs( tbl )
  13018.  
  13019. end)
  13020.  
  13021.  
  13022.  
  13023. debug.getfenv = odium.aegis.Detour( debug.getfenv, function ( tbl )
  13024.  
  13025. local info = debug.getinfo( 1 )
  13026.  
  13027. if(table.HasValue(tbl_BadSrc, info.short_src)) then
  13028.  
  13029. local key = table.KeyFromValue(tbl_BadSrc, info.short_src)
  13030.  
  13031.  
  13032.  
  13033. if(key ~= nil) then
  13034.  
  13035. table.remove(tbl_BadSrc, key)
  13036.  
  13037. return nil
  13038.  
  13039. end
  13040.  
  13041. end
  13042.  
  13043.  
  13044.  
  13045. return _Getfenv( tbl )
  13046.  
  13047. end)
  13048.  
  13049. oStr, oValue = debug.getupvalue(_ipairs, 1)
  13050.  
  13051.  
  13052.  
  13053. --[[
  13054.  
  13055. WaitForPostLoad
  13056.  
  13057. Summary:
  13058.  
  13059. ]]
  13060.  
  13061.  
  13062.  
  13063. include = odium.aegis.Detour( include, function ( file )
  13064.  
  13065. local inc = _oInclude( file )
  13066.  
  13067.  
  13068.  
  13069. local ctr = 1
  13070.  
  13071. for k,v in pairs(cbacks) do
  13072.  
  13073. if(string.find(file, k)) then
  13074.  
  13075. v()
  13076.  
  13077. table.remove(cbacks, ctr)
  13078.  
  13079. end
  13080.  
  13081.  
  13082.  
  13083. ctr = ctr + 1
  13084.  
  13085. end
  13086.  
  13087. return inc
  13088.  
  13089. end)
  13090.  
  13091.  
  13092.  
  13093. require = odium.aegis.Detour( require, function ( file )
  13094.  
  13095. local req = _oRequire( file )
  13096.  
  13097.  
  13098.  
  13099. local ctr = 1
  13100.  
  13101. for k,v in pairs(cbacks) do
  13102.  
  13103. if(string.find(file, k)) then
  13104.  
  13105. v()
  13106.  
  13107. table.remove(cbacks, ctr)
  13108.  
  13109. end
  13110.  
  13111.  
  13112.  
  13113. ctr = ctr + 1
  13114.  
  13115. end
  13116.  
  13117. return req
  13118.  
  13119. end)
  13120.  
  13121.  
  13122.  
  13123. local function WaitForPostLoad( file, callback )
  13124.  
  13125. if(cbacks[file] ~= nil) then
  13126.  
  13127. return
  13128.  
  13129. end
  13130.  
  13131. cbacks[file] = callback
  13132.  
  13133. end
  13134.  
  13135.  
  13136.  
  13137. --
  13138.  
  13139.  
  13140.  
  13141. --[[
  13142.  
  13143. ConCommand blocking
  13144.  
  13145. Summary:
  13146.  
  13147. ]]
  13148.  
  13149. local function IsCommandBlocked( cmd_raw )
  13150.  
  13151. for k,v in pairs(blockedCmds) do
  13152.  
  13153. if(StartsWith(cmd_raw, v) == true) then
  13154.  
  13155. return true
  13156.  
  13157. end
  13158.  
  13159. end
  13160.  
  13161.  
  13162.  
  13163. return false
  13164.  
  13165. end
  13166.  
  13167.  
  13168.  
  13169. RunConsoleCommand = odium.aegis.Detour( RunConsoleCommand, function ( cmd, ... )
  13170.  
  13171. if(IsCommandBlocked(cmd) and IsBadSource()) then
  13172.  
  13173. return
  13174.  
  13175. end
  13176.  
  13177.  
  13178.  
  13179. return _oRunConsoleCommand( cmd, ... )
  13180.  
  13181. end)
  13182.  
  13183.  
  13184.  
  13185. playerTable.ConCommand = odium.aegis.Detour( playerTable.ConCommand, function ( ply, cmd )
  13186.  
  13187. if(IsCommandBlocked(cmd) and IsBadSource()) then
  13188.  
  13189. return
  13190.  
  13191. end
  13192.  
  13193. return _oConCommand( ply, cmd )
  13194.  
  13195. end)
  13196.  
  13197.  
  13198.  
  13199. function ProtectCommand(cmd)
  13200.  
  13201. if(blockedCmds[cmd] ~= nil) then
  13202.  
  13203. return
  13204.  
  13205. end
  13206.  
  13207. blockedCmds[#blockedCmds + 1] = cmd
  13208.  
  13209. end
  13210.  
  13211.  
  13212.  
  13213. function UnProtectCommand(cmd)
  13214.  
  13215. for k,v in pairs(blockedCmds) do
  13216.  
  13217. if(v == cmd) then
  13218.  
  13219. odium.security.BlockRemoteExecCmd(cmd, false)
  13220.  
  13221. table.remove(blockedCmds, k)
  13222.  
  13223. break
  13224.  
  13225. end
  13226.  
  13227. end
  13228.  
  13229. end
  13230.  
  13231.  
  13232.  
  13233. WaitForPostLoad("hook", function ()
  13234.  
  13235. hook.Add("InitPostEntity", "BlockCmds", function ()
  13236.  
  13237. if(odium and odium.GetConCommandList) then
  13238.  
  13239. local aegis_Cmds = odium.GetConCommandList()
  13240.  
  13241. for k,v in pairs(aegis_Cmds) do
  13242.  
  13243. ProtectCommand(k)
  13244.  
  13245. end
  13246.  
  13247. end
  13248.  
  13249.  
  13250.  
  13251. for k,v in pairs(blockedCmds) do
  13252.  
  13253. odium.security.BlockRemoteExecCmd(v, true)
  13254.  
  13255. end
  13256.  
  13257. end)
  13258.  
  13259. end)
  13260.  
  13261. --
  13262.  
  13263.  
  13264.  
  13265. print("# Iron-Curtain #")
  13266.  
  13267. print("# Garry's Mod Client Security")
  13268.  
  13269. print("# created by Anubis")
  13270.  
  13271.  
  13272.  
  13273. -- Some default commands to protect.
  13274.  
  13275. ProtectCommand("say")
  13276.  
  13277. ProtectCommand("impulse")
  13278.  
  13279. ProtectCommand("pp_texturize")
  13280.  
  13281. ProtectCommand("pp_texturize_scale")
Add Comment
Please, Sign In to add comment