Advertisement
Caliber_

Gmod leak dump part 2: Lucid HVH

Dec 31st, 2017
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 198.58 KB | None | 0 0
  1. local BypassHooks = {
  2. {"Think", "HackThink"},
  3. {"PlayerBindPress", "HackPBP"},
  4. {"FinishChat", "chatclosed"},
  5. {"StartChat", "chatopened"},
  6. {"Move", "HackMove"},
  7. {"RenderScreenspaceEffects", "HackRSE"},
  8. {"PreDrawOpaqueRenderables", "HackPDOR"},
  9. {"OnPlayerChat", "HackOPC"},
  10. {"player_disconnect", "HackPD"},
  11. {"player_connect", "HackPC"},
  12. {"player_hurt", "HackPH"},
  13. {"entity_killed", "HackEK"},
  14. {"HUDPaint", "HackHP"},
  15. {"DrawOverlay", "HackDO"},
  16. {"CreateMove", "HackCM"},
  17. {"CalcView", "HackCV"},
  18. {"ShouldDrawLocalPlayer", "HackSDLP"},
  19. {"PreDrawPlayerHands", "HackPDPH"},
  20. {"PostDrawViewModel", "HackPoDVM"},
  21. {"PreDrawViewModel", "HackPrDVM"},
  22. {"ScalePlayerDamage", "HackSPD"},
  23. }
  24.  
  25.  
  26. local pcall = pcall;
  27. local require = require;
  28. screengrab = false
  29. voicechat = 0
  30. lemver = "1.6.6.8"
  31. fa = Angle(0,0,0)
  32. menuscol = Color(255, 255, 255, 255)
  33. local actualRenderCapture = _G.render.Capture
  34.  
  35. local TestCH = false
  36. local FuckHooks = _G.hook.GetTable
  37. MyHooks = FuckHooks()
  38. TestCH = true
  39. /*
  40.         for k,v in next, BypassHooks do
  41.         if MyHooks[v[1]] then
  42.                 if MyHooks[v[1]][v[2]] then
  43.                         MyHooks[v[1]][v[2]] = nil
  44.                 end
  45.         end
  46.         if MyHooks[v[1]] then
  47.                 if !MyHooks[v[1]][1] then
  48.                         MyHooks[v[1]] = nil
  49.                 end
  50.         end
  51.         TestCH = true
  52.         end
  53.         return MyHooks
  54. */
  55. if TestCH then
  56. function hook.GetTable()
  57. --MsgC( menuscol, "[LucidCheats]", Color(255,255,255,255), " Blocked an attempt to sniff your hook table\n" )
  58.  
  59. end
  60. function concommand.GetTable()
  61. --MsgC( menuscol, "[LucidCheats]", Color(255,255,255,255), " Blocked an attempt to sniff your ConCommand table\n" )
  62.  
  63. end
  64. end
  65.  
  66. timer.Destroy( "STC" )        
  67. hook.Remove("PlayerInitialSpawn", "AddPlayer")       --I hate niggers
  68. hook.Remove("OnGamemodeLoaded", "___scan_g_init")      
  69. hook.Remove("PlayerSay", "screengrab_playersay")      
  70. hook.Remove("Think", "PlayerInfoThing")        
  71. timer.Destroy("AntiCheatTimer")        
  72. timer.Destroy("testing123")        
  73. hook.Remove("Think", "sh_menu")      
  74. if MOTDgd or MOTDGD then
  75. function MOTDgd.GetIfSkip()
  76.  
  77. return true
  78. end
  79. end
  80.  
  81. local OriginalGetConVarNumber = GetConVarNumber;
  82.  
  83. function GetConVarNumber( name )
  84.     if ( name == "sv_allowcslua" or name == "sv_cheats" or name == "host_framerate" or name == "mat_fullbright") then
  85.         return 0;
  86.     else
  87.         return OriginalGetConVarNumber( name );
  88.     end
  89. end
  90.  
  91.  
  92.  
  93. --QAC-Bypass LOL
  94.  
  95.         function debug.getinfo(indexkid)
  96.                 return
  97.         end
  98.  
  99.         function _G.debug.getinfo(indexkid)
  100.                 return
  101.         end
  102.  
  103.         _G.debug.getinfo = function(indexkid)
  104.                 return
  105.         end
  106.  
  107.         debug.getinfo = function(indexkid)
  108.                 return
  109.         end
  110.  
  111. --Fuck your hook checker v2 electric boogaloo
  112.  
  113. --Big Private lucid hvh cheat now released for all your pasting needs
  114.  
  115. --[[
  116.     ██╗     ██╗   ██╗ ██████╗██╗██████╗ ████████╗███████╗ █████╗ ███╗   ███╗
  117.     ██║     ██║   ██║██╔════╝██║██╔══██╗╚══██╔══╝██╔════╝██╔══██╗████╗ ████║
  118.     ██║     ██║   ██║██║     ██║██║  ██║   ██║   █████╗  ███████║██╔████╔██║
  119.     ██║     ██║   ██║██║     ██║██║  ██║   ██║   ██╔══╝  ██╔══██║██║╚██╔╝██║
  120.     ███████╗╚██████╔╝╚██████╗██║██████╔╝██╗██║   ███████╗██║  ██║██║ ╚═╝ ██║
  121.     ╚══════╝ ╚═════╝  ╚═════╝╚═╝╚═════╝ ╚═╝╚═╝   ╚══════╝╚═╝  ╚═╝╚═╝     ╚═╝
  122. ]]
  123. --concommand.Run( LocalPlayer(), "say", "niggers" )
  124.  
  125. checkfovang = Angle(0,0,0)
  126. checkfovpos = Vector(0,0,0)
  127. showfov =false
  128.  
  129.     --[[function render.Capture(nice)
  130.         chat.AddText(Color(255,255,0), "[WARNING] ", Color(255,255,255), "Someone screengrabbed you.")
  131.         chat.AddText(color_white, "")
  132.         chat.AddText(color_white, "")
  133.         chat.AddText(color_white, "")
  134.         chat.AddText(color_white, "")
  135.         chat.AddText(color_white, "")
  136.         chat.AddText(color_white, "")
  137.         chat.AddText(color_white, "")
  138.         chat.AddText(color_white, "")
  139.         screengrab = true
  140.         test = actualRenderCapture(nice)
  141.         return self
  142.     end]]
  143. if !oldRC then
  144. oldRC = render.Capture
  145. end
  146. rndrView = render.RenderView
  147. rndrHUD = render.RenderHUD
  148. scnx = ScrW()
  149. beenscreened = 0
  150. screenbl = 255
  151. if !fullbrightstart && GetConVarNumber("mat_fullbright") == 1 then
  152.     fullbrightstart = true
  153.     CSfb = true
  154. end
  155.  
  156. render.Capture = function( ... )
  157.     screengrab = true
  158.     SGCheck = nil
  159.     beenscreened = beenscreened + 1
  160.     surface.PlaySound("vo/npc/female01/uhoh.wav")
  161.     screenbl = 0
  162.     if CSfb then
  163.         GetConVar("mat_fullbright"):SetValue(1)
  164.     else
  165.         GetConVar("mat_fullbright"):SetValue(0)
  166.     end
  167.     GetConVar("r_3dsky"):SetValue(1)
  168.     GetConVar("r_drawskybox"):SetValue(1)
  169.     GetConVar("gl_clear"):SetValue(1)
  170.     rndrView({
  171.         origin = LocalPlayer():EyePos(), -- change to your liking
  172.         angles = LocalPlayer():EyeAngles(), -- change to your liking
  173.         x = 0,
  174.         y = 0,
  175.         w = ScrW(),
  176.         h = ScrH(),
  177.         drawhud = true,
  178.         drawviewmodel = true,
  179.      })
  180.     rndrHUD(0,0,ScrW(),ScrH())
  181.     SGCheck = oldRC( ... )
  182.  
  183.     screengrab = false
  184.     if SGCheck then
  185.     return SGCheck
  186.     end
  187. end
  188.  
  189. inserttime = 0
  190. custtest = {}
  191.  
  192.  
  193. whiteslest = {
  194.     "q43j9UTUc9WnJ2swfkMw52v38", --GrandpaTroll
  195.     "9oNriRkwbiYg6YOS3iOnrgleD", --Lemon
  196.     "Jmr5Y764PPLhTtrSeD1Cj4tua", --Red
  197.     "Ku3DSlPoT2FgvL4o6AdYOBm6T", --Mike
  198.     "34NPrV1rKIfq4MSuah52n5kZl", --HiptonismHD
  199.     "qSVdLwIWnG88NNnB6n8ULpN61", --Glitch
  200.     "fqHj495cpD3vIzz98wT4E8ew6", --DeadMan
  201.     "8zRYakXdO8u1xlqRf6P1z155q", --T.R
  202.     "PFk94nCfcEpzqf4y9w4ZyH8i2", --HomieKOS
  203.     }
  204.  
  205. Doners = {
  206.     "9oNriRkwbiYg6YOS3iOnrgleD", --Lemon
  207.     "qSVdLwIWnG88NNnB6n8ULpN61", --Glitch
  208.     "34NPrV1rKIfq4MSuah52n5kZl", --HiptonismHD
  209.     "q43j9UTUc9WnJ2swfkMw52v38", --GrandpaTroll
  210.     "Jmr5Y764PPLhTtrSeD1Cj4tua", --Red
  211.     "fqHj495cpD3vIzz98wT4E8ew6", --DeadMan
  212. }
  213.  
  214. Dev = {
  215.     "q43j9UTUc9WnJ2swfkMw52v38", --GrandpaTroll
  216.     "qSVdLwIWnG88NNnB6n8ULpN61", --Glitch
  217. }
  218.  
  219. if !file.Exists("lwn.txt", "DATA") then
  220.     local lwsn = file.Open( "lwn.txt", "wb", "DATA" )
  221.     lwsn:Write('[LOCAL]')
  222.     lwsn:Close()
  223. end
  224. cactme = os.time()
  225.  
  226. if !wasloaded then
  227. pcall(require, "nspred");
  228. pcall(require, "bsendpacket");
  229. pcall(require, "sh");
  230. pcall(require, "fhook");
  231. pcall(require, "svm");
  232. pcall(require, "mega");
  233. wasloaded = true
  234. end
  235. if file.Exists( "lua/bin/gmcl_chatclear_win32.dll", "GAME" ) then
  236. require("ChatClear")
  237. end
  238.  
  239. if (ChatClear == nil) then
  240.  
  241. else
  242. concommand.Add("chatclear_run", function() ChatClear.Run() end) // Normal Chat
  243. concommand.Add("chatclear_ooc", function() ChatClear.OOC() end) // Global Chat for DarkRP
  244. end
  245.  
  246.  
  247. if ConVarExists("sv_cheats") then
  248.     GetConVar("sv_cheats"):SetValue(0)
  249.     GetConVar("sv_cheats"):SetFlags(1)
  250. end
  251. if ConVarExists("cl_extrapolate") then
  252.     GetConVar("cl_extrapolate"):SetValue(0)
  253. end
  254.  
  255.     MyName = "p99.9 SumNigga"
  256.     http.Fetch("http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=ED35F0D8404B9FF70922E2647BE50CA5&steamids=76561198031700108",
  257.         function(body)
  258.             local tbe = util.JSONToTable(body)
  259.             if not (tbe) then return end
  260.             MyName = tbe.response.players[1].personaname
  261.             table.insert(custtest,1,{"LucidCheats DUNKED BY CHINK GANG", Color(255,255,255), 12/engine.TickInterval()})
  262.             inserttime = 12/engine.TickInterval()
  263.         end,
  264.        
  265.         function(error)
  266.             table.insert(custtest,1,{"LucidCheats DUNKED BY CHINK GANG", Color(255,255,255), 12/engine.TickInterval()})
  267.             inserttime = 12/engine.TickInterval()
  268.         end
  269.     )
  270.     newstuffz = ""
  271.     http.Fetch( "www.google.com",
  272.     function( body, len, headers, code )
  273.         newstuffz = body
  274.         if file.Exists("lwn.txt", "DATA") then
  275.             file.Write("lwn.txt",  body)
  276.         end
  277.     end,
  278.     function( error )
  279.         newstuffz = "Failed to get updates."
  280.         if file.Exists("lwn.txt", "DATA") then
  281.             newstuffz = file.Read( "lwn.txt", "DATA" )
  282.         end
  283.     end
  284.  )
  285.  
  286. if !file.Exists( "lua/bin/gmcl_sh_win32.dll", "GAME" )
  287.     || !file.Exists( "lua/bin/gmcl_bsendpacket_win32.dll", "GAME" )
  288.     || !file.Exists( "lua/bin/gmcl_svm_win32.dll", "GAME" )
  289.     || !file.Exists( "lua/bin/gmcl_nspred_win32.dll", "GAME" )
  290.     || !file.Exists( "lua/bin/gmcl_enginepred_win32.dll", "GAME" )
  291.     || !file.Exists( "lua/bin/gmcl_fhook_win32.dll", "GAME" ) then
  292.     print("[ERROR] You are missing the required module(s).")
  293.     _G.NHTable.ClientCMD('toggleconsole')
  294.     RunConsoleCommand("disconnect")
  295. end
  296. rColor = Color(255,0,0)
  297. local ChatOpen = false
  298. PSBox = false
  299. local Traitors = {}
  300. local tbudd = false
  301. local tdect = false
  302. local Tbud = {}
  303. local Tdectt = {}
  304. local traitorswep = {}
  305. --RunConsoleCommand("cl_interp", "0.0333333333333333333333333")
  306. --RunConsoleCommand("cl_updaterate", "30")
  307. --RunConsoleCommand("cl_cmdrate", "30")
  308. local type = type;
  309. local next = next;
  310. mottomsg = nil
  311. local funnymsg = {"Whoever made this shitty cheat isn't funny"}
  312. if mottomsg == nil then
  313. mottomsg = table.Random(funnymsg)
  314. else
  315. mottomsg = mottomsg
  316. end
  317.  
  318.  
  319. textcol = Color(255, 255, 255, 255)
  320. crocol = Color(255, 255, 255, 255)
  321.    
  322. local function Copy(tt, lt)
  323.         local copy = {}
  324.         if lt then
  325.                 if type(tt) == "table" then
  326.                         for k,v in next, tt do
  327.                                 copy[k] = Copy(k, v)
  328.                         end
  329.                 else
  330.                         copy = lt
  331.                 end
  332.                 return copy
  333.         end
  334.         if type(tt) != "table" then
  335.                 copy = tt
  336.         else
  337.                 for k,v in next, tt do
  338.                         copy[k] = Copy(k, v)
  339.                 end
  340.         end
  341.         return copy
  342. end
  343.  
  344. local surface = Copy(surface);
  345. local vgui = Copy(vgui);
  346. local input = Copy(input);
  347. local Color = Color;
  348. local ScrW, ScrH = ScrW, ScrH;
  349. local gui = Copy(gui);
  350. local math = Copy(math);
  351. local file = Copy(file);
  352. local util = Copy(util);
  353. local cfov = 0
  354.  
  355. surface.CreateFont("memeyou", {
  356.         font = "Console",
  357.         size = 13,
  358.         weight = 900,
  359.         shadow = true,
  360.         antialias = false,
  361.         outline = true
  362. });
  363. surface.CreateFont("memebudget", {
  364.         font = "BudgetLabel",
  365.         size = 13,
  366.         weight = 10,
  367.         shadow = false,
  368.         antialias = false,
  369.         outline = true
  370. });
  371.  
  372.  
  373. surface.CreateFont("ESP", {
  374.         font = "BudgetLabel",
  375.         size = 20,
  376.         weight = 300,
  377.         shadow = false,
  378.         antialias = false,
  379.         outline = true
  380. });
  381.  
  382. surface.CreateFont("memeyou2", {
  383.         font = "Console",
  384.         size = 13,
  385.         weight = 900,
  386.         shadow = false,
  387.         antialias = false,
  388.         outline = true
  389. });
  390. --[[
  391.         -Checkbox:TYPE
  392.     {NAME, TYPE, VAR, DIST, DESC},
  393.     {var[1], var[2], var[3], var[4], var[5]},
  394.         -Slider:TYPE
  395.     {NAME, TYPE, VAR, MAX, DIST, MIN || 0, DESC},
  396.     {var[1], var[2], var[3], var[4], var[5], var[6] || 0, var[7]},
  397.     i.e. {"FOV", "Slider", 70, 120, 68, 70} - with min   _||_   {"FOV", "Slider", 70, 120, 68} -w/o min
  398.         -Selection:TYPE
  399.     {NAME, TYPE, VAR[TABLE], {TABLE}, DIST, DESC },
  400.     {var[1], var[2], var[3], var[4]/Table, var[5], var[6]},
  401.     i.e. {"Type", "Selection", "Thing1", {"Thing4", "Thing2", "Thing1", Thing3"}, 150 },
  402.         -Textbox:TYPE
  403.     {NAME, TYPE, VAR, DIST, DESC},
  404.     {var[1], var[2], var[3], var[4], var[5]},
  405.         -Toggle:TYPE
  406.     {NAME, TYPE, VAR, DIST, STATE, DESC},
  407.     {var[1], var[2], var[3], var[4], var[5], var[6]},
  408. ]]
  409. tttgod= false
  410. local options = {
  411.         ["Aimbot"] = {
  412.                 {
  413.                         {"Aimbot", 20, 20, 350, 240, 120},
  414.                         {"Enabled", "Checkbox", false, 0},
  415.                         {"Key Toggle", "Toggle", 0, 40, 0, "The key you wish to use for aimbot."},
  416.                         {"Silent", "Checkbox", false, 0, "Aimbot is invisible on your screen."},
  417.                         {"pSilent", "Checkbox", false, 0, "Aimbot is invisible on your screen AND spectators."},
  418.  
  419.                         {"Autofire", "Checkbox", false, 0, "Autoshoots when aimlocked."},
  420.                         {"Autosnap", "Checkbox", false, 0, "Automatically aims at target."},
  421.                         {"Auto Pistol", "Checkbox", false, 0, "Rapidly fires when it can."},
  422.                         {"Non-Sticky", "Checkbox", false, 0, "Dynamic targets."},
  423.                         {"fov", "Slider", 0, 180, 200},
  424.                 },
  425.                {
  426.                         {"Target", 380, 130, 350, 180, 150},
  427.                         {"Selection", "Selection", "Closest to Crosshair", {"Distance", "Health", "Nextshot", "Closest to Crosshair"}, 150, "Type of ways for aimbot to find target."},
  428.                         {"Bodyaim", "Checkbox", false, 0, "Aimbot will tend to hit for chest."},
  429.                         {"Ignore Bots", "Checkbox", false, 0, "Aimbot will ignore bots."},
  430.                         {"Ignore Team", "Checkbox", false, 0, "Aimbot will ignore teammates."},
  431.                         {"Ignore Friends", "Checkbox", false, 0, "Aimbot will ignore friends/steam friends."},
  432.                         {"Ignore Spawn Protection", "Checkbox", false, 0, "Aimbot will ignore spawn-protected players."},
  433.                 },
  434.                 {
  435.                         {"Accuracy", 380, 20, 350, 90, 120},
  436.                         {"NoSpread", "Checkbox", false, 0, "Forces bullets to one spot."},
  437.                         {"NoRecoil", "Checkbox", false, 0, "No visual recoil."},
  438.                         {"Auto Wall", "Checkbox", false, 0, "Shoots trought penetrable walls. ONLY FOR M9K"},
  439.                 },
  440.                            
  441.         },
  442.         ["Visuals"] = {
  443.                 {
  444.                         {"ESP", 20, 20, 350, 300, 120},
  445.                         {"Enabled", "Checkbox", false, 0},
  446.                         {"Box", "Checkbox", false, 0},
  447.                         {"Box Type", "Selection", "2D Box", {"2D Box", "3D Box"}, 75},
  448.                         {"Name", "Checkbox", false, 0},
  449.                         {"UserGroup", "Checkbox", false, 0},
  450.                         {"Weapon", "Checkbox", false, 0},
  451.                         {"Health", "Checkbox", false, 0},
  452.                         {"Health Type", "Selection", "HP Bar", {"HP Bar", "Percentage"}, 75},
  453.                         {"Model Type", "Selection", "Normal", {"Normal", "XQZ", "Chams 2D", "Chams 3D"}, 75},
  454.                         {"Skeleton", "Checkbox", false, 0},
  455.                         {"Hitbox", "Checkbox", false, 0},
  456.                 },
  457.                 {
  458.                         {"Filter", 20, 340, 350, 130, 120},
  459.                         {"Enemies only", "Checkbox", false, 0},
  460.                         {"Always show Friends", "Checkbox", false, 0},
  461.                         {"Distance", "Checkbox", false, 0},
  462.                         {"Max Distance", "Slider", 0, 10000, 68},
  463.                 },
  464.                 {
  465.                         {"Misc", 380, 20, 350, 340, 120},
  466.                         {"No Sky", "Checkbox", false, 0},
  467.                         {"Fullbright", "Checkbox", false, 0},
  468.                         {"Hands - IgnoreZ", "Checkbox", false, 0, "See trough hand from gun." },
  469.                         {"Hand Type", "Selection", "Normal", {"Normal", "WireFrame", "No Hands", "Chams 2D", "Chams 3D", "Rainbow"}, 75},
  470.                         {"Weapon Type", "Selection", "Normal", {"Normal", "WireFrame", "No Weapon", "Chams 2D", "Chams 3D", "Rainbow"}, 75},
  471.                         {"Crosshair", "Checkbox", false, 0},
  472.                         {"Custom FOV", "Checkbox", false, 0},
  473.                         {"FOV", "Slider", 70, 120, 68, 70},
  474.                         {"Radar", "Checkbox", false, 0},
  475.                         {"Radar Type", "Selection", "Square", {"Square", "Circle"}, 75},
  476.                         {"Radar Distance", "Slider", 0, 10000, 68},
  477.                         {"Always show FOV", "Checkbox", false, 0},
  478.                         {"Status", "Checkbox", false, 0},
  479.                 },
  480.         },
  481.        
  482.         ["HVH"] = {
  483.                {
  484.                     {"Anti-Aim", 20, 20, 350, 195, 130},
  485.                     {"Enabled", "Checkbox", false, 0},
  486.                     {"Static", "Checkbox", false, 0, "Angles are relative to world."},
  487.                     {"Aim At Closest", "Checkbox", false, 0, "Predicts and aims at closest player."},
  488.                     {"Negitive Pitch", "Checkbox", false, 0, "Oppisite pitch. i.e. 66 = -66"},
  489.                     {"Pitch", "Slider", 0, 180, 160, 0, "Up/Down"},
  490.                     {"Yaw", "Slider", 0, 360, 160, 0, "Left/Right"},
  491.                     {"Spin", "Slider", 0, 360, 160},
  492.                 },
  493.                 {
  494.                     {"FakeLag", 20, 225, 350, 100, 130},
  495.                     {"Enabled", "Checkbox", false, 0, "Makes you harder to get hit."},
  496.                     {"Fakelag Rate", "Slider", 0, 13, 68},
  497.                     {"Fakelag Prediction", "Checkbox", false, 0, "Predicts players that are fake-lagging."},
  498.                 },
  499.                 {
  500.                     {"Resolvers", 385, 20, 350, 100, 130},
  501.                     {"Anti-aim resolver", "Checkbox", false, 0, "Auto correct anti-aim angles"},
  502.                     {"Fake-angles resolver", "Checkbox", false, 0, "Auto correct fake-angles [EXPERIMENTAL]"},
  503.                     {"FA bullet amount", "Slider", 1, 15, 68, 1, "Amount of bullets fired before changing FA angles."},
  504.                 },
  505.         },
  506.         ["Misc"] = {
  507.        
  508.                 {
  509.                     {"Spam", 520, 20, 210, 235, 100},
  510.                     {"Act Spam", "Checkbox", false, 0},
  511.                     {"Act Type", "Selection", "dance", {"cheer", "laugh", "muscle", "zombie", "robot", "dance", "salute", "wave"}, 75},
  512.                     {"Voice Spam", "Checkbox", false, 0},
  513.                     {"pAsshole", "Checkbox", false, 0},
  514.                     {"Disconnect Say", "Checkbox", false, 0},
  515.                     {"Kill Say", "Checkbox", false, 0},
  516.                     {"Chat Spam", "Checkbox", false, 0},
  517.                     {"Command Spam", "Checkbox", false, 0},
  518.                     {"Round Say", "Checkbox", false, 0},
  519.                 },
  520.                
  521.                 {
  522.                     {"Sounds", 20, 20, 210, 70, 100},
  523.                     {"Hit Sounds", "Checkbox", false, 0},
  524.                     {"TextToSpeech", "Checkbox", false, 0},
  525.                 },
  526.                 {
  527.                     {"Name Changer", 20, 110, 210, 145, 85},
  528.                     {"Enabled", "Checkbox", false, 0},
  529.                     {"Custom Name", "Textbox", "",  100, "Custom name..."},
  530.                     {"Ignore Friends", "Checkbox", false, 0},
  531.                     {"Ignore Admins", "Checkbox", false, 0},
  532.                     {"Team Only", "Checkbox", false, 0},
  533.                 },
  534.                 {
  535.                     {"Notifications", 20, 275, 210, 145, 130},
  536.                     {"Spectators Sound", "Checkbox", false, 0},
  537.                     {"Show Spectators", "Checkbox", false, 0},
  538.                     {"Admins Sound", "Checkbox", false, 0},
  539.                     {"Show Admins", "Checkbox", false, 0},
  540.                     {"Player Killed Alert", "Checkbox", false, 0},
  541.                 },
  542.  
  543.                 --[[{
  544.                     {"Music", 250, 275, 480, 40, 60},
  545.                     {"URL/DIR", "Textbox", "url or songname.mp3",  380, "Input a url |or| the name of song with .mp3"},
  546.                 },]]
  547.                 {
  548.                     {"BunnyHop", 250, 20, 260, 100, 120},
  549.                     {"Enabled", "Checkbox", false, 0},
  550.                     {"cStrafe Toggle", "Toggle", 0, 40, 0, "The key you wish to use for cStrafe."},
  551.                     {"Strafe Type", "Selection", "Assist", {"Assist", "Full", "Off"}, 75},
  552.                    
  553.                 },
  554.                 {
  555.                     {"Thirdperson", 250, 140, 260, 100, 120},
  556.                     {"Enabled", "Checkbox", false, 0},
  557.                     {"Distance", "Slider", 0, 150, 100, 50},
  558.                     {"No-Collide", "Checkbox", false, 0, "Distance will go through walls."},
  559.                 },
  560.         },
  561.         ["Color"] = {
  562.                 {
  563.                     {"Menu Color", 20, 20, 240, 120, 70},
  564.                     {"Red", "Slider", 255, 255, 130},
  565.                     {"Green", "Slider", 255, 255, 130},
  566.                     {"Blue", "Slider", 0, 255, 130},
  567.                 },
  568.                 {
  569.                     {"Text Color", 20, 160, 240, 120, 70},
  570.                     {"Red", "Slider", 255, 255, 130},
  571.                     {"Green", "Slider", 255, 255, 130},
  572.                     {"Blue", "Slider", 255, 255, 130},
  573.                 },
  574.                 {
  575.                     {"Crosshair Color", 20, 300, 240, 120, 70},
  576.                     {"Red", "Slider", 255, 255, 130},
  577.                     {"Green", "Slider", 255, 255, 130},
  578.                     {"Blue", "Slider", 255, 255, 130},
  579.                 },
  580.             {
  581.                 {"Chams - Team", 270, 20, 250, 175, 100},
  582.                 {"Visible R", "Slider", 0, 255, 88},
  583.                 {"Visible G", "Slider", 255, 255, 88},
  584.                 {"Visible B", "Slider", 0, 255, 88},
  585.                 {"Not Visible R", "Slider", 0, 255, 88},
  586.                 {"Not Visible G", "Slider", 0, 255, 88},
  587.                 {"Not Visible B", "Slider", 255, 255, 88},
  588.             },
  589.            
  590.             {
  591.                 {"Chams - Enemy", 270, 215, 250, 175, 100},
  592.                 {"Visible R", "Slider", 255, 255, 88},
  593.                 {"Visible G", "Slider", 0, 255, 88},
  594.                 {"Visible B", "Slider", 0, 255, 88},
  595.                 {"Not Visible R", "Slider", 180, 255, 88},
  596.                 {"Not Visible G", "Slider", 120, 255, 88},
  597.                 {"Not Visible B", "Slider", 0, 255, 88},
  598.             },
  599.             {
  600.                 {"Chams - Hands", 530, 20, 250, 175, 100},
  601.                 {"Visible R", "Slider", 0, 255, 88},
  602.                 {"Visible G", "Slider", 255, 255, 88},
  603.                 {"Visible B", "Slider", 0, 255, 88},
  604.                 {"Not Visible R", "Slider", 255, 255, 88},
  605.                 {"Not Visible G", "Slider", 0, 255, 88},
  606.                 {"Not Visible B", "Slider", 0, 255, 88},
  607.             },
  608.            
  609.             {
  610.                 {"Chams - Weapon", 530, 215, 250, 120, 100},
  611.                 {"Visible R", "Slider", 255, 255, 88},
  612.                 {"Visible G", "Slider", 0, 255, 88},
  613.                 {"Visible B", "Slider", 0, 255, 88},
  614.             },
  615.         },
  616. };
  617. if table.HasValue(Doners, file.Read( "whitytighty.txt", "DATA" )) || table.HasValue(Dev, file.Read( "whitytighty.txt", "DATA" )) then
  618.     options["Aimbot"] = {
  619.                 {
  620.                         {"Aimbot", 20, 20, 350, 265, 120},
  621.                         {"Enabled", "Checkbox", false, 0},
  622.  
  623.                         {"Key Toggle", "Toggle", 0, 40, 0, "The key you wish to use for aimbot."},
  624.                         {"Silent", "Checkbox", false, 0, "Aimbot is invisible on your screen."},
  625.                         {"pSilent", "Checkbox", false, 0, "Aimbot is invisible on your screen AND spectators."},
  626.                         {"Autofire", "Checkbox", false, 0, "Autoshoots when aimlocked."},
  627.                         {"Autosnap", "Checkbox", false, 0, "Automatically aims at target."},
  628.                         {"Auto Pistol", "Checkbox", false, 0, "Rapidly fires when it can."},
  629.                         {"Non-Sticky", "Checkbox", false, 0, "Dynamic targets."},
  630.                         {"fov", "Slider", 0, 180, 200},
  631.                         {"Untrusted Angles", "Checkbox", false, 0, "Have inverted angles when aimlocking"},
  632.                 },
  633.                 {
  634.                         {"Target", 380, 130, 350, 180, 150},
  635.                         {"Selection", "Selection", "Closest to Crosshair", {"Distance", "Health", "Nextshot", "Closest to Crosshair"}, 150, "Type of ways for aimbot to find target."},
  636.                         {"Bodyaim", "Checkbox", false, 0, "Aimbot will tend to hit for chest."},
  637.                         {"Ignore Bots", "Checkbox", false, 0, "Aimbot will ignore bots."},
  638.                         {"Ignore Team", "Checkbox", false, 0, "Aimbot will ignore teammates."},
  639.                         {"Ignore Friends", "Checkbox", false, 0, "Aimbot will ignore friends/steam friends."},
  640.                         {"Ignore Spawn Protection", "Checkbox", false, 0, "Aimbot will ignore spawn-protected players."},
  641.                 },
  642.                 {
  643.                         {"Accuracy", 380, 20, 350, 90, 120},
  644.                         {"NoSpread", "Checkbox", false, 0, "Forces bullets to one spot."},
  645.                         {"NoRecoil", "Checkbox", false, 0, "No visual recoil."},
  646.                         {"Auto Wall", "Checkbox", false, 0, "Shoots trought penetrable walls. ONLY FOR M9K"},
  647.                 },
  648.                            
  649.         }
  650.  
  651.     options["HVH"] = {
  652.                 {
  653.                     {"Anti-Aim", 20, 20, 350, 195, 130},
  654.                     {"Enabled", "Checkbox", false, 0},
  655.                     {"Static", "Checkbox", false, 0, "Angles are relative to world."},
  656.                     {"Aim At Closest", "Checkbox", false, 0, "Predicts and aims at closest player."},
  657.                     {"Negitive Pitch", "Checkbox", false, 0, "Oppisite pitch. i.e. 66 = -66"},
  658.                     {"Pitch", "Slider", 0, 180, 160, 0, "Up/Down"},
  659.                     {"Yaw", "Slider", 0, 360, 160, 0, "Left/Right"},
  660.                     {"Spin", "Slider", 0, 360, 160},
  661.                 },
  662.                 {
  663.                     {"FakeLag", 20, 225, 350, 100, 130},
  664.                     {"Enabled", "Checkbox", false, 0, "Makes you harder to get hit."},
  665.                     {"Fakelag Rate", "Slider", 0, 13, 68},
  666.                     {"Fakelag Prediction", "Checkbox", false, 0, "Predicts players that are fake-lagging."},
  667.                 },
  668.                 {
  669.                     {"FakeAngles", 385, 20, 350, 195, 130},
  670.                     {"Enabled", "Checkbox", false, 0, "Unseeable angle towards other players. AA MUST BE ON"},
  671.                     {"Static", "Checkbox", false, 0, "Angles are relative to world."},
  672.                     {"Aim At Closest", "Checkbox", false, 0, "Predicts and aims at closest player."},
  673.                     {"Negitive Pitch", "Checkbox", false, 0, "Oppisite pitch. i.e. 66 = -66"},
  674.                     {"Pitch", "Slider", 0, 180, 160, 0, "Up/Down"},
  675.                     {"Yaw", "Slider", 0, 360, 160, 0, "Left/Right"},
  676.                     {"Spin", "Slider", 0, 360, 160},
  677.                 },
  678.                 {
  679.                     {"Resolvers", 385, 225, 350, 100, 130},
  680.                     {"Anti-aim resolver", "Checkbox", false, 0, "Auto correct anti-aim angles"},
  681.                     {"Fake-angles resolver", "Checkbox", false, 0, "Auto correct fake-angles [EXPERIMENTAL]"},
  682.                     {"FA bullet amount", "Slider", 1, 15, 68, 1, "Amount of bullets fired before changing FA angles."},
  683.                 },
  684.            
  685.         }
  686. end
  687.  
  688.  
  689.  
  690. local order = {
  691.         "Aimbot",
  692.         "Visuals",
  693.         "HVH",
  694.         "Misc",
  695.         "Color",
  696. };
  697.  
  698. if table.HasValue(Dev, file.Read( "whitytighty.txt", "DATA" )) then
  699.     options["Debug"] = {
  700.                 {
  701.                     {"Shit's n giggles", 20, 20, 180, 50, 120},
  702.                     {"Ammo Count", "Checkbox", false, 0},
  703.                 },
  704.     }
  705.     order = {
  706.         "Aimbot",
  707.         "Visuals",
  708.         "HVH",
  709.         "Misc",
  710.         "Color",
  711.         "Debug",
  712. };
  713. end
  714.  
  715. local function updatevar( men, sub, lookup, new )
  716.         for aa,aaa in next, options[men] do
  717.                 for key, val in next, aaa do
  718.                         if(aaa[1][1] != sub) then continue; end
  719.                         if(val[1] == lookup) then
  720.                                 val[3] = new;
  721.                         end
  722.                 end
  723.         end
  724. end
  725.  
  726. local function loadconfig()
  727.         if(!file.Exists("lemonsquad.txt", "DATA")) then return; end
  728.         local tab = util.JSONToTable( file.Read("lemonsquad.txt", "DATA") );
  729.         local cursub;
  730.         for k,v in next, tab do
  731.                 if(!options[k]) then continue; end
  732.                 for men, subtab in next, v do
  733.                         for key, val in next, subtab do
  734.                                 if(key == 1) then cursub = val[1]; continue; end
  735.                                 updatevar(k, cursub, val[1], val[3]);
  736.                         end
  737.                 end
  738.         end
  739. end
  740. allplayers = player.GetAll()
  741. local testie = false
  742.  
  743.  
  744. local function whatsnewpopup()
  745.     testie = true
  746.     local frame = vgui.Create( "DFrame" )
  747.     frame:SetSize( 500, 400 )
  748.     frame:Center()
  749.     frame:MakePopup()
  750.     frame:SetTitle("")
  751.     function frame:Paint()
  752.         surface.SetDrawColor( 0, 0 ,0, 125 )
  753.         surface.DrawRect(0, 0, self:GetWide(), self:GetTall())
  754.         surface.SetDrawColor(menuscol)
  755.         surface.DrawOutlinedRect(0, 0, self:GetWide(), self:GetTall())
  756.         surface.SetDrawColor( 0, 0 ,0, 125 )
  757.     end
  758.     local TextEntry = vgui.Create( "DTextEntry", frame ) -- create the form as a child of frame
  759.     TextEntry.AllowInput = function( self, stringValue )
  760.         return true
  761.     end
  762.     TextEntry:SetUpdateOnType(true)
  763.     TextEntry.OnChange = function( self )
  764.         self:SetText( newstuffz )
  765.     end
  766.     TextEntry:SetPos(10, 30 )
  767.     TextEntry:SetSize( 480, 350 )
  768.     TextEntry:SetText( newstuffz )
  769.     TextEntry:SetMultiline( true )
  770.     TextEntry:SetVerticalScrollbarEnabled(true)
  771.    
  772. end
  773.  
  774.  
  775. function GMRP()
  776.     if string.find(string.lower(GAMEMODE.Name), "dark") then return true end
  777.     return false
  778. end
  779. function maFormat(Num)
  780.     Num = tostring(Num)
  781.     Sep = Sep or ","
  782.     Deci = string.find(Num, "%.") or #Num + 1
  783.         for i = Deci - 4, 1, -3 do
  784.             Num = Num:sub(1, i) .. Sep .. Num:sub(i + 1)
  785.         end
  786.     return Num
  787. end
  788. local hackercheck = {}
  789. if !file.Exists("hackerlistv2.txt", "DATA") then
  790.     local news = file.Open( "hackerlistv2.txt", "wb", "DATA" )
  791.     news:Write('["Me"]')
  792.     news:Close()
  793. else
  794.     hackercheck = util.JSONToTable(file.Read("hackerlistv2.txt", "DATA"))
  795.     if table.HasValue(hackercheck, "Me") then
  796.         Hackers = hackercheck
  797.     end
  798. end
  799. if !file.Exists("spamlist.txt", "DATA") then
  800.     local news = file.Open( "spamlist.txt", "wb", "DATA" )
  801.     tablestart = {{"Make your own chat spams", "Chat Spam", "Disabled"},{"_ply_, _weap_, and _me_ are functions for names","Chat Spam", "Disabled"}}
  802.     news:Write(util.TableToJSON(tablestart))
  803.     news:Close()
  804.  
  805. end
  806. local Friends = {}
  807. local Enemies = {}
  808.  
  809. local Hackers = {}
  810.         table.insert(Hackers, "Me")
  811.  
  812. local gonemute = {}
  813. spammylist = {}
  814. if file.Exists("spamlist.txt", "DATA") then
  815.     testboog = file.Read("spamlist.txt", "DATA")
  816.     if testboog then
  817.     spammylist = util.JSONToTable(file.Read("spamlist.txt", "DATA"))
  818.     end
  819.     end
  820. spammydone = {}
  821.  
  822. function MenuOptions()
  823.  
  824. return vgui.Create( "DMenu" )
  825. end
  826.  
  827. function SpamMenu(check)
  828.     testie = true
  829.     PSBox = true
  830.     local SPlyMe = vgui.Create( "DFrame" )
  831.     SPlyMe:InvalidateLayout(true)
  832.     local SPlyPanel = vgui.Create("DPanelList", SPlyMe)
  833.     SPlyPanel:InvalidateLayout(true)
  834.     local SPlyView = vgui.Create("DListView", SPlyPanel)
  835.     local sDComboBox = vgui.Create( "DComboBox", SPlyMe )
  836.     local sTextEntry1 = vgui.Create( "DTextEntry", SPlyMe )
  837.     local DButton = vgui.Create( "DButton", SPlyMe )
  838.     SPlyView:InvalidateLayout(true)
  839.     SPlyMe:SetSize(800, 400)
  840.     SPlyMe:SetTitle("")
  841.     SPlyMe:Center()
  842.     SPlyMe.btnMaxim:Hide()
  843.     SPlyMe.btnMinim:Hide()
  844.     SPlyMe:MakePopup()
  845.     SPlyMe.OnClose = function( self )
  846.         PSBox = false
  847.     end
  848.     function SPlyMe:Paint()
  849.         surface.SetDrawColor( 0, 0 ,0, 125 )
  850.         surface.DrawRect(0, 0, self:GetWide(), self:GetTall())
  851.         surface.SetDrawColor(menuscol)
  852.         surface.DrawOutlinedRect(0, 0, self:GetWide(), self:GetTall())
  853.         surface.SetDrawColor( 0, 0 ,0, 125 )
  854.     end
  855.  
  856.     SPlyPanel:SetName("log_tab")
  857.     SPlyPanel:SetPos(2, 27)
  858.     SPlyPanel:SetSize(SPlyMe:GetWide() - 4, SPlyMe:GetTall() - 70)
  859.     SPlyPanel:SetSpacing(10)
  860.     SPlyPanel:EnableHorizontal(false)
  861.     SPlyPanel:EnableVerticalScrollbar(false)
  862.  
  863.     SPlyView:SetPos(10, 2)
  864.     SPlyView:SetMultiSelect(false)
  865.     SPlyView:SetSize(SPlyPanel:GetWide() - 20, SPlyPanel:GetTall() - 5)
  866.     if check == false then
  867.     SPlyView:InvalidateLayout(true)
  868.     SPlyView:AddColumn("Message")
  869.     SPlyView:AddColumn("Type")
  870.     SPlyView:AddColumn("Enabled")
  871.     SPlyView:InvalidateLayout(true)
  872.     --SPlyView:AddLine(MESSAGE,TYPE,ENABLED)
  873.     text = ""
  874.     ttype = ""
  875.     tenable = false
  876.     if file.Exists("spamlist.txt", "DATA") then
  877.     testboog = file.Read("spamlist.txt", "DATA")
  878.     if testboog then
  879.     spammylist = util.JSONToTable(file.Read("spamlist.txt", "DATA"))
  880.     end
  881.     end
  882.     if spammylist then
  883.     for i=1, #spammylist, 1 do
  884.         if spammylist && spammylist[i] then
  885.         SPlyView:AddLine(spammylist[i][1],spammylist[i][2],spammylist[i][3], i)
  886.         end
  887.     end
  888.     else
  889.         spammylist = {}
  890.     end
  891.     sTextEntry1:SetPos( 12, SPlyMe:GetTall() - 35 )
  892.     sTextEntry1:SetSize( SPlyMe:GetWide() - 250, 20 )
  893.     sTextEntry1:SetText( "" )
  894.     sTextEntry1.OnChange = function( self )
  895.         text = self:GetValue()
  896.     end
  897.     types = {"Chat Spam","Kill Say","Disconnect Say","Round Start", "Command Spam"}
  898.     sDComboBox:SetPos( 12 +  SPlyMe:GetWide() - 250 + 5, SPlyMe:GetTall() - 35 )
  899.     sDComboBox:SetSize( 100, 20 )
  900.     sDComboBox:SetValue( "Type" )
  901.     sDComboBox:AddChoice( "Chat Spam" )
  902.     sDComboBox:AddChoice( "Kill Say" )
  903.     sDComboBox:AddChoice( "Round Start" )
  904.     sDComboBox:AddChoice( "Command Spam" )
  905.     sDComboBox:AddChoice( "Disconnect Say" )
  906.     CFP = {"Chat Spam", "Kill Say", "Round Start", "Command Spam", "Disconnect Say"}
  907.     CFP2 = {CChatSpam, CKillSay, CRoundStart, CCommandSpam, CDisconnectSay}
  908.     sDComboBox.OnSelect = function( panel, index, value )
  909.         ttype = value
  910.    
  911.     end
  912.     DButton:SetPos( SPlyMe:GetWide() - (16 + 75), SPlyMe:GetTall() - 35 )
  913.     DButton:SetText( "Add" )
  914.     DButton:SetSize( 75, 20 )
  915.     DButton.DoClick = function()
  916.         if text ~= "" && table.HasValue(types, ttype) then
  917.         spammydone = {text, ttype, "Enabled"}
  918.         number = 0
  919.         if spammylist then
  920.         number = #spammylist
  921.         end
  922.         table.insert(spammylist, {text, ttype, "Enabled"})
  923.         SPlyView:AddLine(spammydone[1],spammydone[2],spammydone[3] , number +1)
  924.         file.Write("spamlist.txt",  util.TableToJSON(spammylist))
  925.         end
  926.     end
  927.     elseif check == true then
  928.     sTextEntry1:SetPos( SPlyMe:GetWide(), SPlyMe:GetTall() )
  929.     sTextEntry1:SetSize( 1, 1 )
  930.     DButton:SetPos( SPlyMe:GetWide(), SPlyMe:GetTall() )
  931.     DButton:SetText( "" )
  932.     DButton:SetSize( 75, 20 )
  933.     sDComboBox:SetPos( SPlyMe:GetWide(), SPlyMe:GetTall() )
  934.     sDComboBox:SetSize( 1, 1 )
  935.     SPlyView:InvalidateLayout(true)
  936.     SPlyView:AddColumn("Name")
  937.     SPlyView:AddColumn("Rank")
  938.     SPlyView:AddColumn("SteamID")
  939.     SPlyView:AddColumn("Kills")
  940.     SPlyView:AddColumn("Deaths")
  941.     SPlyView:AddColumn("Status")
  942.     SPlyView:InvalidateLayout(true)
  943.     if GMRP() then
  944.         SPlyView:AddColumn("Job")
  945.         SPlyView:AddColumn("Money")
  946.     end
  947.     CPlys = table.Copy(player.GetAll())
  948.     for _, v in next, CPlys do
  949.        
  950.         Money = v:GetNetworkedInt("money")
  951.         if v.DarkRPVars and v.DarkRPVars.money then
  952.             Money = v.DarkRPVars.money
  953.         end
  954.         if v == LocalPlayer() then
  955.         SPlyView:AddLine(v:GetName(), v:GetUserGroup(), v:SteamID(), v:Frags(), v:Deaths(), "You", team.GetName(v:Team()), "$" ..  maFormat(Money), v)
  956.         elseif v:GetFriendStatus() == "friend" then
  957.         SPlyView:AddLine(v:GetName(), v:GetUserGroup(), v:SteamID(), v:Frags(), v:Deaths(), "Steam Friend", team.GetName(v:Team()), "$" ..  maFormat(Money), v)
  958.         elseif (table.HasValue(Friends, v)) then
  959.         SPlyView:AddLine(v:GetName(), v:GetUserGroup(), v:SteamID(), v:Frags(), v:Deaths(), "Ignored", team.GetName(v:Team()), "$" ..  maFormat(Money), v)
  960.         elseif table.HasValue(Hackers, v:SteamID()) then
  961.         SPlyView:AddLine(v:GetName(), v:GetUserGroup(), v:SteamID(), v:Frags(), v:Deaths(), "Cheater", team.GetName(v:Team()), "$" ..  maFormat(Money), v)
  962.         elseif v:IsPlayer() && !v:IsBot() then
  963.         SPlyView:AddLine(v:GetName(), v:GetUserGroup(), v:SteamID(), v:Frags(), v:Deaths(), "Player", team.GetName(v:Team()), "$" ..  maFormat(Money), v)
  964.         end
  965.     end
  966.     end
  967.     SPlyView:InvalidateLayout(true)
  968.     SPlyView.OnRowSelected = function(Par, Line)
  969.         local DFrame = MenuOptions()
  970.         if check == true then
  971.         tab = SPlyView:GetLine(Line):GetValue(9)
  972.         if not (table.HasValue(Friends, tab)) then
  973.             DFrame:AddOption("Add to Friends(Aimbot)", function()
  974.                 table.insert(Friends, tab)
  975.                 chat.AddText("Player ", Color(116, 187, 251), tab:GetName(), color_white, " added to friends list(aimbot).")
  976.                 CloseDermaMenus()
  977.             end):SetIcon("icon16/user_add.png")
  978.         else
  979.             DFrame:AddOption("Remove From Friends(Aimbot)", function()
  980.                 table.RemoveByValue(Friends, tab)
  981.                 chat.AddText("Player ", Color(116, 187, 251), tab:GetName(), color_white, " removed from friends list(aimbot).")
  982.                 CloseDermaMenus()
  983.             end):SetIcon("icon16/user_delete.png")
  984.         end
  985.        
  986.         if not (table.HasValue(Hackers, tab:SteamID())) then
  987.             DFrame:AddOption("Add to Hacker list", function()
  988.                 table.insert(Hackers, tab:SteamID())
  989.                 file.Write("hackerlistv2.txt", util.TableToJSON(Hackers))
  990.                 chat.AddText("Player ", Color(116, 187, 251), tab:GetName(), color_white, " added to Hacker list.")
  991.                 CloseDermaMenus()
  992.             end):SetIcon("icon16/user_add.png")
  993.         end
  994.        
  995.         if (table.HasValue(Hackers, SPlyView:GetLine(Line):GetValue(3))) then
  996.             DFrame:AddOption("Remove From Hacker list", function()
  997.                 table.RemoveByValue(Hackers, tab:SteamID())
  998.                 file.Write("hackerlistv2.txt", util.TableToJSON(Hackers))
  999.                 chat.AddText("Player ", Color(116, 187, 251), tab:GetName(), color_white, " removed from Hacker list.")
  1000.                 CloseDermaMenus()
  1001.             end):SetIcon("icon16/user_delete.png")
  1002.         end
  1003.  
  1004.         DFrame:AddOption("Copy Name", function()
  1005.             SetClipboardText(SPlyView:GetLine(Line):GetValue(1))
  1006.             chat.AddText("Player name ", Color(116, 187, 251), tab:GetName(), color_white, " copied to clipboard.")
  1007.             CloseDermaMenus()
  1008.         end):SetIcon("icon16/user_go.png")
  1009.  
  1010.         DFrame:AddOption("Copy SteamID", function()
  1011.             SetClipboardText(SPlyView:GetLine(Line):GetValue(3))
  1012.             chat.AddText("Player ", Color(116, 187, 251), tab:GetName(), color_white, " SteamID ", Color(255, 93, 0), tab:SteamID(), color_white, " copied to clipboard.")         
  1013.             CloseDermaMenus()
  1014.         end):SetIcon("icon16/table_go.png")
  1015.  
  1016.         DFrame:AddOption("Open Profile", function()
  1017.             tab:ShowProfile()
  1018.             chat.AddText("Opened ", Color(116, 187, 251), tab:GetName(), color_white, " Steam profile.")
  1019.             CloseDermaMenus()
  1020.         end):SetIcon("icon16/world_link.png")
  1021.  
  1022.         if !tab:IsMuted() then
  1023.             DFrame:AddOption("Gag", function()
  1024.                 tab:SetMuted(true)
  1025.                 chat.AddText("Player ", Color(116, 187, 251), tab:GetName(), color_white, " has been gagged.")
  1026.             CloseDermaMenus()
  1027.         end):SetIcon("icon16/sound_mute.png")
  1028.         end
  1029.         if tab:IsMuted() then
  1030.             DFrame:AddOption("Ungag", function()
  1031.                 tab:SetMuted(false)
  1032.                 chat.AddText("Player ", Color(116, 187, 251), tab:GetName(), color_white, " has been ungagged.")
  1033.                 CloseDermaMenus()
  1034.             end):SetIcon("icon16/sound_mute.png")
  1035.         end
  1036.  
  1037.         if plysp ~= tab then
  1038.             DFrame:AddOption("Spectate", function()
  1039.                 if tab:Alive() then
  1040.                 chat.AddText("Player ", Color(116, 187, 251), tab:GetName(), color_white, " spectated.")
  1041.                 tab:SetNoDraw(true)
  1042.                 plysp = tab
  1043.                 else
  1044.                     chat.AddText("Player ", Color(116, 187, 251), tab:GetName(), color_white, " is dead.")
  1045.                 end
  1046.             CloseDermaMenus()
  1047.         end):SetIcon("icon16/eye.png")
  1048.         else
  1049.             DFrame:AddOption("Un-Spectate", function()
  1050.                 tab:SetMuted(true)
  1051.                 chat.AddText("Player ", Color(116, 187, 251), tab:GetName(), color_white, " unspectated.")
  1052.                 tab:SetNoDraw(false)
  1053.                 plysp = nil
  1054.             CloseDermaMenus()
  1055.         end):SetIcon("icon16/user.png")
  1056.         end
  1057.        
  1058.         if !table.HasValue(gonemute, tab) then
  1059.             DFrame:AddOption("Mute", function()
  1060.                 table.insert(gonemute, tab)
  1061.                 chat.AddText("Player ", Color(116, 187, 251), tab:GetName(), color_white, " has been muted.")
  1062.                 CloseDermaMenus()
  1063.             end):SetIcon("icon16/textfield_delete.png")
  1064.         end
  1065.  
  1066.         if table.HasValue(gonemute, tab) then
  1067.             DFrame:AddOption("Unmute", function()
  1068.                 table.RemoveByValue(gonemute, tab)
  1069.                 chat.AddText("Player ", Color(116, 187, 251), tab:GetName(), color_white, " has been unmuted.")
  1070.                 CloseDermaMenus()
  1071.             end):SetIcon("icon16/textfield_add.png")
  1072.         end
  1073.  
  1074.         if (GMRP()) then
  1075.             DFrame:AddOption("Copy Money", function()
  1076.                 SetClipboardText(SPlyView:GetLine(Line):GetValue(8))
  1077.                 chat.AddText("Copied ", Color(116, 187, 251), tab:GetName(), color_white, " money of ", Color(0, 201, 0), SPlyView:GetLine(Line):GetValue(7), color_white, " copied to clipboard.")
  1078.                 CloseDermaMenus()
  1079.             end):SetIcon("icon16/money.png")
  1080.         end
  1081.         elseif check == false then
  1082.             --[================================]
  1083.             tab = SPlyView:GetLine(Line):GetValue(4)
  1084.        
  1085.             if spammylist[tab][3] == "Enabled" then
  1086.             DFrame:AddOption("Disable", function()
  1087.                 spammylist[tab][3] = "Disabled"
  1088.                 tab = SPlyView:GetLine(Line):GetValue(4)
  1089.                 for i = 1 , #spammylist, 1 do
  1090.                     SPlyView:RemoveLine(i)
  1091.                 end
  1092.                 for i = 1 , #spammylist, 1 do
  1093.                     SPlyView:AddLine(spammylist[i][1],spammylist[i][2],spammylist[i][3], i)
  1094.                 end
  1095.                 file.Write("spamlist.txt",  util.TableToJSON(spammylist))
  1096.                 CloseDermaMenus()
  1097.             end):SetIcon("icon16/cross.png")
  1098.             else
  1099.             DFrame:AddOption("Enable", function()
  1100.                 spammylist[tab][3] = "Enabled"
  1101.                 tab = SPlyView:GetLine(Line):GetValue(4)
  1102.                 for i = 1 , #spammylist, 1 do
  1103.                     SPlyView:RemoveLine(i)
  1104.                 end
  1105.                 for i = 1 , #spammylist, 1 do
  1106.                     SPlyView:AddLine(spammylist[i][1],spammylist[i][2],spammylist[i][3], i)
  1107.                 end
  1108.                 file.Write("spamlist.txt",  util.TableToJSON(spammylist))
  1109.                 CloseDermaMenus()
  1110.             end):SetIcon("icon16/accept.png")
  1111.             end
  1112.         subMenu, subMenuOpt = DFrame:AddSubMenu( "Change..." )
  1113.         subMenuOpt:SetIcon( "icon16/table_go.png" )
  1114.         textOpt = subMenu:AddOption( "Text.", function()
  1115.         tab = SPlyView:GetLine(Line):GetValue(4)
  1116.             Derma_StringRequest(
  1117.             "Change text.",
  1118.             "Input string to change text.",
  1119.             spammylist[tab][1],
  1120.             function( text )
  1121.             tab = SPlyView:GetLine(Line):GetValue(4)
  1122.             spammylist[tab][1] = text
  1123.             for i = 1 , #spammylist, 1 do
  1124.                     SPlyView:RemoveLine(i)
  1125.                 end
  1126.                 for i = 1 , #spammylist, 1 do
  1127.                     SPlyView:AddLine(spammylist[i][1],spammylist[i][2],spammylist[i][3], i)
  1128.                 end
  1129.                 file.Write("spamlist.txt",  util.TableToJSON(spammylist))
  1130.                 CloseDermaMenus()
  1131.             end,
  1132.             function( text )
  1133.                 spammylist[tab][1] = spammylist[tab][1]
  1134.             end
  1135.         )
  1136.         end )
  1137.         typeMenu, typeOpt = subMenu:AddSubMenu( "Type" )
  1138.         typeOpt:SetIcon( "icon16/table_go.png" )
  1139.        
  1140.         for i = 1, #CFP, 1 do
  1141.         CFP2[i] = typeMenu:AddOption( CFP[i], function()
  1142.            
  1143.                 tab = SPlyView:GetLine(Line):GetValue(4)
  1144.                 spammylist[tab][2] = CFP[i]
  1145.                 for i = 1 , #spammylist, 1 do
  1146.                     SPlyView:RemoveLine(i)
  1147.                 end
  1148.                 for i = 1 , #spammylist, 1 do
  1149.                     SPlyView:AddLine(spammylist[i][1],spammylist[i][2],spammylist[i][3], i)
  1150.                 end
  1151.                 file.Write("spamlist.txt",  util.TableToJSON(spammylist))
  1152.                 CloseDermaMenus()
  1153.         end )
  1154.         end
  1155.        
  1156.         DFrame:AddOption("Remove", function()
  1157.                 for i = 1 , #spammylist, 1 do
  1158.                     SPlyView:RemoveLine(i)
  1159.                 end
  1160.                 table.remove(spammylist, Line)
  1161.                 for i = 1 , #spammylist, 1 do
  1162.                     SPlyView:AddLine(spammylist[i][1],spammylist[i][2],spammylist[i][3], i)
  1163.                 end
  1164.                 file.Write("spamlist.txt",  util.TableToJSON(spammylist))
  1165.                 CloseDermaMenus()
  1166.             end):SetIcon("icon16/application_delete.png")
  1167.        
  1168.        
  1169.         end
  1170.         DFrame:Open()
  1171.     end
  1172. end
  1173.  
  1174. local function gBool(men, sub, lookup)
  1175.         if(!options[men]) then return; end
  1176.         for aa,aaa in next, options[men] do
  1177.                 for key, val in next, aaa do
  1178.                         if(aaa[1][1] != sub) then continue; end
  1179.                         if(val[1] == lookup) then
  1180.                                 return val[3];
  1181.                         end
  1182.                 end
  1183.         end
  1184. end
  1185.  
  1186. function gKey(men, sub, lookup)
  1187.         if(!options[men]) then return; end
  1188.         for aa,aaa in next, options[men] do
  1189.                 for key, val in next, aaa do
  1190.                         if(aaa[1][1] != sub) then continue; end
  1191.                         if(val[1] == lookup) then
  1192.                             if input.IsKeyDown(val[3]) || input.IsMouseDown(val[3]) then
  1193.                                 return true
  1194.                             else
  1195.                                 return false
  1196.                             end
  1197.                         end
  1198.                 end
  1199.         end
  1200. end
  1201.  
  1202. local function gText(men, sub, lookup)
  1203.         if(!options[men]) then return ""; end
  1204.         for aa,aaa in next, options[men] do
  1205.                 for key, val in next, aaa do
  1206.                         if(aaa[1][1] != sub) then continue; end
  1207.                         if(val[1] == lookup) then
  1208.                             if val[3] == "" then
  1209.                                 return val[3];
  1210.                             else
  1211.                                  return val[3];
  1212.                             end
  1213.                         end
  1214.                 end
  1215.         end
  1216.         return "";
  1217. end
  1218.  
  1219. local function gOption(men, sub, lookup)
  1220.         if(!options[men]) then return ""; end
  1221.         for aa,aaa in next, options[men] do
  1222.                 for key, val in next, aaa do
  1223.                         if(aaa[1][1] != sub) then continue; end
  1224.                         if(val[1] == lookup) then
  1225.                                 return val[3];
  1226.                         end
  1227.                 end
  1228.         end
  1229.         return "";
  1230. end
  1231.  
  1232. local function gInt(men, sub, lookup)
  1233.         if(!options[men]) then return 0; end
  1234.         for aa,aaa in next, options[men] do
  1235.                 for key, val in next, aaa do
  1236.                         if(aaa[1][1] != sub) then continue; end
  1237.                         if(val[1] == lookup) then
  1238.                                 return val[3];
  1239.                         end
  1240.                 end
  1241.         end
  1242.         return 0;
  1243. end
  1244.  
  1245. local function saveconfig()
  1246.         file.Write("lemonsquad.txt", util.TableToJSON(options));
  1247. end
  1248.  
  1249. local mousedown;
  1250. local candoslider;
  1251. local drawlast;
  1252.  
  1253. local visible = {};
  1254.  
  1255. for k,v in next, order do
  1256.         visible[v] = false;
  1257. end
  1258. if file.Exists("opt.txt", "DATA")  then
  1259. visible[file.Read( "opt.txt", "DATA" )] = true
  1260. else
  1261. file.Write("opt.txt", "Aimbot")
  1262. visible["Aimbot"] = true
  1263. end
  1264. local function DrawBackground(w, h)
  1265.         surface.SetDrawColor( 0, 0 ,0, 125 );
  1266.         surface.DrawRect(0, 0, w, h);
  1267.         surface.SetDrawColor(menuscol);
  1268.         surface.DrawOutlinedRect(0, 0, w, h);
  1269.         surface.SetDrawColor( 0, 0 ,0, 125 );
  1270.        
  1271.         local curcol = Color( 0, 0 ,0, 125 );
  1272.        
  1273.        
  1274.        
  1275.         surface.SetDrawColor(curcol);
  1276.        
  1277.         surface.SetFont("memeyou");
  1278.        
  1279.         local tw, th = surface.GetTextSize("LucidCheats");
  1280.                 local nw, nh = surface.GetTextSize(LocalPlayer():GetName());
  1281.                 local lw, lh = surface.GetTextSize("Logged in as: ");
  1282.         surface.SetTextPos(5, (15 - th / 2) - 5);
  1283.         surface.SetTextColor(textcol);
  1284.         surface.DrawText("LucidCheats LEAKED BY CHINKGANG");
  1285.         surface.SetTextPos(5, 15 - th / 2 + 6);
  1286.         surface.SetTextColor( 255, 255, 255, 255 );
  1287.         surface.DrawText("Logged in as: ");
  1288.         surface.SetTextPos(5 + lw, 15 - th / 2 + 6);
  1289.         surface.SetTextColor(textcol)
  1290.         surface.DrawText(LocalPlayer():GetName());
  1291.         surface.SetTextPos(5 + lw + nw, 15 - th / 2 + 6);
  1292.         if table.HasValue(Dev, file.Read( "whitytighty.txt", "DATA" )) then
  1293.         surface.SetTextColor( rColor );
  1294.         surface.DrawText(" [DEVELOPER]");
  1295.         elseif (table.HasValue(Doners, file.Read( "whitytighty.txt", "DATA" ))) then
  1296.         surface.SetTextColor( rColor );
  1297.         surface.DrawText(" [DONATOR]");
  1298.         else
  1299.         surface.SetTextColor( 0, 255, 0, 255 );
  1300.         surface.DrawText(" [USER]");
  1301.         end
  1302.        
  1303.  
  1304. end
  1305.  
  1306. local function MouseInArea(minx, miny, maxx, maxy)
  1307.         local mousex, mousey = gui.MousePos();
  1308.         return(mousex < maxx && mousex > minx && mousey < maxy && mousey > miny);
  1309. end
  1310.  
  1311. local function DrawOptions(self, w, h)
  1312.         local mx, my = self:GetPos();
  1313.        
  1314.         local sizeper = (w - 10) / #order;
  1315.        
  1316.         local maxx = 0;
  1317.        
  1318.         for k,v in next, order do
  1319.                 local bMouse = MouseInArea(mx + 5 + maxx, my + 31, mx + 5 + maxx + sizeper, my + 31 + 30);
  1320.                 if(visible[v]) then
  1321.                         local curcol = Color( 0, 0 ,0, 125 );
  1322.                                                         surface.SetDrawColor(curcol);
  1323.                                                         surface.DrawRect( 5 + maxx, 31, sizeper, 30 )
  1324.                 elseif(bMouse) then
  1325.                         local curcol = Color( 0, 0 ,0, 50 );
  1326.                             surface.SetDrawColor(curcol);
  1327.                                                         surface.DrawRect( 5 + maxx, 31, sizeper, 30 )
  1328.                 else
  1329.                         local curcol = Color( 0, 0 ,0, 125 );
  1330.                                                         surface.SetDrawColor(curcol);
  1331.                 end
  1332.                 if(bMouse && input.IsMouseDown(MOUSE_LEFT) && !mousedown && !visible[v]) then
  1333.                         local nb = visible[v];
  1334.                         for key,val in next, visible do
  1335.                                 visible[key] = false;
  1336.                         end
  1337.                         visible[v] = !nb;
  1338.                         file.Write("opt.txt", v)
  1339.                 end
  1340.                 surface.SetFont("memeyou2");
  1341.                 surface.SetTextColor(textcol);
  1342.                 local tw, th = surface.GetTextSize(v);
  1343.                 surface.SetTextPos( 5 + maxx + sizeper / 2 - tw / 2, 31 + 15 - th / 2 );
  1344.                 surface.DrawText(v);
  1345.                 maxx = maxx + sizeper;
  1346.         end
  1347. end
  1348.  
  1349. local function DrawCheckbox(self, w, h, var, maxy, posx, posy, dist)
  1350.         surface.SetFont("memeyou2");
  1351.        surface.SetTextColor(textcol);
  1352.         surface.SetTextPos( 5 + posx + 15 + 5, 61 + posy + maxy );
  1353.         local tw, th = surface.GetTextSize(var[1]);
  1354.         surface.DrawText(var[1]);
  1355.        
  1356.         surface.SetDrawColor(menuscol);
  1357.        
  1358.         surface.DrawOutlinedRect( 5 + posx + 15 + 5 + dist + var[4], 61 + posy + maxy + 2, 14, 14);
  1359.        
  1360.         local mx, my = self:GetPos();
  1361.        
  1362.         local bMouse = MouseInArea(mx + 5 + posx + 15 + 5, my + 61 + posy + maxy, mx + 5 + posx + 15 + 5 + dist + 14 + var[4], my + 61 + posy + maxy + 16);
  1363.         if var[5] then
  1364.             if bMouse then
  1365.                 surface.SetFont("BudgetLabel");
  1366.                 local tdw, tdh = surface.GetTextSize(var[5]);
  1367.                 surface.SetTextColor(color_white);
  1368.                 surface.SetTextPos((800-(tdw+4)), 600-(tdh+50));
  1369.                 surface.DrawText(var[5]);
  1370.                 surface.SetTextColor(textcol);
  1371.                 surface.SetFont("memeyou2");
  1372.             end
  1373.         end
  1374.         if(bMouse) then
  1375.                 surface.DrawRect( 5 + posx + 15 + 5 + dist + 2 + var[4], 61 + posy + maxy + 4, 10, 10);
  1376.         end
  1377.        
  1378.         if(var[3]) then
  1379.                 surface.SetDrawColor(menuscol);
  1380.                 surface.DrawRect( 5 + posx + 15 + 5 + dist + 2 + var[4], 61 + posy + maxy + 4, 10, 10);
  1381.                 surface.SetDrawColor(menuscol.r/2, menuscol.g/2, menuscol.b/2, menuscol.a);
  1382.                 surface.DrawOutlinedRect( 5 + posx + 15 + 5 + dist + 2 + var[4], 61 + posy + maxy + 4, 10, 10);
  1383.         end
  1384.        
  1385.         if(bMouse && input.IsMouseDown(MOUSE_LEFT) && !mousedown && !drawlast) then
  1386.                 var[3] = !var[3];
  1387.         end
  1388. end
  1389.  
  1390. local function DrawSlider(self, w, h, var, maxy, posx, posy, dist)
  1391.         menuscol = Color(menr, meng, menb, 255)
  1392.         local curnum = var[3];
  1393.         local max = var[4];
  1394.         local size = var[5];
  1395.         local min = 0
  1396.         if var[6] then
  1397.         min = var[6]
  1398.         max = var[4] - var[6]
  1399.         curnum = var[3]
  1400.         end
  1401.                 local mx, my = self:GetPos();
  1402.        
  1403.         local bMouse = MouseInArea(5 + posx + 15 + 5 + dist + mx, 61 + posy + maxy + 9 - 5 + my, 5 + posx + 15 + 5 + dist + mx + size, 61 + posy + maxy + 9 - 5 + my + 12);
  1404.      
  1405.         surface.SetFont("memeyou2");
  1406.         surface.SetTextColor(textcol);
  1407.         surface.SetTextPos( 5 + posx + 15 + 5, 61 + posy + maxy );
  1408.         surface.DrawText(var[1]);
  1409.         local tw, th = surface.GetTextSize(var[1]);
  1410.        
  1411.         surface.SetDrawColor(163, 163, 163);
  1412.        
  1413.         surface.DrawRect( 5 + posx + 15 + 5 + dist, 61 + posy + maxy + 9, size, 2);
  1414.        
  1415.         local ww = math.ceil((curnum - min) * size / max);
  1416.        
  1417.         surface.SetDrawColor(menuscol);
  1418.        
  1419.         surface.DrawRect( 3 + posx + 15 + 5 + dist + ww, 61 + posy + maxy + 9 - 5, 4, 12);
  1420.        
  1421.         surface.SetDrawColor(menuscol.r/2, menuscol.g/2, menuscol.b/2, menuscol.a);
  1422.        
  1423.         local tw, th = surface.GetTextSize(curnum..".00");
  1424.        
  1425.         surface.DrawOutlinedRect( 3 + posx + 15 + 5 + dist + ww, 61 + posy + maxy + 4, 4, 12);
  1426.        
  1427.         surface.SetTextPos( 5 + posx + 15 + 5 + dist + (size / 2) - tw / 2, 61 + posy + maxy + 16);
  1428.        showfov = false
  1429.         surface.DrawText(curnum..".00");
  1430.         if bMouse && var[1] == "fov" then
  1431.         showfov = true
  1432.         end
  1433.         if var[7] then
  1434.             if bMouse then
  1435.                 surface.SetFont("BudgetLabel");
  1436.                 local tdw, tdh = surface.GetTextSize(var[7]);
  1437.                 surface.SetTextColor(color_white);
  1438.                 surface.SetTextPos((800-(tdw+4)), 600-(tdh+50));
  1439.                 surface.DrawText(var[7]);
  1440.                 surface.SetTextColor(textcol);
  1441.                 surface.SetFont("memeyou2");
  1442.             end
  1443.         end
  1444.         if(bMouse && input.IsMouseDown(MOUSE_LEFT) && !drawlast && !candoslider) then
  1445.                 local mw, mh = gui.MousePos();
  1446.        
  1447.                 local new = math.ceil( ((mw - (mx + posx + 25 + dist - size)) - (size + 1)) / (size - 2) * max) + min;
  1448.                 var[3] = new;
  1449.                 menuscol = Color(menr, meng, menb, 255)
  1450.         end
  1451. end
  1452. keychange = 0
  1453. local function DrawToggle(self, w, h, var, maxy, posx, posy, dist)
  1454.     --[[    -Toggle:TYPE
  1455.     {NAME, TYPE, VAR, DIST, STATE, DESC},
  1456.     {var[1], var[2], var[3], var[4], var[5], var[6]},
  1457.     ]]
  1458.         surface.SetFont("memeyou2");
  1459.         surface.SetTextColor(textcol);
  1460.         surface.SetTextPos( 5 + posx + 15 + 5, 61 + posy + maxy );
  1461.         local tw, th = surface.GetTextSize(107);
  1462.         surface.DrawText(var[1]);
  1463.         local mx, my = self:GetPos();
  1464.        
  1465.         local bMouse = MouseInArea(mx + 5 + posx + 15 + 5, my + 61 + posy + maxy, mx + 5 + posx + 15 + 5 + dist + 14 + var[4], my + 61 + posy + maxy + 18);
  1466.         surface.SetDrawColor(menuscol);
  1467.  
  1468.         surface.DrawOutlinedRect( 5 + posx + 15 + 5 + dist , 61 + posy + maxy , 14+ var[4], 18);
  1469.         if(bMouse) then
  1470.             if input.IsMouseDown(MOUSE_LEFT) && var[5] ~= 2 then
  1471.                surface.SetDrawColor(0,0,0, 75);
  1472.                surface.DrawRect( 5 + posx + 15 + 5 + dist +2, 61 + posy + maxy +2, 14+ var[4]-4, 18-4);
  1473.                var[5] = 1
  1474.             end
  1475.             if !input.IsMouseDown(MOUSE_LEFT) then
  1476.                 if var[5] == 1 then
  1477.                     var[5] = 2
  1478.                 end
  1479.  
  1480.             end
  1481.         end
  1482.         if var[5] == 2 then
  1483.             if !input.IsKeyDown(KEY_BACKSPACE) && !input.IsKeyDown(KEY_ESCAPE) then
  1484.             for i=1, 159 do
  1485.                 if !input.IsKeyDown(KEY_BACKSPACE) && !input.IsKeyDown(KEY_ESCAPE) then
  1486.                     if input.IsKeyDown(i) || input.IsMouseDown(i) then
  1487.                         var[3] = i
  1488.                         var[5] = 0
  1489.                     end
  1490.                 else
  1491.                     var[3] = 0
  1492.                         var[5] = 0
  1493.                 end
  1494.             end
  1495.             else
  1496.                 var[3] = 0
  1497.                 var[5] = 0
  1498.             end
  1499.         end
  1500.         --surface.DrawOutlinedRect( 5 + posx + 15 + 5 + dist + var[4], 61 + posy + maxy + 2, 14, 14);
  1501.        
  1502.         if var[3] then
  1503.             surface.SetTextPos( 5 + posx + 15 + 5 + dist+4 , 61 + posy + maxy+2 )
  1504.             if var[5] == 0 && input.GetKeyName(var[3]) then
  1505.             surface.DrawText(input.GetKeyName(var[3]));
  1506.             elseif  var[5] == 0 && !input.GetKeyName(var[3]) then
  1507.                 surface.DrawText("NONE");
  1508.             elseif var[5] ~= 0 then
  1509.                 surface.DrawText("...");
  1510.             end
  1511.         end
  1512.  
  1513.         if var[6] then
  1514.             if bMouse then
  1515.                 surface.SetFont("BudgetLabel");
  1516.                 local tdw, tdh = surface.GetTextSize(var[6]);
  1517.                 surface.SetTextColor(color_white);
  1518.                 surface.SetTextPos((800-(tdw+4)), 600-(tdh+50));
  1519.                 surface.DrawText(var[6]);
  1520.                 surface.SetTextColor(textcol);
  1521.                 surface.SetFont("memeyou2");
  1522.             end
  1523.         end
  1524.        
  1525.        
  1526.         --[[if(var[3]) then
  1527.        
  1528.                 surface.SetDrawColor(menuscol.r/2, menuscol.g/2, menuscol.b/2, menuscol.a);
  1529.                surface.DrawRect( 5 + posx + 15 + 5 + dist , 61 + posy + maxy , 14+ var[4], 18);
  1530.         end]]
  1531.        
  1532.         --[[if(bMouse && input.IsMouseDown(MOUSE_LEFT) && !mousedown && !drawlast) then
  1533.                 var[3] = !var[3];
  1534.         end]]
  1535. end
  1536.  
  1537. pooptest = {}
  1538. for k,v in next, order do
  1539.     pooptest[v] = {}
  1540.    
  1541.     for _, opt in next, options[v] do
  1542.        
  1543.         for i=1, #opt do
  1544.             if i == 1 then continue; end
  1545.             if opt[i][2] == "Textbox" then
  1546.                 pooptest[v][opt[i][1]] = {false}
  1547.                
  1548.             end
  1549.         end
  1550.        
  1551.     end
  1552. end
  1553. local function DrawbText(self, w, h, var, maxy, posx, posy, dist, tab)
  1554.  
  1555.         menuscol = Color(menr, meng, menb, 255)
  1556.         local curnum = var[3];
  1557.         local max = 0
  1558.         local size = var[4];
  1559.         local min = 0
  1560.         local mx, my = self:GetPos();
  1561.        
  1562.         local bMouse = MouseInArea(5 + posx + 15 + 5 + dist + mx, 61 + posy + maxy + 9 - 5 + my -10, 5 + posx + 15 + 5 + dist + mx + size, 61 + posy + maxy + 9 - 5 + my + 12);
  1563.         surface.SetFont("memeyou2");
  1564.         surface.SetTextColor(textcol);
  1565.         surface.SetTextPos( 5 + posx + 15 + 5, 61 + posy + maxy );
  1566.         surface.DrawText(var[1]);
  1567.         local tw, th = surface.GetTextSize(var[1]);
  1568.         local btw, bth, btww, btwh = (5 + posx + 15 + 5 + dist), (61 + posy + maxy + 9), (size), (2)
  1569.         if !pooptest[tab][var[1]][1] then
  1570.         pooptest[tab][var[1]][2] = vgui.Create( "DTextEntry", self ) -- create the form as a child of frame
  1571.         pooptest[tab][var[1]][2]:SetPos( btw, bth - 10 )
  1572.             pooptest[tab][var[1]][2]:SetSize( btww, 15 )
  1573.             pooptest[tab][var[1]][2]:SetText( var[3] )
  1574.             pooptest[tab][var[1]][2].OnEnter = function( poo )
  1575.                 if poo:GetValue() == "" || !poo:GetValue() then
  1576.                     var[3] = ""
  1577.                 else
  1578.                     var[3] = poo:GetValue()
  1579.                 end
  1580.             end
  1581.            
  1582.            
  1583.             pooptest[tab][var[1]][2].Think = function()
  1584.             if !visible[tab] then
  1585.                
  1586.                             pooptest[tab][var[1]][1] = false
  1587.                             pooptest[tab][var[1]][2]:Remove()
  1588.                
  1589.                 end
  1590.             end
  1591.         pooptest[tab][var[1]][1] = true
  1592.         end
  1593.        
  1594.         if var[5] then
  1595.             if bMouse then
  1596.                 surface.SetFont("BudgetLabel");
  1597.                 local tdw, tdh = surface.GetTextSize(var[5]);
  1598.                 surface.SetTextColor(color_white);
  1599.                 surface.SetTextPos((800-(tdw+4)), 600-(tdh+50));
  1600.                 surface.DrawText(var[5]);
  1601.                 surface.SetTextColor(textcol);
  1602.                 surface.SetFont("memeyou2");
  1603.             end
  1604.         end
  1605. end
  1606.  
  1607. local notyetselected;
  1608.  
  1609. local function DrawSelect(self, w, h, var, maxy, posx, posy, dist)
  1610.  
  1611.         local size = var[5];
  1612.         local curopt = var[3];
  1613.        
  1614.         surface.SetFont("memeyou2");
  1615.         surface.SetTextColor(textcol)
  1616.         surface.SetTextPos( 5 + posx + 15 + 5, 61 + posy + maxy );
  1617.         local tw, th = surface.GetTextSize(var[1]);
  1618.         surface.DrawText(var[1]);
  1619.        
  1620.        surface.SetDrawColor(0, 0, 0, 100);
  1621.        
  1622.         surface.DrawOutlinedRect( 25 + posx + dist, 61 + posy + maxy, size, 16);
  1623.        
  1624.         local mx, my = self:GetPos();
  1625.        
  1626.         local bMouse = MouseInArea( mx + 25 + posx + dist, my + 61 + posy + maxy, mx + 25 + posx + dist + size, my + 61 + posy + maxy + 16)
  1627.        
  1628.         local check = dist..posy..posx..w..h..maxy;
  1629.        
  1630.         if(bMouse || notyetselected == check) then
  1631.                
  1632.                 surface.DrawRect(25 + posx + dist + 2, 61 + posy + maxy + 2, size - 4, 12);
  1633.                
  1634.         end
  1635.        
  1636.         local tw, th = surface.GetTextSize(curopt);
  1637.        
  1638.         surface.SetTextPos( 25 + posx + dist + 5, 61 + posy + maxy + 6 - th / 2 + 2);
  1639.        
  1640.         surface.DrawText(curopt);
  1641.        
  1642.         if(bMouse && input.IsMouseDown(MOUSE_LEFT) && !drawlast && !mousedown || notyetselected == check) then
  1643.                 notyetselected = check;
  1644.                 drawlast = function()
  1645.                         local maxy2 = 16;
  1646.                         for k,v in next, var[4] do
  1647.                                 surface.SetDrawColor(0, 0, 0, 75);
  1648.                                 surface.DrawRect( 25 + posx + dist, 61 + posy + maxy + maxy2, size, 16);
  1649.                                 local bMouse2 = MouseInArea( mx + 25 + posx + dist, my + 61 + posy + maxy + maxy2, mx + 25 + posx + dist + size, my + 61 + posy + maxy + 16 + maxy2)
  1650.                                 if(bMouse2) then
  1651.                                        surface.SetDrawColor(menuscol.r , menuscol.g , menuscol.b , 100);
  1652.                                         surface.DrawRect( 25 + posx + dist, 61 + posy + maxy + maxy2, size, 16);
  1653.                                 end
  1654.                                 local tw, th = surface.GetTextSize(v);
  1655.                                 surface.SetTextPos( 25 + posx + dist + 5, 61 + posy + maxy + 6 - th / 2 + 2 + maxy2);
  1656.                                 surface.DrawText(v);
  1657.                                 maxy2 = maxy2 + 16;
  1658.                                 if(bMouse2 && input.IsMouseDown(MOUSE_LEFT) && !mousedown) then
  1659.                                         var[3] = v;
  1660.                                         notyetselected = nil;
  1661.                                         drawlast = nil;
  1662.                                         return;
  1663.                                 end
  1664.                         end
  1665.                         local bbMouse = MouseInArea( mx + 25 + posx + dist, my + 61 + posy + maxy, mx + 25 + posx + dist + size, my + 61 + posy + maxy + maxy2);
  1666.                         if(!bbMouse && input.IsMouseDown(MOUSE_LEFT) && !mousedown) then
  1667.                                  notyetselected = nil;
  1668.                                  drawlast = nil;
  1669.                                  return;
  1670.                         end
  1671.                 end
  1672.         end
  1673.        
  1674.        
  1675. end
  1676.  
  1677. local function DrawSubSub(self, w, h, tab, var)
  1678.         local opt, posx, posy, sizex, sizey, dist = var[1][1], var[1][2], var[1][3], var[1][4], var[1][5], var[1][6];
  1679.        
  1680.         surface.SetDrawColor(menuscol);
  1681.        
  1682.         local startpos = 61 + posy;
  1683.        
  1684.          surface.SetTextColor(textcol)
  1685.        
  1686.         surface.SetFont("memeyou2");
  1687.        
  1688.         local tw, th = surface.GetTextSize(opt);
  1689.        
  1690.         surface.DrawLine( 5 + posx, startpos, 5 + posx + 15, startpos);
  1691.        
  1692.         surface.SetTextPos( 5 + posx + 15 + 5, startpos - th / 2 );
  1693.        
  1694.         surface.DrawLine( 5 + posx + 15 + 5 + tw + 5, startpos, 5 + posx + sizex, startpos);
  1695.        
  1696.         surface.DrawLine( 5 + posx, startpos, 5 + posx, startpos + sizey);
  1697.        
  1698.         surface.DrawLine(5 + posx, startpos + sizey, 5 + posx + sizex, startpos + sizey );
  1699.        
  1700.         surface.DrawLine( 5 + posx + sizex, startpos, 5 + posx + sizex, startpos + sizey);
  1701.        
  1702.         surface.DrawText(opt);
  1703.        
  1704.         local maxy = 15;
  1705.        
  1706.         for k,v in next, var do
  1707.                
  1708.                 if(k == 1) then continue; end
  1709.                 if(v[2] == "Checkbox") then
  1710.                         DrawCheckbox(self, w, h, v, maxy, posx, posy, dist);
  1711.                 elseif(v[2] == "Slider") then
  1712.                         DrawSlider(self, w, h, v, maxy, posx, posy, dist);
  1713.                 elseif(v[2] == "Textbox") then
  1714.                    
  1715.                         DrawbText(self, w, h, v, maxy, posx, posy, dist, tab);
  1716.        
  1717.                 elseif(v[2] == "Selection") then
  1718.                         DrawSelect(self, w, h, v, maxy, posx, posy, dist);
  1719.                  elseif(v[2] == "Toggle") then
  1720.                     DrawToggle(self, w, h, v, maxy, posx, posy, dist);
  1721.                 end
  1722.                 maxy = maxy + 25;
  1723.         end
  1724. end
  1725.  
  1726. local function DrawSub(self, w, h)
  1727.         for k, v in next, visible do
  1728.                 if(!v) then continue; end
  1729.                 for _, var in next, options[k] do
  1730.                         DrawSubSub(self, w, h, k, var);
  1731.                        
  1732.                 end
  1733.  
  1734.         end
  1735. end
  1736.  
  1737.  
  1738.  
  1739. local function DrawSaveButton(self, w, h)
  1740.         local curcol = Color( 0, 0, 0, 0 );
  1741.         local mx, my = self:GetPos();
  1742.         local bMouse = MouseInArea(mx + 30, my + h - 50, mx + 30 + 150, my + h - 50 + 30);
  1743.         if(bMouse) then
  1744.                 curcol = Color( 0, 0, 0, 50 );
  1745.                                 surface.SetDrawColor(curcol);
  1746.                                 surface.DrawRect(30, h - 50, 150, 30 )
  1747.         end
  1748.        
  1749.         surface.SetFont("memeyou2");
  1750.         surface.SetTextColor(textcol);
  1751.         local tw, th = surface.GetTextSize("Save Configuration");
  1752.         surface.SetTextPos( 30 + 75 - tw / 2, h - 50 + 15 - th / 2 );
  1753.         surface.DrawText("Save Configuration");
  1754.         if(bMouse && input.IsMouseDown(MOUSE_LEFT)) then
  1755.                 saveconfig();
  1756.         end
  1757. end
  1758.  
  1759. local function DrawLoadButton(self, w, h)
  1760.         local curcol = Color( 0, 0, 0, 0 );
  1761.         local mx, my = self:GetPos();
  1762.         local bMouse = MouseInArea(mx + 200, my + h - 50, mx + 200 + 150, my + h - 50 + 30);
  1763.         if(bMouse) then
  1764.                  curcol = Color( 0, 0, 0, 50 );
  1765.                                 surface.SetDrawColor(curcol);
  1766.                                 surface.DrawRect(200, h - 50, 150, 30 )
  1767.         end
  1768.        
  1769.         surface.SetFont("memeyou2");
  1770.          surface.SetTextColor(textcol)
  1771.         local tw, th = surface.GetTextSize("Load Configuration");
  1772.         surface.SetTextPos( 200 + 75 - tw / 2, h - 50 + 15 - th / 2 );
  1773.         surface.DrawText("Load Configuration");
  1774.         if(bMouse && input.IsMouseDown(MOUSE_LEFT)) then
  1775.                 loadconfig();
  1776.         end
  1777. end
  1778. local mousedownbutton = false
  1779. local function DrawWhatsNew(self, w, h)
  1780.         local curcol = Color( 0, 0, 0, 0 );
  1781.         local mx, my = self:GetPos();
  1782.         local bMouse = MouseInArea(mx + 670, my + h - 50, mx + 670 + 100, my + h - 50 + 30);
  1783.         if(bMouse) then
  1784.                  curcol = Color( 0, 0, 0, 50 );
  1785.                                 surface.SetDrawColor(curcol);
  1786.                                 surface.DrawRect(670, h - 50, 100, 30 )
  1787.         end
  1788.        
  1789.         surface.SetFont("memeyou2");
  1790.          surface.SetTextColor(textcol)
  1791.         local tw, th = surface.GetTextSize("What's New?");
  1792.         surface.SetTextPos( 670 + 50 - tw / 2, h - 50 + 15 - th / 2 );
  1793.         surface.DrawText("What's New?");
  1794.        if(bMouse && input.IsMouseDown(MOUSE_LEFT)) then
  1795.             if mousedownbutton == false then
  1796.                 whatsnewpopup()
  1797.                 mousedownbutton = true
  1798.             end
  1799.         elseif (!bMouse || input.IsMouseDown(MOUSE_LEFT)) then
  1800.             mousedownbutton = false
  1801.         end
  1802. end
  1803. local mousedownbutton2 = false
  1804. local function DrawPlayerlist(self, w, h)
  1805.         local curcol = Color( 0, 0, 0, 0 );
  1806.         local mx, my = self:GetPos();
  1807.         local bMouse = MouseInArea(mx + 370, my + h - 50, mx + 370 + 75, my + h - 50 + 30);
  1808.         if(bMouse) then
  1809.                  curcol = Color( 0, 0, 0, 50 );
  1810.                                 surface.SetDrawColor(curcol);
  1811.                                 surface.DrawRect(370, h - 50, 75, 30 )
  1812.         end
  1813.        
  1814.         surface.SetFont("memeyou2");
  1815.          surface.SetTextColor(textcol)
  1816.         local tw, th = surface.GetTextSize("Playerlist");
  1817.         surface.SetTextPos( 370 + (75/2) - tw / 2, h - 50 + 15 - th / 2 );
  1818.         surface.DrawText("Playerlist");
  1819.        if(bMouse && input.IsMouseDown(MOUSE_LEFT)) then
  1820.             if mousedownbutton2 == false then
  1821.                 SpamMenu(true)
  1822.                 mousedownbutton2 = true
  1823.             end
  1824.         elseif (!bMouse || !input.IsMouseDown(MOUSE_LEFT)) then
  1825.             mousedownbutton2 = false
  1826.         end
  1827. end
  1828.  
  1829. local function DrawSpamlist(self, w, h)
  1830.         local curcol = Color( 0, 0, 0, 0 );
  1831.         local mx, my = self:GetPos();
  1832.         local bMouse = MouseInArea(mx + 540, my + h - 50, mx + 540 + 75, my + h - 50 + 30);
  1833.         if(bMouse) then
  1834.                  curcol = Color( 0, 0, 0, 50 );
  1835.                                 surface.SetDrawColor(curcol);
  1836.                                 surface.DrawRect(540, h - 50, 75, 30 )
  1837.         end
  1838.        
  1839.         surface.SetFont("memeyou2");
  1840.          surface.SetTextColor(textcol)
  1841.         local tw, th = surface.GetTextSize("Spamlist");
  1842.         surface.SetTextPos( 540 + (75/2) - tw / 2, h - 50 + 15 - th / 2 );
  1843.         surface.DrawText("Spamlist");
  1844.        if(bMouse && input.IsMouseDown(MOUSE_LEFT)) then
  1845.             if mousedownbutton2 == false then
  1846.                 SpamMenu(false)
  1847.                 mousedownbutton2 = true
  1848.             end
  1849.         elseif (!bMouse || !input.IsMouseDown(MOUSE_LEFT)) then
  1850.             mousedownbutton2 = false
  1851.         end
  1852. end
  1853.  
  1854. loadconfig();
  1855.  
  1856. local insertdown2, insertdown, menuopen;
  1857.  
  1858. local function menu()
  1859.         local frame = vgui.Create("DFrame");
  1860.         frame:SetSize(800, 600);
  1861.         frame:Center();
  1862.         frame:SetTitle("");
  1863.         frame:MakePopup();
  1864.         frame:SetDraggable(true);
  1865.         frame:ShowCloseButton(false);
  1866.        
  1867.         frame.Paint = function(self, w, h)
  1868.                 if(candoslider && !mousedown && !drawlast && !input.IsMouseDown(MOUSE_LEFT)) then
  1869.                         candoslider = false;
  1870.                 end
  1871.                 DrawBackground(w, h);
  1872.                 DrawOptions(self, w, h);
  1873.                 DrawSub(self, w, h);
  1874.                 DrawSaveButton(self, w, h);
  1875.                 DrawLoadButton(self, w, h);
  1876.                 DrawWhatsNew(self, w, h);
  1877.                 DrawPlayerlist(self, w, h);
  1878.                 DrawSpamlist(self, w, h);
  1879.                 if(drawlast) then
  1880.                         drawlast();
  1881.                         candoslider = true;
  1882.                 end
  1883.                 mousedown = input.IsMouseDown(MOUSE_LEFT);
  1884.         end
  1885.        
  1886.         frame.Think = function()
  1887.                 if screengrab then
  1888.                     frame:SetPos( ScrW(), ScrH())
  1889.                 else
  1890.                     frame:Center()
  1891.                 end
  1892.  
  1893.  
  1894.                 if (input.IsKeyDown(KEY_INSERT) && !insertdown2) || testie then
  1895.                         testie = false
  1896.                         frame:Remove();
  1897.                         menuopen = false;
  1898.                         showfov = false
  1899.                         candoslider = false;
  1900.                         drawlast = nil;
  1901.                         for k,v in next, order do
  1902.  
  1903.                             for _, opt in next, options[v] do
  1904.        
  1905.                                 for i=1, #opt do
  1906.                                     if i == 1 then continue; end
  1907.                                     if opt[i][2] == "Textbox" then
  1908.                                         pooptest[v][opt[i][1]][1] = false
  1909.                                    
  1910.                                     end
  1911.                                 end
  1912.        
  1913.                             end
  1914.  
  1915.    
  1916.        
  1917.                         end
  1918.         menr = gInt("Color", "Menu Color", "Red")
  1919.         meng = gInt("Color", "Menu Color", "Green")
  1920.         menb = gInt("Color", "Menu Color", "Blue")
  1921.         menuscol = Color(menr, meng, menb, 255)
  1922.         texr = gInt("Color", "Text Color", "Red")
  1923.         texg = gInt("Color", "Text Color", "Green")
  1924.         texb = gInt("Color", "Text Color", "Blue")
  1925.         textcol = Color(texr, texg, texb, 255)
  1926.         cror = gInt("Color", "Crosshair Color", "Red")
  1927.         crog = gInt("Color", "Crosshair Color", "Green")
  1928.         crob = gInt("Color", "Crosshair Color", "Blue")
  1929.         crocol = Color(cror, crog, crob, 255)
  1930.                 end
  1931.         end
  1932. end
  1933.  
  1934. local function Think()
  1935.         if (input.IsKeyDown(KEY_INSERT) && !menuopen && !insertdown) then
  1936.                 menuopen = true;
  1937.                 insertdown = true;
  1938.                 menu();
  1939.         elseif (!input.IsKeyDown(KEY_INSERT) && !menuopen) then
  1940.                 insertdown = false;
  1941.         end
  1942.         if (input.IsKeyDown(KEY_INSERT) && insertdown && menuopen) then
  1943.                 insertdown2 = true;
  1944.         else
  1945.                 insertdown2 = false;
  1946.         end
  1947.         menr = gInt("Color", "Menu Color", "Red")
  1948.         meng = gInt("Color", "Menu Color", "Green")
  1949.         menb = gInt("Color", "Menu Color", "Blue")
  1950.         menuscol = Color(menr, meng, menb, 255)
  1951.         texr = gInt("Color", "Text Color", "Red")
  1952.         texg = gInt("Color", "Text Color", "Green")
  1953.         texb = gInt("Color", "Text Color", "Blue")
  1954.         textcol = Color(texr, texg, texb, 255)
  1955.         cror = gInt("Color", "Crosshair Color", "Red")
  1956.         crog = gInt("Color", "Crosshair Color", "Green")
  1957.         crob = gInt("Color", "Crosshair Color", "Blue")
  1958.         crocol = Color(cror, crog, crob, 255)
  1959.         if scnx ~= ScrW() then
  1960.             RunConsoleCommand("retry")
  1961.  
  1962.         end
  1963. end
  1964.  
  1965. hook.Add("Think", "HackThink", Think);
  1966.  
  1967. local FindMetaTable = FindMetaTable;
  1968.  
  1969. local em = FindMetaTable"Entity";
  1970. local pm = FindMetaTable"Player";
  1971. local cm = FindMetaTable"CUserCmd";
  1972. local wm = FindMetaTable"Weapon";
  1973. local am = FindMetaTable"Angle";
  1974. local vm = FindMetaTable"Vector";
  1975. local im = FindMetaTable"IMaterial";
  1976. local xm = FindMetaTable"VMatrix";
  1977. local Eye_Angles = em.EyeAngles
  1978.  
  1979. local testchange
  1980. local Vector = Vector;
  1981. local player = Copy(player);
  1982. local Angle = Angle;
  1983. local me = LocalPlayer();
  1984. local render = Copy(render);
  1985. local cma = Copy(cam);
  1986. local Material = Material;
  1987. local CreateMaterial = CreateMaterial;
  1988. local poop = {89, -89}
  1989. local fakelagTick, fakelagSend = 0;
  1990. local fakechokeS = 0;
  1991. local fakeLagSwitch
  1992. local sendCount, chokeCount = 0, 0;
  1993. local fakelagBucket = {};
  1994. local teststuck = 0
  1995. local nullVel = Vector();
  1996. local function GetAngle(ang)
  1997.     if(!gBool("Aimbot", "Accuracy", "NoRecoil")) then return ang + pm.GetPunchAngle(me); end
  1998.     return ang;
  1999. end
  2000.  
  2001. local function fakelag()
  2002.     if(!gBool("HVH", "FakeLag", "Enabled")) then
  2003.         sendCount = 0;
  2004.         chokeCount = 0;
  2005.         fakeLagSwitch = false;
  2006.         return;
  2007.     end
  2008.     local choke = gInt("HVH", "FakeLag", "Fakelag Rate");
  2009.  
  2010.     if(fakeLagSwitch) then
  2011.         if(sendCount >= 1) then
  2012.             fakeLagSwitch = false;
  2013.             sendCount = 0;
  2014.             chokeCount = 0;
  2015.         else
  2016.             sendCount = sendCount + 1;
  2017.         end
  2018.     else
  2019.         if(chokeCount >= choke) then
  2020.             fakeLagSwitch = true;
  2021.             sendCount = 0;
  2022.             chokeCount = 0;
  2023.         else
  2024.             chokeCount = chokeCount + 1;
  2025.         end
  2026.     end
  2027. end
  2028.  
  2029. local function fakelagPredict(v)
  2030.     if(!gBool("HVH", "FakeLag", "Fakelag Prediction")) then return; end
  2031.     if(!fakelagBucket[v]) then
  2032.         fakelagBucket[v] = {
  2033.             em.GetVelocity(v),
  2034.             em.GetPos(v),
  2035.             0,
  2036.         };
  2037.     end
  2038.  
  2039.     local oldVel = fakelagBucket[v][1];
  2040.        
  2041.         if !v:IsOnGround() then
  2042.             oldVel.z  = (0.5 * GetConVarNumber("sv_gravity") * engine.TickInterval()^2) + oldVel.z * engine.TickInterval()
  2043.         end
  2044.     local oldPos = fakelagBucket[v][2];
  2045.     local oldVelz = oldVel.z || 0
  2046.  
  2047.     fakelagBucket[v][1] = em.GetVelocity(v);
  2048.     fakelagBucket[v][2] = em.GetPos(v);
  2049.  
  2050.     if(oldVel == nullVel) then
  2051.         fakelagBucket[v][3] = 0;
  2052.         return;
  2053.     end
  2054.  
  2055.     if(fakelagBucket[v][1] == oldVel && oldPos == fakelagBucket[v][2]) then
  2056.         fakelagBucket[v][3] = fakelagBucket[v][3] + 1;
  2057.        
  2058.         return fakelagBucket[v][3], fakelagBucket[v][1];
  2059.     else
  2060.         fakelagBucket[v][3] = 0;
  2061.         return 1
  2062.     end
  2063. end
  2064.  
  2065.  
  2066.  
  2067.  
  2068. local function Filter(v)
  2069.     local enemy = gBool("Visuals", "Filter", "Enemies only");
  2070.     local dist = gBool("Visuals", "Filter", "Distance")
  2071.     if(enemy) then
  2072.         if gBool("Visuals", "Filter", "Always show Friends") then
  2073.             if(pm.Team(v) == pm.Team(me)) && (v:GetFriendStatus() ~= "friend" || table.HasValue(Friends, v)) && v ~= me then return false; end
  2074.         else
  2075.             if(pm.Team(v) == pm.Team(me)) && v ~= me then return false; end
  2076.         end
  2077.     end
  2078.     if(dist) then
  2079.         local maxdist = gBool("Visuals", "Filter", "Max Distance");
  2080.         if( vm.Distance( em.GetPos(v), em.GetPos(me) ) > (maxdist * 5) ) then return false; end
  2081.     end
  2082.     if (pm.Team(me) == TEAM_SPECTATOR && me:GetObserverMode() == 0 && pm.Team(v) ~= TEAM_SPECTATOR || pm.Team(me) ~= TEAM_SPECTATOR  && pm.Team(v) == TEAM_SPECTATOR) || !v:Alive() || v:GetObserverMode() ~= 0 then
  2083.         return false
  2084.     end
  2085.     return true;
  2086. end
  2087.  
  2088.  
  2089.  
  2090. local chamsmat = CreateMaterial("a", "VertexLitGeneric", {
  2091.     ["$ignorez"] = 1,
  2092.     ["$model"] = 1,
  2093.     ["$basetexture"] = "models/debug/debugwhite",
  2094. });
  2095.  
  2096. local chamsmat2 = CreateMaterial("@", "vertexlitgeneric", {
  2097.     ["$ignorez"] = 0,
  2098.     ["$model"] = 1,
  2099.     ["$basetexture"] = "models/debug/debugwhite",
  2100. });
  2101.  
  2102. local function GetChamsColor(v, vis)
  2103.     local pre = "Chams - Enemy";
  2104.     if(pm.Team(v) == pm.Team(me)) then
  2105.         pre = "Chams - Team";
  2106.     end
  2107.     if(vis) then
  2108.         local r = gInt("Color", pre, "Visible R") / 255;
  2109.         local g = gInt("Color", pre, "Visible G") / 255;
  2110.         local b = gInt("Color", pre, "Visible B") / 255;
  2111.         return r,g,b;
  2112.     end
  2113.     local r = gInt("Color", pre, "Not Visible R") / 255;
  2114.     local g = gInt("Color", pre, "Not Visible G") / 255;
  2115.     local b = gInt("Color", pre, "Not Visible B") / 255;
  2116.     return r,g,b;
  2117. end
  2118.  
  2119. local function GetHandsColor(vis)
  2120.     if(!vis) then
  2121.         local r = gInt("Color", "Chams - Hands", "Not Visible R") / 255;
  2122.         local g = gInt("Color", "Chams - Hands", "Not Visible G") / 255;
  2123.         local b = gInt("Color", "Chams - Hands", "Not Visible B") / 255;
  2124.         return r,g,b;
  2125.     end
  2126.     local r = gInt("Color", "Chams - Hands", "Visible R") / 255;
  2127.     local g = gInt("Color", "Chams - Hands", "Visible G") / 255;
  2128.     local b = gInt("Color", "Chams - Hands", "Visible B") / 255;
  2129.     return r,g,b;
  2130. end
  2131.  
  2132. local function GetWeapsColor()
  2133.    
  2134.     local r = gInt("Color", "Chams - Weapon", "Visible R") / 255;
  2135.     local g = gInt("Color", "Chams - Weapon", "Visible G") / 255;
  2136.     local b = gInt("Color", "Chams - Weapon", "Visible B") / 255;
  2137.     return r,g,b;
  2138. end
  2139.  
  2140. local buttons = {
  2141. [KEY_FIRST] = {KEY_FIRST, "KEY_FIRST"},
  2142. [KEY_NONE] = {KEY_NONE, "KEY_NONE"},
  2143. [KEY_0] = {KEY_0, "KEY_0"},
  2144. [KEY_1] = {KEY_1, "KEY_1"},
  2145. [KEY_2] = {KEY_2, "KEY_2"},
  2146. [KEY_3] = {KEY_3, "KEY_3"},
  2147. [KEY_4] = {KEY_4, "KEY_4"},
  2148. [KEY_5] = {KEY_5, "KEY_5"},
  2149. [KEY_6] = {KEY_6, "KEY_6"},
  2150. [KEY_7] = {KEY_7, "KEY_7"},
  2151. [KEY_8] = {KEY_8, "KEY_8"},
  2152. [KEY_9] = {KEY_9, "KEY_9"},
  2153. [KEY_A] = {KEY_A, "KEY_A"},
  2154. [KEY_B] = {KEY_B, "KEY_B"},
  2155. [KEY_C] = {KEY_C, "KEY_C"},
  2156. [KEY_D] = {KEY_D, "KEY_D"},
  2157. [KEY_E] = {KEY_E, "KEY_E"},
  2158. [KEY_F] = {KEY_F, "KEY_F"},
  2159. [KEY_G] = {KEY_G, "KEY_G"},
  2160. [KEY_H] = {KEY_H, "KEY_H"},
  2161. [KEY_I] = {KEY_I, "KEY_I"},
  2162. [KEY_J] = {KEY_J, "KEY_J"},
  2163. [KEY_K] = {KEY_K, "KEY_K"},
  2164. [KEY_L] = {KEY_L, "KEY_L"},
  2165. [KEY_M] = {KEY_M, "KEY_M"},
  2166. [KEY_N] = {KEY_N, "KEY_N"},
  2167. [KEY_O] = {KEY_O, "KEY_O"},
  2168. [KEY_P] = {KEY_P, "KEY_P"},
  2169. [KEY_Q] = {KEY_Q, "KEY_Q"},
  2170. [KEY_R] = {KEY_R, "KEY_R"},
  2171. [KEY_S] = {KEY_S, "KEY_S"},
  2172. [KEY_T] = {KEY_T, "KEY_T"},
  2173. [KEY_U] = {KEY_U, "KEY_U"},
  2174. [KEY_V] = {KEY_V, "KEY_V"},
  2175. [KEY_W] = {KEY_W, "KEY_W"},
  2176. [KEY_X] = {KEY_X, "KEY_X"},
  2177. [KEY_Y] = {KEY_Y, "KEY_Y"},
  2178. [KEY_Z] = {KEY_Z, "KEY_Z"},
  2179. [KEY_PAD_0] = {KEY_PAD_0, "KEY_PAD_0"},
  2180. [KEY_PAD_1] = {KEY_PAD_1, "KEY_PAD_1"},
  2181. [KEY_PAD_2] = {KEY_PAD_2, "KEY_PAD_2"},
  2182. [KEY_PAD_3] = {KEY_PAD_3, "KEY_PAD_3"},
  2183. [KEY_PAD_4] = {KEY_PAD_4, "KEY_PAD_4"},
  2184. [KEY_PAD_5] = {KEY_PAD_5, "KEY_PAD_5"},
  2185. [KEY_PAD_6] = {KEY_PAD_6, "KEY_PAD_6"},
  2186. [KEY_PAD_7] = {KEY_PAD_7, "KEY_PAD_7"},
  2187. [KEY_PAD_8] = {KEY_PAD_8, "KEY_PAD_8"},
  2188. [KEY_PAD_9] = {KEY_PAD_9, "KEY_PAD_9"},
  2189. [KEY_PAD_DIVIDE] = {KEY_PAD_DIVIDE, "KEY_PAD_DIVIDE"},
  2190. [KEY_PAD_MULTIPLY] = {KEY_PAD_MULTIPLY, "KEY_PAD_MULTIPLY"},
  2191. [KEY_PAD_MINUS] = {KEY_PAD_MINUS, "KEY_PAD_MINUS"},
  2192. [KEY_PAD_PLUS] = {KEY_PAD_PLUS, "KEY_PAD_PLUS"},
  2193. [KEY_PAD_ENTER] = {KEY_PAD_ENTER, "KEY_PAD_ENTER"},
  2194. [KEY_PAD_DECIMAL] = {KEY_PAD_DECIMAL, "KEY_PAD_DECIMAL"},
  2195. [KEY_LBRACKET] = {KEY_LBRACKET, "KEY_LBRACKET"},
  2196. [KEY_RBRACKET] = {KEY_RBRACKET, "KEY_RBRACKET"},
  2197. [KEY_SEMICOLON] = {KEY_SEMICOLON, "KEY_SEMICOLON"},
  2198. [KEY_APOSTROPHE] = {KEY_APOSTROPHE, "KEY_APOSTROPHE"},
  2199. [KEY_BACKQUOTE] = {KEY_BACKQUOTE, "KEY_BACKQUOTE"},
  2200. [KEY_COMMA] = {KEY_COMMA, "KEY_COMMA"},
  2201. [KEY_PERIOD] = {KEY_PERIOD, "KEY_PERIOD"},
  2202. [KEY_SLASH] = {KEY_SLASH, "KEY_SLASH"},
  2203. [KEY_BACKSLASH] = {KEY_BACKSLASH, "KEY_BACKSLASH"},
  2204. [KEY_MINUS] = {KEY_MINUS, "KEY_MINUS"},
  2205. [KEY_EQUAL] = {KEY_EQUAL, "KEY_EQUAL"},
  2206. [KEY_ENTER] = {KEY_ENTER, "KEY_ENTER"},
  2207. [KEY_SPACE] = {KEY_SPACE, "KEY_SPACE"},
  2208. [KEY_BACKSPACE] = {KEY_BACKSPACE, "KEY_BACKSPACE"},
  2209. [KEY_TAB] = {KEY_TAB, "KEY_TAB"},
  2210. [KEY_CAPSLOCK] = {KEY_CAPSLOCK, "KEY_CAPSLOCK"},
  2211. [KEY_NUMLOCK] = {KEY_NUMLOCK, "KEY_NUMLOCK"},
  2212. [KEY_ESCAPE] = {KEY_ESCAPE, "KEY_ESCAPE"},
  2213. [KEY_SCROLLLOCK] = {KEY_SCROLLLOCK, "KEY_SCROLLLOCK"},
  2214. [KEY_INSERT] = {KEY_INSERT, "KEY_INSERT"},
  2215. [KEY_DELETE] = {KEY_DELETE, "KEY_DELETE"},
  2216. [KEY_HOME] = {KEY_HOME, "KEY_HOME"},
  2217. [KEY_END] = {KEY_END, "KEY_END"},
  2218. [KEY_PAGEUP] = {KEY_PAGEUP, "KEY_PAGEUP"},
  2219. [KEY_PAGEDOWN] = {KEY_PAGEDOWN, "KEY_PAGEDOWN"},
  2220. [KEY_BREAK] = {KEY_BREAK, "KEY_BREAK"},
  2221. [KEY_LSHIFT] = {KEY_LSHIFT, "KEY_LSHIFT"},
  2222. [KEY_RSHIFT] = {KEY_RSHIFT, "KEY_RSHIFT"},
  2223. [KEY_LALT] = {KEY_LALT, "KEY_LALT"},
  2224. [KEY_RALT] = {KEY_RALT, "KEY_RALT"},
  2225. [KEY_LCONTROL] = {KEY_LCONTROL, "KEY_LCONTROL"},
  2226. [KEY_RCONTROL] = {KEY_RCONTROL, "KEY_RCONTROL"},
  2227. [KEY_LWIN] = {KEY_LWIN, "KEY_LWIN"},
  2228. [KEY_RWIN] = {KEY_RWIN, "KEY_RWIN"},
  2229. [KEY_APP] = {KEY_APP, "KEY_APP"},
  2230. [KEY_UP] = {KEY_UP, "KEY_UP"},
  2231. [KEY_LEFT] = {KEY_LEFT, "KEY_LEFT"},
  2232. [KEY_DOWN] = {KEY_DOWN, "KEY_DOWN"},
  2233. [KEY_RIGHT] = {KEY_RIGHT, "KEY_RIGHT"},
  2234. [KEY_F1] = {KEY_F1, "KEY_F1"},
  2235. [KEY_F2] = {KEY_F2, "KEY_F2"},
  2236. [KEY_F3] = {KEY_F3, "KEY_F3"},
  2237. [KEY_F4] = {KEY_F4, "KEY_F4"},
  2238. [KEY_F5] = {KEY_F5, "KEY_F5"},
  2239. [KEY_F6] = {KEY_F6, "KEY_F6"},
  2240. [KEY_F7] = {KEY_F7, "KEY_F7"},
  2241. [KEY_F8] = {KEY_F8, "KEY_F8"},
  2242. [KEY_F9] = {KEY_F9, "KEY_F9"},
  2243. [KEY_F10] = {KEY_F10, "KEY_F10"},
  2244. [KEY_F11] = {KEY_F11, "KEY_F11"},
  2245. [KEY_F12] = {KEY_F12, "KEY_F12"},
  2246. [KEY_CAPSLOCKTOGGLE] = {KEY_CAPSLOCKTOGGLE, "KEY_CAPSLOCKTOGGLE"},
  2247. [KEY_NUMLOCKTOGGLE] = {KEY_NUMLOCKTOGGLE, "KEY_NUMLOCKTOGGLE"},
  2248. [KEY_LAST] = {KEY_LAST, "KEY_LAST"},
  2249. [KEY_SCROLLLOCKTOGGLE] = {KEY_SCROLLLOCKTOGGLE, "KEY_SCROLLLOCKTOGGLE"},
  2250. [KEY_COUNT] = {KEY_COUNT, "KEY_COUNT"},
  2251. }
  2252.  
  2253. hook.Add("PlayerBindPress", "HackPBP", function( ply, bind, pressed )
  2254.     --To block more commands, you could add another line similar to
  2255.     --the one below, just replace the command
  2256.     local test = "KEY_"..string.upper(input.LookupBinding("voicerecord"))
  2257.     local gotit
  2258.     for i=0, #buttons, 1 do
  2259.         if buttons[i][2] == test then
  2260.             gotit = i
  2261.         end
  2262.     end
  2263.     if (string.find( bind, "+voicerecord" )&& (ChatOpen) ) then
  2264.         return true
  2265.     end
  2266. end)
  2267.  
  2268. local function Chams(v)
  2269.     --[[local plycolor = v:GetPlayerColor()
  2270.         plycolor = Color(plycolor.x, plycolor.y, plycolor.z)]]
  2271.     if !screengrab then
  2272.     if (gOption("Visuals", "ESP", "Model Type") == "XQZ") then
  2273.         cam.Start3D();
  2274.             render.SuppressEngineLighting(true)
  2275.             render.MaterialOverride();
  2276.             render.SetColorModulation(1,1,1);
  2277.             cam.IgnoreZ(true);
  2278.             em.DrawModel(v);
  2279.             cam.IgnoreZ(false);
  2280.             render.SetColorModulation(1,1,1);
  2281.             render.MaterialOverride();
  2282.             render.SuppressEngineLighting(false)
  2283.         cam.End3D();
  2284.     elseif (gOption("Visuals", "ESP", "Model Type") == "Chams 2D") then
  2285.         cam.Start3D();
  2286.             render.SuppressEngineLighting(true)
  2287.             render.MaterialOverride(chamsmat);
  2288.             render.SetColorModulation(GetChamsColor(v));
  2289.                
  2290.             em.DrawModel(v);
  2291.                
  2292.             render.SetColorModulation(GetChamsColor(v, true));
  2293.             render.MaterialOverride(chamsmat2);
  2294.                
  2295.             em.DrawModel(v);
  2296.             render.SuppressEngineLighting(false)
  2297.             render.MaterialOverride();
  2298.         cam.End3D();
  2299.     elseif (gOption("Visuals", "ESP", "Model Type") == "Chams 3D") then
  2300.         cam.Start3D();
  2301.             render.MaterialOverride(chamsmat);
  2302.             render.SetColorModulation(GetChamsColor(v));
  2303.                
  2304.             em.DrawModel(v);
  2305.                
  2306.             render.SetColorModulation(GetChamsColor(v, true));
  2307.             render.MaterialOverride(chamsmat2);
  2308.                
  2309.             em.DrawModel(v);
  2310.             render.MaterialOverride();
  2311.         cam.End3D();
  2312.     else
  2313.         render.SetColorModulation(1,1,1);
  2314.         render.MaterialOverride();
  2315.     end
  2316.     end
  2317. end
  2318.  
  2319.  
  2320. local mattable = {};
  2321.  
  2322.  
  2323. local AudioSource = nil
  2324. local AMP = 500
  2325. local addfov = 0
  2326. refreshrate = FFT_512
  2327.  
  2328. --this is deprived of the refreshrate's levels which can be found here: http://wiki.garrysmod.com/page/Enums/FFT
  2329. --i.e FFT_512 = 256
  2330. bitrate = 256
  2331.  
  2332. function Coords(v)
  2333. local omin, omax =  v:OBBMins(), v:OBBMaxs()
  2334. vCoords = {
  2335.     Vector(omin.x, omin.y, omin.z),
  2336.     Vector(omin.x, omin.y, omax.z),
  2337.     Vector(omin.x, omax.y, omin.z),
  2338.     Vector(omin.x, omax.y, omax.z),
  2339.     Vector(omax.x, omin.y, omin.z),
  2340.     Vector(omax.x, omin.y, omax.z),
  2341.     Vector(omax.x, omax.y, omin.z),
  2342.     Vector(omax.x, omax.y, omax.z)
  2343.     }
  2344.     local minx, miny, maxx, maxy = ScrW() * 9999, ScrH() * 9999, -ScrW() * 9999, -ScrH() * 9999
  2345.     for _, corner in pairs(vCoords) do
  2346.         local screen = (v:GetPos() + corner):ToScreen()
  2347.         minx, miny = math.min(minx, screen.x), math.min(miny, screen.y)
  2348.         maxx, maxy = math.max(maxx, screen.x), math.max(maxy, screen.y)
  2349.     end
  2350.     return minx, miny, maxx, maxy
  2351. end
  2352.  
  2353.  
  2354.  
  2355. local function GetColor(v)
  2356.     if(pm.Team(v) == pm.Team(me)) then
  2357.         local r = gInt("Colors", "Box - Team", "R");
  2358.         local g = gInt("Colors", "Box - Team", "G");
  2359.         local b = gInt("Colors", "Box - Team", "B");
  2360.         return(Color(r, g, b, 220));
  2361.     end
  2362.     local r = gInt("Colors", "Box - Enemy", "R");
  2363.     local g = gInt("Colors", "Box - Enemy", "G");
  2364.     local b = gInt("Colors", "Box - Enemy", "B");
  2365.     return(Color(r, g, b, 220));
  2366. end
  2367.  
  2368.  
  2369. local aimtarget;
  2370.  
  2371. local Spectators = {}
  2372. local Moderator = {}
  2373. local Admin = {}
  2374.  
  2375.  
  2376.  
  2377.  
  2378. local fa;
  2379. local aa;
  2380. local soo = false;
  2381. local ctype = 0
  2382. local cspin = 0
  2383. local ctype2 = 0
  2384. local ctype3 = 0
  2385. local ctype4 = 0
  2386. veloloss = false
  2387. cleft = 0
  2388. local function FixMovement(ucmd, aaaaa)
  2389.     if (fa) then
  2390.     aim = fa
  2391.     else
  2392.     aim = fa
  2393.     end
  2394.     if math.NormalizeAngle(cm.GetViewAngles(ucmd).p) > 89 || math.NormalizeAngle(cm.GetViewAngles(ucmd).p) < -89 then
  2395.         soo = true
  2396.     else
  2397.         soo = false
  2398.     end
  2399.     local move = Vector(cm.GetForwardMove(ucmd), cm.GetSideMove(ucmd), cm.GetUpMove(ucmd));
  2400.     if !input.IsKeyDown(KEY_SPACE) then
  2401.         canjump = false
  2402.     end
  2403.     if gBool("Misc", "BunnyHop", "Enabled") && me:GetMoveType() ~= MOVETYPE_NOCLIP && input.IsKeyDown( KEY_SPACE ) && canjump && me:Alive() && !ChatOpen && !PSBox then
  2404.     if (gOption("Misc", "BunnyHop", "Strafe Type") == "Full" || (gOption("Misc", "BunnyHop", "Strafe Type") ~= "Off" && (gKey("Misc", "BunnyHop", "cStrafe Toggle"))))  then
  2405.         if gKey("Misc", "BunnyHop", "cStrafe Toggle")  then
  2406.             veloloss = true
  2407.        
  2408.             if ctype == 0 then
  2409.                 ctype = 200
  2410.             elseif ucmd:CommandNumber() ~= 0 then
  2411.             ctype = ctype + (math.Clamp((me:GetVelocity():Length2D() *1), 0.25, math.Clamp(((math.Clamp(GetConVarNumber("sv_airaccelerate"),0,80)*(engine.TickInterval()*5))),0.20,8)) )+(cm.GetMouseX(ucmd) * -GetConVarNumber("m_yaw"))
  2412.             end
  2413.             math.NormalizeAngle(ctype)
  2414.             Vector(100, 0, cm.GetUpMove(ucmd))
  2415.         else
  2416.        
  2417.             ctype  = 0
  2418.             veloloss = false
  2419.        
  2420.                 if(!me:IsOnGround()) then
  2421.                     if(ucmd:GetMouseX() > 1 || ucmd:GetMouseX() < -1) then
  2422.                         move = Vector(0, (ucmd:GetMouseX() > 1 && 400 || -400), cm.GetUpMove(ucmd))
  2423.                     else
  2424.                         if ucmd:CommandNumber() ~= 0 then
  2425.                         move = Vector((5200 / me:GetVelocity():Length2D()), ((ucmd:CommandNumber() % 2 == 0) && -400 || 400), cm.GetUpMove(ucmd))
  2426.                         end
  2427.                     end
  2428.                 else
  2429.                     move = Vector(1, 0, cm.GetUpMove(ucmd))
  2430.                 end
  2431.    
  2432.         end
  2433.     elseif gOption("Misc", "BunnyHop", "Strafe Type") == "Assist" then
  2434.         ctype  = 0
  2435.         veloloss = false
  2436.         if(ucmd:GetMouseX() > 1 || ucmd:GetMouseX() < -1) then
  2437.             move = Vector(0, (ucmd:GetMouseX() > 1 && 300 || -300), cm.GetUpMove(ucmd))
  2438.         end
  2439.     else
  2440.         ctype  = 0
  2441.         veloloss = false
  2442.         move = Vector(cm.GetForwardMove(ucmd), cm.GetSideMove(ucmd), cm.GetUpMove(ucmd));
  2443.     end
  2444.     else
  2445.     ctype  = 0
  2446.     veloloss = false
  2447.     move = Vector(cm.GetForwardMove(ucmd), cm.GetSideMove(ucmd), cm.GetUpMove(ucmd));
  2448.     end
  2449.     ctype2 = math.rad(ctype)
  2450.     ctype3 = math.rad(ctype-80)
  2451.     ctype4 = math.rad(ctype+80)
  2452.     math.NormalizeAngle(ctype3)
  2453.     math.NormalizeAngle(ctype4)
  2454.    
  2455.     local speed = math.sqrt(move.x * move.x + move.y * move.y);
  2456.     local ang = vm.Angle(move);
  2457.     local yaw = math.rad(cm.GetViewAngles(ucmd).y - fa.y + ang.y);
  2458.     --print(yaw)
  2459.     cm.SetForwardMove(ucmd, (math.cos(yaw+ ctype2) * speed) * ( soo && -1 || 1 ));
  2460.     cm.SetSideMove(ucmd, math.sin(yaw + ctype2) * speed);
  2461.     cm.SetUpMove(ucmd, cm.GetUpMove(ucmd));
  2462. end
  2463.  
  2464. local function Clamp(val, min, max)
  2465.     if(val < min) then
  2466.         return min;
  2467.     elseif(val > max) then
  2468.         return max;
  2469.     end
  2470.     return val;
  2471. end
  2472.  
  2473. local function NormalizeAngle(ang)
  2474.     ang.x = math.NormalizeAngle(ang.x);
  2475.     ang.p = math.Clamp(ang.p, -120, 120);
  2476. end
  2477.  
  2478.  
  2479. local table = Copy(table);
  2480. local dists = {};
  2481.  
  2482.  
  2483.  
  2484. function Transform(pos, matrix)
  2485.     local matA, matB, matC = matrix[1], matrix[2], matrix[3]
  2486.     local x = Vector(matA[1], matA[2], matA[3])
  2487.     local y = Vector(matB[1], matB[2], matB[3])
  2488.     local z = Vector(matC[1], matC[2], matC[3])
  2489.  
  2490.     return Vector(pos:Dot(x) + matA[4], pos:Dot(y) + matB[4], pos:Dot(z)+ matC[4])
  2491. end
  2492.  
  2493.  
  2494. local function Hitbox(v)
  2495.     if v:IsValid() then
  2496.         local numHitBoxes = v:GetHitBoxCount( 0 )
  2497.         local headbox = nil
  2498.         local headbone = nil
  2499.         local headfound = false
  2500.         local spinebox = nil
  2501.         local spinebone = nil
  2502.         local spinefound = false
  2503.         local zombbox = nil
  2504.         local zombbone = nil
  2505.         local zombfound = false
  2506.         zombfound2 = false
  2507.  
  2508.     if !string.find(string.lower(GAMEMODE.Name), "prop") then
  2509.         for group = 0, em.GetHitBoxGroupCount(v) - 1 do
  2510.             local count = em.GetHitBoxCount(v, group)
  2511.             for hitbox = 0, count - 1 do
  2512.                 local bone = em.GetHitBoxBone( v, hitbox, group );
  2513.                 if(!bone) then continue; end
  2514.                 local min, max = em.GetHitBoxBounds( v, hitbox, group );
  2515.                 local bonepos, boneang = em.GetBonePosition( v, bone );
  2516.             end
  2517.         end
  2518.         for hitbox=0, numHitBoxes - 1 do
  2519.             local bone = v:GetHitBoxBone( hitbox, 0 )
  2520.             if !gBool("Aimbot", "Target", "Bodyaim") then
  2521.                 if string.find(string.lower(GAMEMODE.Name), "zomb") then
  2522.                     if string.find(string.lower(v:GetBoneName( bone )), "head") then
  2523.                     zombbox = hitbox
  2524.                     zombbone = em.GetHitBoxBone( v, hitbox, 0 )
  2525.                     zombfound = true
  2526.                     elseif string.find(string.lower(v:GetBoneName( bone )), "spine") && !zombfound then
  2527.                     zombbox = hitbox
  2528.                     zombbone = em.GetHitBoxBone( v, hitbox, 0 )
  2529.            
  2530.                     elseif (string.find(string.lower(v:GetBoneName( bone )), "body") || string.find(string.lower(v:GetBoneName( bone )), "headcrab")) && !zombfound then
  2531.                     zombbox = hitbox
  2532.                     zombbone = em.GetHitBoxBone( v, hitbox, 0 )
  2533.                
  2534.                     elseif hitbox == (numHitBoxes - 1) && bone && !zombfound then
  2535.                         zombbox = 0
  2536.                         zombbone = em.GetHitBoxBone( v, 0, 0 )
  2537.                         zombfound = true
  2538.                     end
  2539.                 elseif string.find(string.lower(v:GetBoneName( bone )), "head") then
  2540.                 headbox = hitbox
  2541.                 headbone = em.GetHitBoxBone( v, hitbox, 0 )
  2542.                 headfound = true
  2543.                 elseif string.find(string.lower(v:GetBoneName( bone )), "spine2") && !headfound then
  2544.                 spinebox = hitbox
  2545.                 spinebone = em.GetHitBoxBone( v, hitbox, 0 )
  2546.                 elseif hitbox == (numHitBoxes - 1) && !headfound then
  2547.                 headbox = 0
  2548.                 headbone = em.GetHitBoxBone( v, 0, 0 )
  2549.                 headfound = true
  2550.                 end
  2551.             else
  2552.                 if string.find(string.lower(GAMEMODE.Name), "zomb") then
  2553.                     if string.find(string.lower(v:GetBoneName( bone )), "spine") then
  2554.                     zombbox = hitbox
  2555.                     zombbone = em.GetHitBoxBone( v, hitbox, 0 )
  2556.                     zombfound = true
  2557.                     elseif (string.find(string.lower(v:GetBoneName( bone )), "body") || string.find(string.lower(v:GetBoneName( bone )), "headcrab")) && !zombfound then
  2558.                     zombbox = hitbox
  2559.                     zombbone = em.GetHitBoxBone( v, hitbox, 0 )
  2560.                     elseif hitbox == (numHitBoxes - 1) && !zombfound then
  2561.                         zombbox = 0
  2562.                         zombbone = em.GetHitBoxBone( v, 0, 0 )
  2563.                         zombfound = true
  2564.                     end
  2565.                 else
  2566.                     if string.find(string.lower(v:GetBoneName( bone )), "spine2") then
  2567.                         spinebox = hitbox
  2568.                         spinebone = em.GetHitBoxBone( v, hitbox, 0 )
  2569.                         spinefound = true
  2570.                     elseif string.find(string.lower(v:GetBoneName( bone )), "spine1") && !spinefound then
  2571.                         spinebox = hitbox
  2572.                         spinebone = em.GetHitBoxBone( v, hitbox, 0 )
  2573.                     elseif hitbox == (numHitBoxes - 1) && !spinefound then
  2574.                     spinebox = 0
  2575.                     spinebone = em.GetHitBoxBone( v, 0, 0 )
  2576.                     spinefound = true
  2577.                     end
  2578.                 end
  2579.             end
  2580.         end
  2581.         if headbone then
  2582.             local Matrix = em.GetBoneMatrix(v, headbone)
  2583.             if not Matrix then
  2584.             return
  2585.             end
  2586.             Matrix = xm.ToTable(Matrix)
  2587.             local min, max = em.GetHitBoxBounds( v, headbox, 0 );
  2588.             return (Transform(min, Matrix) + Transform(max, Matrix)) * 0.5;
  2589.         elseif zombbone then
  2590.             local Matrix = em.GetBoneMatrix(v, zombbone)
  2591.             if not Matrix then
  2592.             return
  2593.             end
  2594.             Matrix = xm.ToTable(Matrix)
  2595.             local min, max = em.GetHitBoxBounds( v, zombbox, 0 );
  2596.             return (Transform(min, Matrix) + Transform(max, Matrix)) * 0.5;
  2597.         elseif spinebox then
  2598.             local Matrix = em.GetBoneMatrix(v, spinebone)
  2599.             if not Matrix then
  2600.             return
  2601.             end
  2602.             Matrix = xm.ToTable(Matrix)
  2603.             local min, max = em.GetHitBoxBounds( v, spinebox, 0 );
  2604.             return (Transform(min, Matrix) + Transform(max, Matrix)) * 0.5;
  2605.         else
  2606.             if em.GetBoneMatrix(v, 0, 0) ~= nil then
  2607.             local Matrix = em.GetBoneMatrix(v, 0, 0)
  2608.             if not Matrix then
  2609.             return
  2610.             end
  2611.             Matrix = xm.ToTable(Matrix)
  2612.             local min, max = em.GetHitBoxBounds( v, 0, 0 );
  2613.             return (Transform(min, Matrix) + Transform(max, Matrix)) * 0.5;
  2614.             end
  2615.         end
  2616.     else
  2617.         return em.LocalToWorld(v, em.OBBCenter(v))
  2618.     end
  2619.     end
  2620. end
  2621.  
  2622. local function GetPos(v)
  2623.  
  2624.     if(gBool("Aimbot", "Target", "Bodyaim")) then return( em.LocalToWorld(v, em.OBBCenter(v)) ); end
  2625.  
  2626.     local eyes = em.LookupAttachment(v, "eyes");
  2627.    
  2628.     if(!eyes) then return( em.LocalToWorld(v, em.OBBCenter(v)) ); end
  2629.    
  2630.     local pos = em.GetAttachment(v, eyes);
  2631.    
  2632.     if(!pos) then return( em.LocalToWorld(v, em.OBBCenter(v)) ); end
  2633.    
  2634.     return(pos.Pos);
  2635. end
  2636.  
  2637. local aimignore;
  2638.  
  2639. function CloseChat()
  2640.     ChatOpen = false
  2641. end
  2642. hook.Add("FinishChat", "chatclosed", CloseChat)
  2643.  
  2644. function OpenChat(isTeamChat)
  2645.     if ( isTeamChat == false ) then
  2646.         ChatOpen = true
  2647.     else
  2648.         ChatOpen = true
  2649.     end
  2650. end
  2651. hook.Add("StartChat", "chatopened", OpenChat)
  2652.  
  2653. local function fasAutowall(wep, startPos, aimPos, v)
  2654. local trace_walls = bit.bor(CONTENTS_TESTFOGVOLUME, CONTENTS_EMPTY, CONTENTS_MONSTER, CONTENTS_HITBOX);
  2655. local NoPenetration = {[MAT_SLOSH] = true};
  2656. local PenMod = {[MAT_SAND] = 0.5, [MAT_DIRT] = 0.8, [MAT_METAL] = 1.1, [MAT_TILE] = 0.9, [MAT_WOOD] = 1.2};
  2657. local trace_normal = bit.bor(CONTENTS_SOLID, CONTENTS_OPAQUE, CONTENTS_MOVEABLE, CONTENTS_DEBRIS, CONTENTS_MONSTER, CONTENTS_HITBOX, 402653442, CONTENTS_WATER);
  2658. local MaxPenetration
  2659.         ammotype = game.GetAmmoName(wep:GetPrimaryAmmoType())
  2660.         wepname = me:GetActiveWeapon():GetClass()
  2661.         wepid =  string.Explode("_", wepname)
  2662.         if string.find(wepname, "m9k_") then
  2663.             if GetConVarNumber("M9KDisablePenetration") == 1 then
  2664.             return false
  2665.             end
  2666.         else
  2667.             return false
  2668.         end
  2669.        
  2670.        
  2671.  
  2672.     if ammotype == "SniperPenetratedRound" then -- .50 Ammo
  2673.                 MaxPenetration = 20
  2674.         elseif ammotype == "pistol" then -- pistols
  2675.                 MaxPenetration = 9
  2676.         elseif ammotype == "357" then -- revolvers with big ass bullets
  2677.                 MaxPenetration = 12
  2678.         elseif ammotype == "smg1" then -- smgs
  2679.                 MaxPenetration = 14
  2680.         elseif ammotype == "ar2" then -- assault rifles
  2681.                 MaxPenetration = 16
  2682.         elseif ammotype == "buckshot" then -- shotguns
  2683.                 MaxPenetration = 5
  2684.         elseif ammotype == "slam" then -- secondary shotguns
  2685.                 MaxPenetration = 5
  2686.         elseif ammotype ==     "AirboatGun" then -- metal piercing shotgun pellet
  2687.                 MaxPenetration = 17
  2688.         else
  2689.                 MaxPenetration = 14
  2690.         end
  2691.         local tr = {}
  2692.         local tres = {}
  2693.         local dist = {}
  2694.    
  2695.     local dir = ((Hitbox(v) + (em.GetVelocity(v) * engine.TickInterval())) - me:EyePos()):Angle();
  2696.     local maxpen = {}
  2697.  
  2698.     tr[1] = {
  2699.         start = me:EyePos(),
  2700.         endpos = Hitbox(v) + (em.GetVelocity(v) * engine.TickInterval()),
  2701.         mask = MASK_SHOT,
  2702.         filter = {me, v},
  2703.     };
  2704.     tres[1] = util.TraceLine(tr[1])
  2705.     tr[2] = {
  2706.         start = tres[1].HitPos + (dir:Forward() * MaxPenetration),
  2707.         endpos = tres[1].HitPos,
  2708.         mask = MASK_SHOT,
  2709.         filter = {me, v},
  2710.     };
  2711.     tres[2] = util.TraceLine(tr[2])
  2712.     if tres[1].Fraction == 1 && !tres[2].StartSolid then
  2713.     return true
  2714.     elseif (!tres[2].StartSolid && (tres[2].Fraction * MaxPenetration) <= MaxPenetration) && (tres[2].Fraction >= 0.00000001) then
  2715.     maxpen[1] = MaxPenetration * tres[2].Fraction
  2716.     elseif tres[2].StartSolid or (tres[2].Fraction == 0) then
  2717.     return false
  2718.     end
  2719.    
  2720.     tr[3] = {
  2721.         start = tres[2].HitPos,
  2722.         endpos = Hitbox(v) + (em.GetVelocity(v) * engine.TickInterval()),
  2723.         mask = MASK_SHOT,
  2724.         filter = {me, v},
  2725.     };
  2726.     tres[3] = util.TraceLine(tr[3])
  2727.     tr[4] = {
  2728.         start = tres[3].HitPos + (dir:Forward() * maxpen[1]),
  2729.         endpos = tres[3].HitPos,
  2730.         mask = MASK_SHOT,
  2731.         filter = {me, v},
  2732.     };
  2733.     tres[4] = util.TraceLine(tr[4])
  2734.     if tres[3].Fraction == 1 && tres[4].StartSolid then
  2735.     return true
  2736.     elseif (!tres[4].StartSolid && (tres[4].Fraction * maxpen[1]) <= maxpen[1]) && (tres[4].Fraction >= 0.00000001) then
  2737.     maxpen[2] = maxpen[1] * tres[4].Fraction
  2738.     elseif tres[4].StartSolid or (tres[4].Fraction == 0) then
  2739.     return false
  2740.     end
  2741.    
  2742.     tr[5] = {
  2743.         start = tres[4].HitPos,
  2744.         endpos = Hitbox(v) + (em.GetVelocity(v) * engine.TickInterval()),
  2745.         mask = MASK_SHOT,
  2746.         filter = {me, v},
  2747.     };
  2748.     tres[5] = util.TraceLine(tr[5])
  2749.     tr[6] = {
  2750.         start = tres[5].HitPos + (dir:Forward() * maxpen[2]),
  2751.         endpos = tres[5].HitPos,
  2752.         mask = MASK_SHOT,
  2753.         filter = {me, v},
  2754.     };
  2755.     tres[6] = util.TraceLine(tr[6])
  2756.     if tres[5].Fraction == 1 && tres[6].StartSolid then
  2757.     return true
  2758.     elseif (!tres[6].StartSolid && (tres[6].Fraction * maxpen[2]) <= maxpen[2]) && (tres[6].Fraction >= 0.00000001) then
  2759.     maxpen[3] = maxpen[2] * tres[6].Fraction
  2760.     elseif tres[6].StartSolid or (tres[6].Fraction == 0) then
  2761.     return false
  2762.     end
  2763.    
  2764.    
  2765.     tr[7] = {
  2766.         start = tres[6].HitPos,
  2767.         endpos = Hitbox(v),
  2768.         mask = MASK_SHOT,
  2769.         filter = {me, v},
  2770.     };
  2771.     tres[7] = util.TraceLine(tr[7])
  2772.     if tres[7].Fraction == 1 then
  2773.     return true
  2774.     end
  2775.    
  2776. end
  2777. local angting
  2778. function GetAng(angle, src, dst)
  2779.     delta = src - dst
  2780.     hyp = delta:Length2D()
  2781.     ang = Angle(math.deg(math.atan(delta.z / hyp)), math.deg(math.atan(delta.y / delta.x)), 0)
  2782.    
  2783.     if (delta.x >= 0) then
  2784.         ang.y = ang.y + 180
  2785.     end
  2786.    
  2787.     pitch = angle.p * math.pi / 180
  2788.     yaw = angle.y * math.pi / 180
  2789.     tmp = math.cos(pitch)
  2790.    
  2791.     aim = Angle(tmp * math.cos(yaw), math.sin(yaw) * tmp, -math.sin(pitch))
  2792.    
  2793.     pitch = ang.p * math.pi / 180
  2794.     yaw = ang.y * math.pi / 180
  2795.     tmp = math.cos(pitch)
  2796.    
  2797.     ang = Angle(tmp * math.cos(yaw), math.sin(yaw) * tmp, -math.sin(pitch))
  2798.    
  2799.     mag_s = math.sqrt((aim.p * aim.p) + (aim.y * aim.y) + (aim.r * aim.r))
  2800.     mag_d = math.sqrt((aim.p * aim.p) + (aim.y * aim.y) + (aim.r * aim.r))
  2801.     u_dot_v = aim.p * ang.p + aim.y * ang.y + aim.r * ang.r
  2802.     testfov = math.acos(u_dot_v / (mag_s * mag_d)) * (180 / math.pi)
  2803.     if (math.acos(u_dot_v / (mag_s * mag_d)) * (180 / math.pi)) then
  2804.         angting = (math.acos(u_dot_v / (mag_s * mag_d)) * (180 / math.pi))
  2805.     return math.acos(u_dot_v / (mag_s * mag_d)) * (180 / math.pi)
  2806.     end
  2807. end
  2808.  
  2809. local testfov = 0
  2810. function CanFov(angle, src, dst)
  2811.     if gInt("Aimbot", "Aimbot", "fov") == 0 || gInt("Aimbot", "Aimbot", "fov") == 180 then
  2812.         return true
  2813.     end
  2814.     local delta = src - dst
  2815.     local hyp = delta:Length2D()
  2816.     local ang = Angle(math.deg(math.atan(delta.z / hyp)), math.deg(math.atan(delta.y / delta.x)), 0)
  2817.    
  2818.     if (delta.x >= 0) then
  2819.         ang.y = ang.y + 180
  2820.     end
  2821.    
  2822.     local pitch = angle.p * math.pi / 180
  2823.     local yaw = angle.y * math.pi / 180
  2824.     local tmp = math.cos(pitch)
  2825.    
  2826.     local aim = Angle(tmp * math.cos(yaw), math.sin(yaw) * tmp, -math.sin(pitch))
  2827.    
  2828.     pitch = ang.p * math.pi / 180
  2829.     yaw = ang.y * math.pi / 180
  2830.     tmp = math.cos(pitch)
  2831.    
  2832.     ang = Angle(tmp * math.cos(yaw), math.sin(yaw) * tmp, -math.sin(pitch))
  2833.    
  2834.     local mag_s = math.sqrt((aim.p * aim.p) + (aim.y * aim.y) + (aim.r * aim.r))
  2835.     local mag_d = math.sqrt((aim.p * aim.p) + (aim.y * aim.y) + (aim.r * aim.r))
  2836.     local u_dot_v = aim.p * ang.p + aim.y * ang.y + aim.r * ang.r
  2837.     testfov = math.acos(u_dot_v / (mag_s * mag_d)) * (180 / math.pi)
  2838.     if (math.acos(u_dot_v / (mag_s * mag_d)) * (180 / math.pi)) <= gInt("Aimbot", "Aimbot", "fov") then
  2839.     return math.acos(u_dot_v / (mag_s * mag_d)) * (180 / math.pi)
  2840.     end
  2841. end
  2842.  
  2843. local IsFirstTimePredicted = IsFirstTimePredicted;
  2844. local CurTime = CurTime;
  2845. local servertime=0;
  2846. local bit = Copy(bit)
  2847.  
  2848. function ClipVelocity( inn, normal, overbounce )
  2849. backoff = nil
  2850. change = nil
  2851. angle = nil
  2852. blocked = nil
  2853. out = Vector()
  2854. angle = normal
  2855. blocked = 0
  2856. if angle[3] > 0 then blocked = 1 end
  2857. if angle[3] < 0 then blocked = 3 end
  2858. if !angle then blocked = 2 end
  2859. backoff = inn:Dot( normal ) * overbounce
  2860. for i = 1, 3 do
  2861. change = normal[i] * backoff
  2862. out[i] = inn[i] - change
  2863. end
  2864. local adjust = out:Dot( normal )
  2865. if adjust < 0 then
  2866. out = out - normal * adjust
  2867. end
  2868. return blocked, out
  2869. end
  2870.  
  2871.  
  2872. local testturn = {}
  2873. local turn = {}
  2874. local moving = {}
  2875. checkturn = {}
  2876. checkturn2 = {}
  2877. bunny = {}
  2878. bunny2 = {}
  2879.  
  2880. for i = 0, game.MaxPlayers(), 1 do
  2881. turn[i] = 0
  2882. end
  2883. for i = 0, game.MaxPlayers(), 1 do
  2884. testturn[i] = Angle(0, 0, 0)
  2885. end
  2886.  
  2887. for i = 0, game.MaxPlayers(), 1 do
  2888. checkturn[i] = Angle(0,0,0)
  2889. end
  2890.  
  2891. for i = 0, game.MaxPlayers(), 1 do
  2892. checkturn2[i] = Angle(0,0,0)
  2893. end
  2894. for i = 0, game.MaxPlayers(), 1 do
  2895. bunny[i] = 0
  2896. end
  2897.  
  2898. for i = 0, game.MaxPlayers(), 1 do
  2899. bunny2[i] = 0
  2900. end
  2901.  
  2902. local function crossbowcheck(v, withtime, cross, prfm , Zdrop, pDist)
  2903.     local fake, oldvelo = fakelagPredict(v) || 1;
  2904.     local sA, sB, sC = 0, 0, 0
  2905.     local aA, aB, aC = 0, 0, 0
  2906.     local disma2 = v:GetVelocity()
  2907.     local perf = 25
  2908.     local grav = GetConVarNumber("sv_gravity")
  2909.     if prfm then
  2910.         perf = prfm
  2911.     end
  2912.     local tim = 3500
  2913.     disma2 = disma2:Angle()
  2914.     aC = GetAng(disma2, v:GetShootPos(), em.EyePos(me))
  2915.     sB = 3500
  2916.         sA = (em.EyePos(v)+(Vector(v:GetVelocity().x,v:GetVelocity().y,velopre))):Distance(em.EyePos(v)) + ((em.EyePos(v)+(Vector(v:GetVelocity().x,v:GetVelocity().y,velopre))):Distance(em.EyePos(v)) * engine.TickInterval())
  2917.     if pDist then
  2918.         sA = pDist:Distance(em.EyePos(v)) + (pDist:Distance(em.EyePos(v))*engine.TickInterval())
  2919.     end
  2920.     sC = math.pow(sA,2) + math.pow(sB,2) - 2*(sA)*(sB)*(math.cos(aC))
  2921.     sC = math.sqrt(sC)
  2922.     if withtime then
  2923.         tim = (em.GetPos(v):Distance(em.GetPos(me)))/sC
  2924.         if cross then
  2925.             tim = tim +(tim*((me:Ping() * (92/78))/1000))
  2926.         else
  2927.             tim = 0
  2928.         end
  2929.     else
  2930.         tim = 1
  2931.     end
  2932.         if cross then
  2933.             tim = tim + (tim *(me:Ping() /1000))
  2934.         end
  2935.         tim = tim*fake
  2936.         local pl = v:EntIndex()
  2937.         local velocityply = em.GetVelocity(v)
  2938.             if oldvelo then
  2939.                 velocityply = oldvelo
  2940.             end
  2941.         local block = 0
  2942.         local starty = em.GetPos(v)
  2943.         local oldplypos = em.GetPos(v)
  2944.         local disv
  2945.         local air = 0
  2946.         local maxair = 0
  2947.         local turnstate = false
  2948.         local turnnum = 0
  2949.         local turnflag = Vector()
  2950.         local turnflag2 = Vector()
  2951.         local zvelo
  2952.         local gred, ggreen, gblue = 255, 0, 0
  2953.         local move
  2954.         local perf = 25
  2955.            
  2956.         local cDrop = ((0.5 * grav * 0.05) * (tim^2) + math.max(1, (tim * 0.4)))
  2957.         for i = 0, perf, 1 do
  2958.         if ggreen ~= 255 then
  2959.             ggreen = math.Clamp((255/perf) * (2*i), 0, 255)
  2960.         elseif ggreen == 255 then
  2961.             gred = math.Clamp((255 - (255 * (2*(i-perf)))), 0, 255)
  2962.         end
  2963.     local mins = v:OBBMins()
  2964.     local maxs = v:OBBMaxs()
  2965.     if v:Alive() then
  2966.         if block ~= 1 then
  2967.             disv = (velocityply*(tim+((me:Ping() * (92/78))/1000)))* (1/perf)
  2968.             if withtime && !cross then 
  2969.                 disv = (((velocityply*engine.TickInterval())* (1/perf)))
  2970.             end
  2971.         else
  2972.             disv = (((velocityply*tim)/8) * (1/perf))
  2973.             if withtime && !cross then
  2974.                 disv = ((((velocityply*engine.TickInterval())*tim)/8) * (1/perf))
  2975.             end
  2976.         end
  2977.         if (!v:IsOnGround() && block ~= 1) && v:GetMoveType() ~= MOVETYPE_NOCLIP then
  2978.         disv.z  = (0.5 * -grav * math.pow((tim*(1+i)/(perf)),2) + (velocityply.z) * ((tim)*(1+i)/(perf)))
  2979.         if withtime && !cross then
  2980.         disv.z  = (0.5 * -grav * math.pow(((engine.TickInterval() * fake)*(1+i)/(perf)),2) + (velocityply.z) * ((engine.TickInterval() * fake)*(1+i)/(perf)))
  2981.         end
  2982.         end
  2983.    
  2984.         zvelo = Vector(disv.x, disv.y, (oldplypos.z - starty.z) +(disv.z))
  2985.         if pm.KeyDown(me, IN_WALK) && Zdrop then
  2986.         zvelo:Rotate(Angle(0,(turn[pl]* tim) * (100*(i/perf)),0))
  2987.         if block == 1 then
  2988.         zvelo:Rotate(Angle(0,turn[pl] * (100*(turnnum/perf)),0))
  2989.         end
  2990.         end
  2991.     plytr = {
  2992.         start = starty + Vector(0,0,0.1),
  2993.         endpos = starty + zvelo+ Vector(0,0,0.1),
  2994.         maxs = maxs,
  2995.         mins = mins,
  2996.         filter = v,
  2997.     }
  2998.    
  2999.     plytr2 = {
  3000.         start = starty + Vector(0,0,0.1),
  3001.         endpos = starty - Vector(0,0,1),
  3002.         maxs = maxs - Vector(0,0,maxs.z),
  3003.         mins = mins,
  3004.         filter = v,
  3005.     }
  3006.    
  3007.     local plytres = util.TraceHull(plytr)
  3008.     if cross then
  3009.     plytres2 = util.TraceHull(plytr2)
  3010.     end
  3011.     if Zdrop && cross then
  3012.     if !plytres2.Hit && air == 0 then
  3013.         air = 1
  3014.        
  3015.     elseif plytres2.Hit then
  3016.         air = 0
  3017.         maxair = 0
  3018.     end
  3019.     end
  3020.    
  3021.     if plytres.Hit then
  3022.     starty = plytres.HitPos
  3023.     turnstate = true
  3024.     turnnum = i
  3025.     block, velocityply = ClipVelocity( velocityply, plytres.HitNormal, 1 )
  3026.    
  3027.     if block ~= 0 then
  3028.     oldplypos = plytres.HitPos
  3029.     end
  3030.     else
  3031.         starty = plytr.endpos
  3032.     end
  3033.  
  3034.     if i == perf then
  3035.         if Zdrop then
  3036.             return plytres.HitPos + Vector(0,0,cDrop)
  3037.         else
  3038.             return plytres.HitPos
  3039.         end
  3040.     end
  3041.     end
  3042.     end
  3043. end
  3044.  
  3045.  
  3046. local function Valid(v)
  3047.     --[[if pm.GetActiveWeapon(me):IsValid() then
  3048.         local w = pm.GetActiveWeapon(me);
  3049.         if (!w || !em.IsValid(w) || !me:Alive()) then return false
  3050.             else
  3051.             if wm.GetNextPrimaryFire(w) > servertime || (wm.GetNextPrimaryFire(w) <= servertime && (!input.IsKeyDown(gKey("Aimbot", "Aimbot", "Key Toggle")) || input.IsMouseDown(gKey("Aimbot", "Aimbot", "Key Toggle")) && !gBool("Aimbot", "Aimbot", "Autosnap"))) then
  3052.                 return false
  3053.             end
  3054.         end
  3055.     end]]
  3056.     wep = me:GetActiveWeapon()
  3057.     if IsValid(wep) then
  3058.         if (me:GetActiveWeapon():GetPrimaryAmmoType() > 0 && wm.GetNextPrimaryFire(wep) > servertime) then
  3059.             return
  3060.         end
  3061.     end
  3062.     if !v then
  3063.     return false
  3064.     end
  3065.     if(!v || !v:Alive() || v == me  || v:IsDormant() || v:GetObserverMode() ~= 0 || (!gKey("Aimbot", "Aimbot", "Key Toggle") && !gBool("Aimbot", "Aimbot", "Autosnap")) || em.Health(v) < 0 || v:GetObserverMode() > 0 || (v == aimignore && gOption("Aimbot", "Target", "Selection") == "Nextshot")) then return false; end
  3066.     if !CanFov(fa, me:GetShootPos(), Hitbox(v)) then return false; end
  3067.     modcolor = em.GetColor(v)
  3068.     if string.find(string.lower(GAMEMODE.Name), "prop") then
  3069.         modcolor = Color(255,255,255)
  3070.     end
  3071.  
  3072.     if(gBool("Aimbot", "Target", "Ignore Spawn Protection")) then
  3073.         modcolor = Color(255,255,255)
  3074.         if tttgod then
  3075.             modcolor.r = 100
  3076.         end
  3077.     end
  3078.     if(gBool("Aimbot", "Target", "Ignore Bots")) then
  3079.         if(pm.IsBot(v)) then return false; end
  3080.     end
  3081.     if(gBool("Aimbot", "Target", "Ignore Team")) then
  3082.         if(pm.Team(v) == pm.Team(me)) then return false; end
  3083.     end
  3084.     if(gBool("Aimbot", "Target", "Ignore Friends")) then
  3085.         if (v:GetFriendStatus() == "friend") || (table.HasValue(Friends, v)) then return false; end
  3086.     end
  3087.     if tbudd && table.HasValue(Tbud, v) then return false; end
  3088.     if string.find(string.lower(GAMEMODE.Name), "morbus") then
  3089.         if !tbudd && !table.HasValue(Traitors, v) && GetRoundState() ==3 && gBool("Aimbot", "Target", "Ignore Team") then return false; end
  3090.         if tbudd && table.HasValue(Traitors, v)&&GetRoundState() ==3 && gBool("Aimbot", "Target", "Ignore Team") then return false; end
  3091.     end
  3092.     if tdect && table.HasValue(Tdectt, v) then return false; end
  3093.     if(v:HasGodMode() || v:IsFlagSet(FL_GODMODE) || v.ULXHasGod ||(modcolor.r < 255 && modcolor.r > 0 || modcolor.g < 255 && modcolor.g > 0 || modcolor.b < 255 && modcolor.b > 0) || modcolor.a < 255  ) then return false; end
  3094.     if (pm.Team(me) == TEAM_SPECTATOR && pm.Team(v) ~= TEAM_SPECTATOR || pm.Team(me) ~= TEAM_SPECTATOR && pm.Team(v) == TEAM_SPECTATOR) || !v:Alive() || v:GetObserverMode() ~= 0 then
  3095.         return false
  3096.     end
  3097.    
  3098.     tr = {
  3099.         start = me:EyePos(),
  3100.         endpos = Hitbox(v) + (em.GetVelocity(v) * engine.TickInterval()),
  3101.         mask = MASK_SHOT,
  3102.         filter = {me},
  3103.     };
  3104.     if !string.find(string.lower(GAMEMODE.Name), "prop") then
  3105.         tr = {
  3106.             start = me:EyePos(),
  3107.             endpos = Hitbox(v) + (em.GetVelocity(v) * engine.TickInterval()),
  3108.             mask = MASK_SHOT,
  3109.             filter = {me, v},
  3110.         };
  3111.         if util.TraceLine(tr).Fraction == 1 then
  3112.             return true
  3113.         else
  3114.             local wep = me:GetActiveWeapon();
  3115.             if(wep && wep:IsValid() && gBool("Aimbot", "Accuracy", "Auto Wall")) then
  3116.                    
  3117.                 if me:Team() == TEAM_SPECTATOR && me:Alive() then
  3118.                     tr2 = {
  3119.                         start = me:EyePos(),
  3120.                         endpos = Hitbox(v) + (em.GetVelocity(v) * engine.TickInterval()),
  3121.                         mask = MASK_SHOT,
  3122.                         filter = function( ent ) if ( ent:GetClass() == "worldspawn" && ent ~= v && me ~= ent ) then return true end end,
  3123.                     };
  3124.                     return util.TraceLine(tr2).Fraction == 1 || util.TraceLine(tr2).Entity == v
  3125.                 elseif (me:Team() ~= TEAM_SPECTATOR && me:Alive()) then
  3126.                     tr2 = {
  3127.                         start = Hitbox(v) + (em.GetVelocity(v) * engine.TickInterval()),
  3128.                         endpos = me:EyePos(),
  3129.                         mask = MASK_SHOT,
  3130.                         filter = function( ent ) if ( ent:GetClass() ~= "func_breakable" && ent ~= v && me ~= ent ) then return true end end,
  3131.                     };
  3132.                     if (util.TraceLine(tr2).Fraction == 1) then
  3133.                         return true
  3134.                     else
  3135.                         if me:GetActiveWeapon() then
  3136.                             if string.find( me:GetActiveWeapon():GetClass(), "m9k_") && gBool("Aimbot", "Accuracy", "Auto Wall") then
  3137.                                 return fasAutowall(wep, tr2.start, util.TraceLine(tr2).HitPos, v)
  3138.                             end
  3139.                         end
  3140.                     end
  3141.                 end
  3142.             end
  3143.             return false
  3144.         end
  3145.     else
  3146.         if util.TraceLine(tr).Entity:IsValid() then
  3147.             if (((util.TraceLine(tr).Entity:GetClass()) == "ph_prop" || util.TraceLine(tr).Fraction == 1) && team.GetName(me:Team()) == "Hunters") || (((util.TraceLine(tr).Entity:GetClass()) == "player" || util.TraceLine(tr).Fraction == 1) && team.GetName(me:Team()) == "Props") then
  3148.                 return true
  3149.             end
  3150.         elseif util.TraceLine(tr).Fraction == 1 then
  3151.             return true
  3152.         end
  3153.     end
  3154. end
  3155.  
  3156. local function gettarget()
  3157.    
  3158.     local opt = gOption("Aimbot", "Target", "Selection");
  3159.    
  3160.     local sticky = gOption("Aimbot", "Aimbot", "Non-Sticky");
  3161.    
  3162.     if(opt == "Distance") then
  3163.  
  3164.         if( !sticky && Valid(aimtarget) ) then return; end
  3165.  
  3166.         dists = {};
  3167.        
  3168.         for k,v in next, player.GetAll() do
  3169.             if v ~= plysp then
  3170.                 v:SetNoDraw(false)
  3171.             else
  3172.                 v:SetNoDraw(true)
  3173.             end
  3174.             if(!Valid(v)) then continue; end
  3175.             dists[#dists + 1] = { vm.Distance( em.GetPos(v), em.GetPos(me) ), v };
  3176.         end
  3177.        
  3178.         table.sort(dists, function(a, b)
  3179.             return(a[1] < b[1]);
  3180.         end);
  3181.        
  3182.         aimtarget = dists[1] && dists[1][2] || nil;
  3183.        
  3184.        
  3185.     elseif(opt == "Health") then
  3186.        
  3187.         if( !sticky && Valid(aimtarget) ) then return; end
  3188.  
  3189.         dists = {};
  3190.        
  3191.         for k,v in next, player.GetAll() do
  3192.             if(!Valid(v)) then continue; end
  3193.             dists[#dists + 1] = { em.Health(v), v };
  3194.         end
  3195.        
  3196.         table.sort(dists, function(a, b)
  3197.             return(a[1] < b[1]);
  3198.         end);
  3199.        
  3200.         aimtarget = dists[1] && dists[1][2] || nil;
  3201.        
  3202.     elseif(opt == "Nextshot") then
  3203.         if( !sticky && Valid(aimtarget) ) then return; end
  3204.         aimtarget = nil;
  3205.         local allplys = player.GetAll();
  3206.         local avaib = {};
  3207.         for k,v in next,allplys do
  3208.             avaib[math.random(100)] = v;
  3209.         end
  3210.        
  3211.         for k,v in next, avaib do
  3212.             if(Valid(v)) then
  3213.                 aimtarget = v;
  3214.                
  3215.             end
  3216.         end
  3217.     elseif (opt == "Closest to Crosshair") then
  3218.     if ( !sticky && Valid(aimtarget) ) then return; end
  3219.     dists = {};
  3220.         local x, y = ScrW(), ScrH()
  3221.         local AngA, AngB = 0
  3222.         for k,v in next, player.GetAll() do
  3223.             if(!Valid(v)) then continue; end
  3224.             local EyePos = v:EyePos():ToScreen()
  3225.             dists[#dists + 1] = { math.Dist(x / 2, y / 2, EyePos.x, EyePos.y), v };
  3226.         end
  3227.        
  3228.         table.sort(dists, function(a, b)
  3229.             return(a[1] < b[1]);
  3230.         end);
  3231.        
  3232.         aimtarget = dists[1] && dists[1][2] || nil;
  3233.        
  3234.     end
  3235. end
  3236.  
  3237.  
  3238.  
  3239.  
  3240. local cones = {};
  3241.  
  3242.  
  3243.  
  3244. local nullvec = Vector() * -1;
  3245.  
  3246. hook.Add("Move", "HackMove", function()
  3247.     if(!IsFirstTimePredicted()) then return; end
  3248.     servertime = CurTime();
  3249. end);
  3250. local FaAng = {}
  3251. for i = 0, game.MaxPlayers(), 1 do
  3252. FaAng[i] = {0,0,0}
  3253. end
  3254.  
  3255. GAMEMODE["EntityFireBullets"] = function(self, p, data)
  3256.     aimignore = aimtarget;
  3257.     local w = pm.GetActiveWeapon(me);
  3258.     local Spread = data.Spread * -1;
  3259.     if wm.GetNextPrimaryFire(w) <= servertime then
  3260.     --chat.AddText(color_white, tostring(checkturn2[me:EntIndex()]))
  3261.     end
  3262.     if(!w || !em.IsValid(w) || cones[em.GetClass(w)] == Spread || Spread == nullvec) then return; end
  3263.     cones[em.GetClass(w)] = Spread;
  3264. end
  3265.  
  3266. local function PredictSpread(ucmd, ang)
  3267.     local w = pm.GetActiveWeapon(me);
  3268.     if(!w || !em.IsValid(w) || !cones[em.GetClass(w)] || !gBool("Aimbot", "Accuracy", "NoSpread") || ((gKey("Aimbot", "Aimbot", "Key Toggle"))&& (!gBool("Aimbot", "Aimbot", "Autofire")) && !cm.KeyDown(ucmd, IN_ATTACK))) then return am.Forward(ang); end
  3269.     return(dickwrap.Predict(ucmd, am.Forward(ang), cones[em.GetClass(w)]));
  3270. end
  3271. local wepswitch = 0
  3272. local function Autofire(ucmd)
  3273.    
  3274.     if(pm.KeyDown(me, IN_ATTACK) && gBool("Aimbot", "Aimbot", "Auto Pistol") && gBool("Aimbot", "Aimbot", "Enabled") && me:GetActiveWeapon():Clip1() > 0) then
  3275.         cm.SetButtons(ucmd, bit.bor( cm.GetButtons(ucmd), 1 ) );
  3276.  
  3277.         wepswitch = 0
  3278.         elseif gBool("Aimbot", "Aimbot", "Autofire") && gBool("Aimbot", "Aimbot", "Enabled") && me:GetActiveWeapon():Clip1() > 0 then
  3279.         cm.SetButtons(ucmd, bit.bor( cm.GetButtons(ucmd), 1 ) );
  3280.         wepswitch = 0
  3281.         elseif me:GetActiveWeapon():Clip1() <= 0  then
  3282.         cm.SetButtons(ucmd, bit.bor( cm.GetButtons(ucmd), 1 ) );
  3283.     end
  3284. end
  3285.  
  3286.  
  3287. local function WeaponCanFire()
  3288.     local w = pm.GetActiveWeapon(me);
  3289.     if(!w || !em.IsValid(w)) then return true; end
  3290.    
  3291.     return( wm.GetNextPrimaryFire(w) <= servertime  );
  3292. end
  3293.  
  3294. local function WeaponShootable()
  3295.     local wep = pm.GetActiveWeapon(me);
  3296.     if( em.IsValid(wep) ) then
  3297.          local n = string.lower(wep:GetPrintName())
  3298.          if( wep:Clip1() <= 0 ) then
  3299.             return false;
  3300.          end
  3301.          
  3302.          
  3303.          
  3304.          
  3305.          if( string.find(n,"knife") or string.find(n,"grenade") or string.find(n,"sword") or string.find(n,"bomb") or string.find(n,"ied") or string.find(n,"c4") or string.find(n,"slam") or string.find(n,"climb") or string.find(n,"hand") or string.find(n,"fist") ) then
  3306.             return false;
  3307.          end
  3308.          
  3309.          
  3310.           return true;
  3311.     end
  3312. end
  3313.  
  3314.  
  3315.  
  3316. local ox=-181;
  3317. local oy=0;
  3318.  
  3319. local ofx=-181;
  3320. local ofy=0;
  3321.  
  3322. local function RandCoin()
  3323.     local randcoin = math.random(0,1);
  3324.     if(randcoin == 1) then return 1; else return -1; end
  3325. end
  3326.  
  3327. local function GetX()
  3328.     if gInt("HVH", "Anti-Aim", "Pitch") == 0 then
  3329.     ox = fa.p
  3330.     else
  3331.         if gBool("HVH", "Anti-Aim", "Negitive Pitch") then
  3332.         ox = -gInt("HVH", "Anti-Aim", "Pitch")
  3333.         else
  3334.         ox = gInt("HVH", "Anti-Aim", "Pitch")
  3335.         end
  3336.     end
  3337. end
  3338.  
  3339. local function GetFX()
  3340.     if gInt("HVH", "FakeAngles", "Pitch") == 0 then
  3341.     ofx = fa.p
  3342.     else
  3343.         if gBool("HVH", "FakeAngles", "Negitive Pitch") then
  3344.         ofx = -gInt("HVH", "FakeAngles", "Pitch")
  3345.         else
  3346.         ofx = gInt("HVH", "FakeAngles", "Pitch")
  3347.         end
  3348.     end
  3349. end
  3350.  
  3351. local function GetClosest()
  3352.     local ddists = {};
  3353.    
  3354.     local closest;
  3355.        
  3356.     for k,v in next, player.GetAll() do
  3357.     if( !v:Alive() || v == me || gBool("Aimbot", "Target", "Ignore Friends") && (v:GetFriendStatus() ~= "friend" || ! table.HasValue(Friends, v) )) then continue; end
  3358.         ddists[#ddists + 1] = { vm.Distance( em.GetPos(v), em.GetPos(me) ), v };
  3359.     end
  3360.        
  3361.     table.sort(ddists, function(a, b)
  3362.         return(a[1] < b[1]);
  3363.     end);
  3364.        
  3365.     closest = ddists[1] && ddists[1][2] || nil;
  3366.    
  3367.     if(!closest) then return fa.y; end
  3368.    
  3369.     local pos = em.GetPos(closest) + (em.GetVelocity(closest) * (me:Ping()/1000))+ (em.GetVelocity(closest) * (closest:Ping()/1000));
  3370.    
  3371.     local pos = vm.Angle(pos - em.EyePos(me));
  3372.    
  3373.     return( pos.y );
  3374. end
  3375. local jit_AngY = 0
  3376. local jit_yawC = false
  3377.  
  3378. local jit_AngFY = 0
  3379. local jit_yawFC = false
  3380.  
  3381. local function GetY()
  3382.     local getclose = 0
  3383.     if gInt("HVH", "Anti-Aim", "Pitch") > 90 then
  3384.         if (jit_AngY > 5) then
  3385.             jit_yawC = true
  3386.         elseif (jit_AngY < -5) then
  3387.             jit_yawC = false
  3388.         end
  3389.         if (jit_yawC == true) then
  3390.             jit_AngY = jit_AngY - 0.3
  3391.         elseif (jit_yawC == false) then
  3392.             jit_AngY = jit_AngY + 0.3
  3393.         end
  3394.     else
  3395.         jit_AngY = 0
  3396.         jit_yawC = false
  3397.     end
  3398.         if gBool("HVH", "Anti-Aim", "Aim At Closest") then
  3399.         getclose = GetClosest() - fa.y
  3400.         if gBool("HVH", "Anti-Aim", "Static") then
  3401.             getclose = GetClosest()
  3402.         end
  3403.     end
  3404.     if gBool("HVH", "Anti-Aim", "Static") then
  3405.     if gInt("HVH", "Anti-Aim", "Spin") ~= 0 then
  3406.     oy = math.fmod(CurTime() / .1 * gInt("HVH", "Anti-Aim", "Spin") * 6, 360) + getclose
  3407.     else
  3408.     oy = gInt("HVH", "Anti-Aim", "Yaw") + jit_AngY + getclose
  3409.     end
  3410.     else
  3411.     if gInt("HVH", "Anti-Aim", "Spin") ~= 0 then
  3412.     oy = fa.y + math.fmod(CurTime() / .1 * gInt("HVH", "Anti-Aim", "Spin") * 6, 360) + getclose
  3413.     else
  3414.     oy = fa.y + gInt("HVH", "Anti-Aim", "Yaw") + jit_AngY + getclose
  3415.     end
  3416.     end
  3417. end
  3418.  
  3419. local function GetFY()
  3420.     local getclosef = 0
  3421.     if gInt("HVH", "FakeAngles", "Pitch") > 90 then
  3422.         if (jit_AngFY > 5) then
  3423.             jit_yawFC = true
  3424.         elseif (jit_AngFY < -5) then
  3425.             jit_yawFC = false
  3426.         end
  3427.         if (jit_yawFC == true) then
  3428.             jit_AngFY = jit_AngFY - 0.3
  3429.         elseif (jit_yawFC == false) then
  3430.             jit_AngFY = jit_AngFY + 0.3
  3431.         end
  3432.     else
  3433.         jit_AngFY = 0
  3434.         jit_yawFC = false
  3435.     end
  3436.     if gBool("HVH", "FakeAngles", "Aim At Closest") then
  3437.         getclosef = GetClosest() - fa.y
  3438.         if gBool("HVH", "FakeAngles", "Static") then
  3439.             getclosef = GetClosest()
  3440.         end
  3441.     end
  3442.  
  3443.     if gBool("HVH", "FakeAngles", "Static") then
  3444.     if gInt("HVH", "FakeAngles", "Spin") ~= 0 then
  3445.     ofy = math.fmod(CurTime() / .1 * gInt("HVH", "FakeAngles", "Spin") * 6, 360) + getclosef
  3446.     else
  3447.     ofy = gInt("HVH", "FakeAngles", "Yaw") + jit_AngFY + getclosef
  3448.     end
  3449.     else
  3450.     if gInt("HVH", "FakeAngles", "Spin") ~= 0 then
  3451.     ofy = fa.y + math.fmod(CurTime() / .1 * gInt("HVH", "FakeAngles", "Spin") * 6, 360) + getclosef
  3452.     else
  3453.     ofy = fa.y + gInt("HVH", "FakeAngles", "Yaw") + jit_AngFY + getclosef
  3454.     end
  3455.     end
  3456. end
  3457.  
  3458. local plychange = {}
  3459. local plyadd = {}
  3460. for i = 1, game.MaxPlayers(), 1 do
  3461. plychange[i] = 0
  3462. plyadd[i] = 0
  3463. end
  3464. local function DoAAA(v)
  3465.     fake, oldvelo = fakelagPredict(v) || 1, em.GetVelocity(v)
  3466.  
  3467.     velos= em.GetVelocity(v)
  3468.     velos.z = 0
  3469.     ang = vm.Angle(velos);
  3470.     Hackers = util.JSONToTable(file.Read("hackerlistv2.txt", "DATA"))
  3471.     pl = v:EntIndex()
  3472.    
  3473.     if FaAng[pl][1] >= gInt("HVH", "Resolvers", "FA bullet amount") then
  3474.  
  3475.         FaAng[pl][3] = FaAng[pl][3] + 1
  3476.         if FaAng[pl][3] >= 5 then
  3477.             FaAng[pl][3] = 0
  3478.             if FaAng[pl][2] == 0 then
  3479.                 FaAng[pl][2] = 1
  3480.             elseif FaAng[pl][2] == 2 then
  3481.                 FaAng[pl][2] = 1
  3482.             else
  3483.                 FaAng[pl][2] = 2
  3484.             end
  3485.         end
  3486.         FaAng[pl][1] = 0
  3487.         fyawadd = (FaAng[pl][3] > 2) && (FaAng[pl][3] - 2) * -45 || FaAng[pl][3] * 45
  3488.         fpitdiff = (FaAng[pl][2] <= 1 && 89) || -89
  3489.     end
  3490.     fyawadd = (FaAng[pl][3] > 2) && (FaAng[pl][3] - 2) * -45 || FaAng[pl][3] * 45
  3491.     fpitdiff = (FaAng[pl][2] <= 1 && 89) || -89
  3492.    
  3493.     local EyeAng = em.EyeAngles(v)
  3494.             EyeAng = Angle(math.NormalizeAngle(EyeAng.p), math.NormalizeAngle(EyeAng.y), math.NormalizeAngle(EyeAng.r))
  3495.     if (v ~= me) && (v:SteamID() ~= "STEAM_0:0:35717190") then
  3496.         pe = tostring(v:EntIndex())
  3497.        
  3498.         local plyang
  3499.         if plychange[pe] && plychange[pe] then
  3500.         if plychange[pe] ~= EyeAng.y then
  3501.             plyadd[pe] =  0
  3502.             plychange[pe] = 0
  3503.         else
  3504.             plyadd[pe] = 0
  3505.         end
  3506.         else
  3507.             plyadd[pe] =0
  3508.             plychange[pe] = 0
  3509.         end
  3510.         plyadd[pe] = plyadd[pe] * fake
  3511.         if !gBool("HVH", "Resolvers", "Fake-angles resolver") then
  3512.             FaAng[pl][1] = 0
  3513.             FaAng[pl][2] = 0
  3514.             FaAng[pl][3] = 0
  3515.         end
  3516.         if math.abs(EyeAng.r) > 170 && gBool("HVH", "Resolvers", "Anti-aim resolver") then
  3517.             if (EyeAng.p > 0.001) then
  3518.                 if !isHack then
  3519.                     HackTbl = {v:GetName(), v:SteamID(), "Invalid Angles p."..EyeAng.p..", r."..EyeAng.r}
  3520.                     table.insert(Hackers, HackTbl)
  3521.                     file.Write("hackerlistv3.txt", util.TableToJSON(Hackers))
  3522.                 end
  3523.                
  3524.                 v:SetRenderAngles(Angle(0, EyeAng.y - 120 + plyadd[pe]+ fyawadd , 0))
  3525.                
  3526.                 em.SetPoseParameter(v, "aim_pitch",  49)
  3527.                 v:InvalidateBoneCache()
  3528.             elseif (EyeAng.p < -0.021) then
  3529.                     if !isHack then
  3530.                     HackTbl = {v:GetName(), v:SteamID(), "Invalid Angles p."..EyeAng.p..", r."..EyeAng.r}
  3531.                     table.insert(Hackers, HackTbl)
  3532.                     file.Write("hackerlistv3.txt", util.TableToJSON(Hackers))
  3533.                 end
  3534.                 v:SetRenderAngles(Angle(0, EyeAng.y - 120 + plyadd[pe]+ fyawadd , 0))
  3535.                
  3536.                 em.SetPoseParameter(v, "aim_pitch", -89)
  3537.                 em.SetPoseParameter(v, "aim_yaw", 0)
  3538.                 v:InvalidateBoneCache()
  3539.             elseif ((EyeAng.p <= 0.001) && (EyeAng.p >= -0.011)) then
  3540.                 if !isHack then
  3541.                     HackTbl = {v:GetName(), v:SteamID(), "Invalid Angles p."..EyeAng.p..", r."..EyeAng.r}
  3542.                     table.insert(Hackers, HackTbl)
  3543.                     file.Write("hackerlistv3.txt", util.TableToJSON(Hackers))
  3544.                 end
  3545.                 v:SetRenderAngles(Angle(0, EyeAng.y - 180 + plyadd[pe]+ fyawadd , 0))
  3546.                
  3547.                 em.SetPoseParameter(v, "aim_pitch",89)
  3548.                 v:InvalidateBoneCache()
  3549.             end
  3550.             forw =math.cos(math.rad(((math.NormalizeAngle(EyeAng.y)-((math.NormalizeAngle(ang.y)-180)+ fyawadd)))))
  3551.             sidew = math.cos(math.rad(((math.NormalizeAngle(EyeAng.y)-((math.NormalizeAngle(ang.y)-90)+ fyawadd)))))
  3552.             em.SetPoseParameter(v, "move_x", forw)
  3553.             em.SetPoseParameter(v, "move_y", sidew)
  3554.         elseif math.abs(EyeAng.p) > 179.9 && gBool("HVH", "Resolvers", "Anti-aim resolver") then
  3555.             if !isHack then
  3556.                     HackTbl = {v:GetName(), v:SteamID(), "Invalid Angles p."..EyeAng.p..", r."..EyeAng.r}
  3557.                     table.insert(Hackers, HackTbl)
  3558.                     file.Write("hackerlistv3.txt", util.TableToJSON(Hackers))
  3559.                 end
  3560.             v:SetRenderAngles(Angle(0, EyeAng.y + plyadd[pe]+ fyawadd , 0))
  3561.            
  3562.             em.SetPoseParameter(v, "aim_pitch", 42)
  3563.             forw =math.cos(math.rad(((math.NormalizeAngle(EyeAng.y)-((math.NormalizeAngle(ang.y))+ fyawadd)))))
  3564.             sidew = math.cos(math.rad(((math.NormalizeAngle(EyeAng.y)-((math.NormalizeAngle(ang.y)+40)+ fyawadd)))))
  3565.             em.SetPoseParameter(v, "move_x", forw)
  3566.             em.SetPoseParameter(v, "move_y", sidew)
  3567.             v:InvalidateBoneCache()
  3568.         elseif (EyeAng.p > 40) && gBool("HVH", "Resolvers", "Anti-aim resolver") then
  3569.             if !isHack then
  3570.                     HackTbl = {v:GetName(), v:SteamID(), "Invalid Angles p."..EyeAng.p..", r."..EyeAng.r}
  3571.                     table.insert(Hackers, HackTbl)
  3572.                     file.Write("hackerlistv3.txt", util.TableToJSON(Hackers))
  3573.                 end
  3574.             v:SetRenderAngles(Angle(0, EyeAng.y + plyadd[pe]+ fyawadd , 0))
  3575.            
  3576.             em.SetPoseParameter(v, "aim_pitch", 22)
  3577.             forw =math.cos(math.rad(((math.NormalizeAngle(EyeAng.y)-((math.NormalizeAngle(ang.y))+ fyawadd)))))
  3578.             sidew = math.cos(math.rad(((math.NormalizeAngle(EyeAng.y)-((math.NormalizeAngle(ang.y)+30)+ fyawadd)))))
  3579.             em.SetPoseParameter(v, "move_x", forw)
  3580.             em.SetPoseParameter(v, "move_y", sidew)
  3581.             v:InvalidateBoneCache()
  3582.         elseif (EyeAng.p < -50) && gBool("HVH", "Resolvers", "Anti-aim resolver") then
  3583.             if !isHack then
  3584.                     HackTbl = {v:GetName(), v:SteamID(), "Invalid Angles p."..EyeAng.p..", r."..EyeAng.r}
  3585.                     table.insert(Hackers, HackTbl)
  3586.                     file.Write("hackerlistv3.txt", util.TableToJSON(Hackers))
  3587.                 end
  3588.             v:SetRenderAngles(Angle(0, EyeAng.y + plyadd[pe]+ fyawadd , 0))
  3589.            
  3590.             em.SetPoseParameter(v, "aim_pitch", -59)
  3591.             forw =math.cos(math.rad(((math.NormalizeAngle(EyeAng.y)-((math.NormalizeAngle(ang.y))+ fyawadd)))))
  3592.             sidew = math.cos(math.rad(((math.NormalizeAngle(EyeAng.y)-((math.NormalizeAngle(ang.y)+20)+ fyawadd)))))
  3593.            
  3594.             em.SetPoseParameter(v, "move_x", forw)
  3595.             em.SetPoseParameter(v, "move_y", sidew)
  3596.             v:InvalidateBoneCache()
  3597.         elseif FaAng[pl][1] ~= 0 && gBool("HVH", "Resolvers", "Fake-angles resolver") then
  3598.             if !isHack then
  3599.                 HackTbl = {v:GetName(), v:SteamID(), "Possible Fake-angles"}
  3600.                 table.insert(Hackers, HackTbl)
  3601.                 file.Write("hackerlistv3.txt", util.TableToJSON(Hackers))
  3602.             end
  3603.             v:SetRenderAngles(Angle(0, EyeAng.y + plyadd[pe]+ fyawadd , 0))
  3604.             em.SetPoseParameter(v, "aim_pitch", EyeAng.p)
  3605.             forw =math.cos(math.rad(((math.NormalizeAngle(EyeAng.y)-((math.NormalizeAngle(ang.y))+ fyawadd)))))
  3606.             sidew = math.cos(math.rad(((math.NormalizeAngle(EyeAng.y)-((math.NormalizeAngle(ang.y)-60)+ fyawadd)))))
  3607.             em.SetPoseParameter(v, "move_x", forw)
  3608.             em.SetPoseParameter(v, "move_y", sidew)
  3609.             v:InvalidateBoneCache()
  3610.         else
  3611.         --v:SetRenderAngles(Angle(0, EyeAng.y + plyadd[pe] , 0))
  3612.         end
  3613.        
  3614.         plyang = em.EyeAngles(v)
  3615.         v:InvalidateBoneCache()
  3616.     end
  3617. end
  3618.  
  3619. hook.Add("RenderScreenspaceEffects", "HackRSE", function()
  3620.  
  3621.     for k,v in next, player.GetAll() do
  3622.         if(!em.IsValid(v) || em.Health(v) < 0 || !v:Alive() || v:GetObserverMode() > 0  || v == me)  then continue; end
  3623.         if(!Filter(v)) then continue; end
  3624.         if gBool("Visuals", "ESP", "Enabled") then
  3625.         Chams(v);
  3626.         end
  3627.         local pl = v:EntIndex()
  3628.         local teastman = em.GetVelocity(v)
  3629.             teastman.z = 0
  3630.             teastman = teastman:Angle()
  3631.             teastman:Normalize()
  3632.                 if math.NormalizeAngle(teastman.y) ~=  math.NormalizeAngle(testturn[pl].y) then
  3633.         turn[pl] =  math.NormalizeAngle(teastman.y) -  math.NormalizeAngle(testturn[pl].y)
  3634.         testturn[pl] =  teastman
  3635.         elseif math.NormalizeAngle(teastman.y) ==  math.NormalizeAngle(testturn[pl].y) then
  3636.             turn[pl] = turn[pl]
  3637.             testturn[pl] = teastman
  3638.         else
  3639.         end
  3640.     end
  3641.     if gBool("Misc", "Spam", "Act Spam") then
  3642.         RunConsoleCommand("act", gOption("Misc", "Spam", "Act Type"))
  3643.     end
  3644. end);
  3645.  
  3646.  
  3647.  
  3648.  
  3649. local function PredictPos(v, vec)
  3650.  
  3651.     local tgtVelo = Vector(0, 0, 0)
  3652.     local plyVelo = Vector(0, 0, 0)
  3653.     if me:Alive() then
  3654.          plyVelo = (em.GetVelocity(me))
  3655.          if me:GetActiveWeapon():GetClass() == "weapon_crossbow" then
  3656.          plyVelo = em.GetVelocity(me) + (em.GetVelocity(me)*((me:Ping() * (92/78))/1000))
  3657.          end
  3658.          plyVelo = plyVelo * engine.TickInterval()
  3659.         if !me:IsOnGround() && me:GetMoveType() ~= MOVETYPE_NOCLIP then
  3660.             plyVelo.z  = (0.5 * -GetConVarNumber("sv_gravity") * math.pow(engine.TickInterval(),2) + em.GetVelocity(me).z * engine.TickInterval())
  3661.             if me:GetActiveWeapon():GetClass() == "weapon_crossbow" then
  3662.                 plyVelo.z  = (0.5 * -GetConVarNumber("sv_gravity") * math.pow(engine.TickInterval() + (engine.TickInterval() *((me:Ping() * (92/78))/1000)),2) + me:GetVelocity().z * (engine.TickInterval() + (engine.TickInterval() *((me:Ping() * (92/78))/1000))))
  3663.             end
  3664.         end
  3665.     else
  3666.         plyVelo = Vector(0, 0, 0)
  3667.     end
  3668.    
  3669.  
  3670.     if v:Alive() && v ~= nil && me:GetActiveWeapon():GetClass() ~= "weapon_crossbow" then
  3671.         if !string.find(string.lower(GAMEMODE.Name), "prop") then
  3672.             tgtVelo = (em.GetVelocity(v) * engine.TickInterval())
  3673.             if !v:IsOnGround() && v:GetMoveType() ~= MOVETYPE_NOCLIP then
  3674.                 tgtVelo.z  = (0.5 * -GetConVarNumber("sv_gravity") * math.pow(engine.TickInterval(),2) + em.GetVelocity(v).z * engine.TickInterval())
  3675.             end
  3676.             pvtr = {
  3677.                 start = em.GetPos(v)+ Vector(0,0,0.1),
  3678.                 endpos =  em.GetPos(v)+tgtVelo + Vector(0,0,0.1),
  3679.                 maxs = em.OBBMaxs(v),
  3680.                 mins = em.OBBMins(v),
  3681.                 filter = v
  3682.             }
  3683.             pvtres = util.TraceHull(pvtr)
  3684.             return (((pvtres.HitPos + (Hitbox(v) - em.GetPos(v))) - Vector(0,0,0.1))) - plyVelo
  3685.         else
  3686.             for _,ent in next, ents.GetAll() do
  3687.                 if ent:GetClass() == "ph_prop" && (ent:GetOwner() == v || ent:GetParent() == v) && v:Alive() then
  3688.                     tgtVelo = (em.GetVelocity(ent) * engine.TickInterval())
  3689.                     if !v:IsOnGround() && v:GetMoveType() ~= MOVETYPE_NOCLIP then
  3690.                         tgtVelo.z  = (0.5 * -GetConVarNumber("sv_gravity") * math.pow(engine.TickInterval(),2) + em.GetVelocity(ent).z * engine.TickInterval())
  3691.                     end
  3692.                     pvtr = {
  3693.                         start = em.GetPos(ent)+em.OBBCenter(ent),
  3694.                         endpos =  em.GetPos(ent)+em.OBBCenter(ent)+ tgtVelo,
  3695.                         maxs = em.OBBMaxs(v),
  3696.                         mins = em.OBBMins(v),
  3697.                         filter = {me, ent, v},
  3698.                     }
  3699.                     pvtres = util.TraceHull(pvtr)
  3700.  
  3701.                     return  (pvtres.HitPos) - plyVelo
  3702.                 end
  3703.             end
  3704.         end
  3705.             tgtVelo = (em.GetVelocity(v) * engine.TickInterval())
  3706.             if !v:IsOnGround() && v:GetMoveType() ~= MOVETYPE_NOCLIP then
  3707.                 tgtVelo.z  = (0.5 * -GetConVarNumber("sv_gravity") * math.pow(engine.TickInterval(),2) + em.GetVelocity(v).z * engine.TickInterval())
  3708.             end
  3709.             pvtr = {
  3710.                 start = em.GetPos(v),
  3711.                 endpos =  em.GetPos(v)+tgtVelo + Vector(0,0,0.1),
  3712.                 maxs = em.OBBMaxs(v),
  3713.                 mins = em.OBBMins(v),
  3714.                 filter = v
  3715.             }
  3716.             pvtres = util.TraceHull(pvtr)
  3717.  
  3718.         return (((pvtres.HitPos + (Hitbox(v) - em.GetPos(v))) - Vector(0,0,0.1))) - plyVelo
  3719.  
  3720.     elseif v:Alive() && v ~= nil && me:GetActiveWeapon():GetClass() == "weapon_crossbow" then
  3721.         trgpos = crossbowcheck(v, false)
  3722.         return crossbowcheck(v, true, true, 25 , true, trgpos) + (Hitbox(v) - v:GetPos()) - plyVelo
  3723.     end
  3724.    
  3725. end
  3726.  
  3727. hook.Add("PreDrawOpaqueRenderables", "HackPDOR", function()
  3728.     for k,v in next, player.GetAll() do
  3729.         if(!em.IsValid(v) || em.Health(v) < 0 || !v:Alive() || v:GetObserverMode() > 0  || v == me) then continue; end
  3730.         if(!Filter(v)) then continue; end
  3731.         DoAAA(v)
  3732.     end
  3733. end)
  3734.  
  3735.  
  3736.  
  3737. local myname = me:GetName()
  3738. local randply = player.GetAll()[math.random(#player.GetAll())]
  3739.  
  3740. local localname = false
  3741. canjump = false
  3742. local jumpen = true
  3743. local eyeposd = em.EyePos(me)
  3744. local baseposd = em.GetPos(me)
  3745. local eyediff = eyeposd.z - baseposd.z
  3746. local minsd = em.OBBMins(me)
  3747. local maxsd = em.OBBMaxs(me) - Vector(0 , 0,em.OBBMaxs(me).z)
  3748. local Switchy = true
  3749. local Fakie = 0
  3750. local wasair = false
  3751. local function bhop(ucmd)
  3752.     if cm.CommandNumber(ucmd) ~= 0 then
  3753.         fakelag()
  3754.         if(gBool("HVH", "FakeLag", "Enabled")) then
  3755.             if(fakeLagSwitch) then
  3756.                 Switchy = true
  3757.             else
  3758.                 Switchy = false
  3759.                 bSendPacket = false
  3760.             end
  3761.         else
  3762.             if(Fakie > 1) then
  3763.                 Switchy = true
  3764.                 Fakie = 0;
  3765.             else
  3766.                 Switchy = false
  3767.             end
  3768.             if (Switchy) then
  3769.                
  3770.             else
  3771.                 Fakie = Fakie + 1
  3772.                 bSendPacket = false
  3773.             end
  3774.         end
  3775.         wep = me:GetActiveWeapon()
  3776.         if IsValid(wep) then
  3777.             if wep:GetClass() == "weapon_zm_carry" then
  3778.                 bSendPacket = true
  3779.             end
  3780.         end
  3781.     else
  3782.         Switchy = false
  3783.     end
  3784.  
  3785.     --[[if cm.KeyDown(ucmd, IN_DUCK) then
  3786.         ducktr = {
  3787.         start = checkfovpos,
  3788.         endpos = checkfovpos - Vector(0,0,eyediff) + (me:GetVelocity()*engine.TickInterval()),
  3789.         maxs = me:OBBMaxs(),
  3790.         mins = me:OBBMins(),
  3791.         filter = me
  3792.         }
  3793.         dtres = util.TraceHull(ducktr)
  3794.         if !dtres.Hit && !me:IsOnGround() then
  3795.             if Switchy && cm.CommandNumber(ucmd) ~= 0 then
  3796.                 cm.SetButtons(ucmd, cm.GetButtons(ucmd), IN_DUCK)
  3797.             elseif !Switchy && cm.CommandNumber(ucmd) ~= 0 then
  3798.                 cm.RemoveKey(ucmd, IN_DUCK)
  3799.             end
  3800.             wasair = true
  3801.         elseif dtres.Hit && wasair && cm.CommandNumber(ucmd) ~= 0 then
  3802.             cm.RemoveKey(ucmd, IN_DUCK)
  3803.             bSendPacket = false
  3804.         end
  3805.  
  3806.     else
  3807.        
  3808.         wasair = false
  3809.     end]]
  3810.    
  3811.  
  3812.     randply = player.GetAll()[math.random(#player.GetAll())]
  3813.     local scrambledName = string.sub(randply:Nick(), 1, 1)..randply:Nick()
  3814.     if gBool("Misc", "BunnyHop", "Enabled") && ucmd:CommandNumber() ~= 0 && cm.KeyDown(ucmd, IN_JUMP) && me:GetObserverMode() == 0 && me:Alive() && !ChatOpen && !PSBox then
  3815.         local myVelo = Vector(0, 0, 0)
  3816.    
  3817.          myVelo = (em.GetVelocity(me))
  3818.          if me:Alive() && me:GetActiveWeapon()[3] then
  3819.          if me:GetActiveWeapon():GetClass() == "weapon_crossbow" then
  3820.                 myVelo = em.GetVelocity(me) + (em.GetVelocity(me)*((me:Ping() * (92/78))/1000))
  3821.             end
  3822.          end
  3823.          myVelo = myVelo * (engine.TickInterval()*5)
  3824.         if !me:IsOnGround() && me:GetMoveType() ~= MOVETYPE_NOCLIP then
  3825.             myVelo.z  = (0.5 * -GetConVarNumber("sv_gravity") * math.pow((engine.TickInterval()*5),2) + em.GetVelocity(me).z * (engine.TickInterval()*5))
  3826.         end
  3827.        
  3828.         if me:IsOnGround() then
  3829.         cm.SetButtons(ucmd, cm.GetButtons(ucmd), IN_JUMP)
  3830.         canjump = true
  3831.         elseif !me:IsOnGround() && me:WaterLevel() < 2 && me:GetMoveType() ~= MOVETYPE_LADDER then
  3832.             cm.RemoveKey(ucmd, IN_JUMP)
  3833.             canjump = true
  3834.         end
  3835.     end
  3836.         if gText("Misc", "Name Changer", "Custom Name") ~= "" then
  3837.             _fhook_changename("​"..gText("Misc", "Name Changer", "Custom Name"))
  3838.             localname = true
  3839.         else
  3840.             if gBool("Misc", "Name Changer", "Enabled") then
  3841.                 localname = true
  3842.                    
  3843.                 if randply:IsValid() && randply ~= me then
  3844.                     local nametable = string.Explode( "", randply:GetName() )
  3845.                     if #nametable > 30 then
  3846.                         return false
  3847.                     end
  3848.                     if (gBool("Misc", "Name Changer", "Ignore Friends")) && (randply:GetFriendStatus() == "friend" || table.HasValue(Friends, randply)) then
  3849.                         return false
  3850.                     end
  3851.                     if (gBool("Misc", "Name Changer", "Ignore Admins") && table.HasValue(Admin, randply)) then
  3852.                         return false
  3853.                     end
  3854.                     if (gBool("Misc", "Name Changer", "Team Only") && me:Team() ~= randply:Team()) then
  3855.                         return false
  3856.                     end
  3857.                     if randply:GetName() == "unconnected" then
  3858.                     return false
  3859.                     end
  3860.                         table.insert(nametable, math.random(1, #nametable), "​" )
  3861.                     namefin = string.Implode("", nametable)
  3862.                     local noname = string.Replace( me:GetName(), "​", "" )
  3863.                     if string.find(string.lower(GAMEMODE.Name), "darkrp") then
  3864.                     RunConsoleCommand("say", "/name "..scrambledName.."​")
  3865.                     end
  3866.                     if ucmd:CommandNumber() ~= 0 then
  3867.                         if string.find(string.lower(GAMEMODE.Name), "terror")  then
  3868.                             if GetConVarNumber("ttt_namechange_kick") ~= 0 then
  3869.                                 if GetRoundState() == 3 then
  3870.                                     _fhook_changename(me:GetName())
  3871.                                 elseif noname ~= randply:GetName() then
  3872.                                     _fhook_changename(namefin)
  3873.                                 end
  3874.                             else
  3875.                                 _fhook_changename(namefin)
  3876.                             end
  3877.                         else
  3878.                             if noname ~= randply:GetName() then
  3879.                                 _fhook_changename(namefin)
  3880.                             else
  3881.                                 _fhook_changename(me:GetName())
  3882.                             end
  3883.                         end
  3884.                     end
  3885.                 else
  3886.                     _fhook_changename(me:GetName())
  3887.                 end
  3888.             else
  3889.                 if localname == true then
  3890.                 _fhook_changename(myname)
  3891.                 localname = false
  3892.                 end
  3893.                 myname = me:GetName()
  3894.             end
  3895.         end
  3896.     local test = "KEY_"..string.upper(input.LookupBinding("voicerecord"))
  3897.     local gotit
  3898.     for i=0, #buttons, 1 do
  3899.         if buttons[i][2] == test then
  3900.             gotit = buttons[i][1]
  3901.         end
  3902.     end
  3903.     gotit2 = 0
  3904.     for i = 107, 113 do
  3905.         if input.LookupKeyBinding(i) == "+voicerecord" then
  3906.             gotit2 = i
  3907.         end
  3908.     end
  3909.     if (gotit && ((input.IsKeyDown(gotit)) || input.IsMouseDown(gotit2)) && !ChatOpen && !PSBox ) || gBool("Misc", "Spam", "Voice Spam") then
  3910.         if voicechat > 3 then
  3911.             voicechat = 0
  3912.             RunConsoleCommand("+voicerecord")
  3913.         else   
  3914.             voicechat = voicechat + 1
  3915.             RunConsoleCommand("-voicerecord")
  3916.         end
  3917.        
  3918.     else
  3919.         RunConsoleCommand("-voicerecord")
  3920.        
  3921.     end
  3922.     if gBool("Visuals", "Misc", "No Sky") && !screengrab then
  3923.         GetConVar("r_3dsky"):SetValue(0)
  3924.         GetConVar("r_drawskybox"):SetValue(0)
  3925.         GetConVar("gl_clear"):SetValue(1)
  3926.     else
  3927.         GetConVar("r_3dsky"):SetValue(1)
  3928.         GetConVar("r_drawskybox"):SetValue(1)
  3929.         GetConVar("gl_clear"):SetValue(1)
  3930.     end
  3931.     if (gBool("Visuals", "Misc", "Fullbright") || fullbrightstart) && !screengrab then
  3932.     GetConVar("mat_fullbright"):SetValue(1)
  3933.     fullbrightstart = false
  3934.     else
  3935.     GetConVar("mat_fullbright"):SetValue(0)
  3936.     end
  3937.  
  3938.  
  3939.  
  3940.  
  3941. end
  3942.  
  3943. propmin, propmax = Vector( -5, -5, -5 ), Vector(5,5,5)
  3944.  
  3945. local function aimer(ucmd)
  3946.     local wep = me:GetActiveWeapon()
  3947.     gettarget();
  3948.     if ChatOpen || PSBox then
  3949.         return false
  3950.     end
  3951.     if IsValid(wep) && cm.CommandNumber(ucmd) ~= 0 then
  3952.         if wep:Clip1() == 0 && me:GetActiveWeapon():GetMaxClip1() > 0 && wepswitch == 0 then
  3953.             cm.SetButtons(ucmd, bit.bor( cm.GetButtons(ucmd), 8192 ) );
  3954.             wepswitch = 1
  3955.         elseif wepswitch == 1 then
  3956.             cm.RemoveKey(ucmd, IN_RELOAD)
  3957.             wepswitch = 2
  3958.         elseif wep:Clip1() > 0 then
  3959.             wepswitch = 0
  3960.         end
  3961.     end
  3962.     if IsValid(wep) && wep:GetClass() == "weapon_zm_carry" then
  3963.             if input.IsMouseDown(MOUSE_RIGHT) &&  cm.CommandNumber(ucmd) ~= 0  then
  3964.             magtr = {
  3965.                 start = me:EyePos(),
  3966.                 endpos = me:EyePos() + (am.Forward(fa)*200),
  3967.                 mask = MASK_SOLID,
  3968.                 filter = me,
  3969.             };
  3970.             magres = util.TraceLine(magtr)
  3971.             if IsValid(magres.Entity) then
  3972.                 if (string.find(magres.Entity:GetClass(), "prop")||string.find(magres.Entity:GetClass(), "phys")) && magres.Entity && magres.Entity:GetOwner() == me then
  3973.                     propmin, propmax =magres.Entity:OBBMins(), magres.Entity:OBBMaxs()
  3974.                 end
  3975.             end
  3976.             end
  3977.         return
  3978.     end
  3979.     if( !wep:IsValid() || !gBool("Aimbot", "Aimbot", "Enabled") || !me:Alive()) then return; end
  3980.     aa = false;
  3981.     toggle = false
  3982.     if aimtarget && aimtarget:Alive() && CanFov(fa, me:GetShootPos(), Hitbox(aimtarget)) && (gKey("Aimbot", "Aimbot", "Key Toggle") || gBool("Aimbot", "Aimbot", "Autosnap")) && me:GetObserverMode() == 0 && ChatOpen == false && me ~= nil then
  3983.         local pos = PredictPos(aimtarget,  (Hitbox(aimtarget))) - em.EyePos(me)
  3984.         local ang = vm.Angle(PredictSpread(ucmd, vm.Angle(pos)));
  3985.         if gBool("Aimbot", "Aimbot", "Untrusted Angles") then
  3986.             ang = Angle(180 - ang.p, ang.y+180, 0)
  3987.         end
  3988.         if (gBool("Aimbot", "Aimbot", "pSilent")) then
  3989.         if (Switchy) then
  3990.         aa = false
  3991.             if (gBool("Aimbot", "Aimbot", "pSilent") && WeaponCanFire() && (cm.CommandNumber(ucmd) ~= 0)) then
  3992.            
  3993.             cm.SetViewAngles(ucmd, ang);
  3994.        
  3995.             aa = false;
  3996.             if(gBool("Aimbot", "Aimbot", "Autofire")) then
  3997.                 Autofire(ucmd);
  3998.             end
  3999.             end
  4000.         end
  4001.         else
  4002.             if (cm.CommandNumber(ucmd) ~= 0) then
  4003.                 cm.SetViewAngles(ucmd, ang);
  4004.                 if !gBool("Aimbot", "Aimbot", "Silent") then
  4005.                     fa = vm.Angle(pos)
  4006.                 end
  4007.                 if(gBool("Aimbot", "Aimbot", "Autofire")) then
  4008.                 Autofire(ucmd);
  4009.             end
  4010.             end
  4011.             aa = false;
  4012.         end
  4013.         if (gBool("Aimbot", "Aimbot", "Silent")) || gBool("Aimbot", "Aimbot", "pSilent") then
  4014.         else
  4015.             if (cm.CommandNumber(ucmd) ~= 0) then
  4016.             fa = vm.Angle(pos)
  4017.             end
  4018.             if(gBool("Aimbot", "Aimbot", "Autofire")) then
  4019.                 Autofire(ucmd);
  4020.             end
  4021.         end
  4022.     end
  4023. end
  4024.  
  4025.  
  4026.  
  4027. local function walldetect()
  4028.    
  4029.     local memeMePlease = {};
  4030.     local EyePos = em.EyePos(me);
  4031.     for i = 0, 360, 3 do
  4032.         local trace = {
  4033.             start = EyePos,
  4034.             endpos = EyePos + am.Forward(Angle(0, i, 0)) * 20;
  4035.             mask = MASK_SHOT,
  4036.             filter = function(ent) return(!ent:IsPlayer()) end
  4037.         };
  4038.  
  4039.         local frac = util.TraceLine(trace).Fraction;
  4040.  
  4041.         if(!memeMePlease.y) then
  4042.             memeMePlease.f = frac;
  4043.             memeMePlease.y = i;
  4044.             continue;
  4045.         end
  4046.  
  4047.         if( memeMePlease.f > frac ) then
  4048.             memeMePlease.f = frac;
  4049.             memeMePlease.y = i;
  4050.         end
  4051.     end
  4052.  
  4053.     if(memeMePlease.f == 1) then return; end
  4054.     ofx = 89
  4055.     ofy = math.NormalizeAngle(memeMePlease.y)
  4056.    
  4057.     --[[local eye = em.EyePos(me);
  4058.     local tr = util.TraceLine({
  4059.         start = eye,
  4060.         endpos = (eye + (am.Forward(fa) * 10)),
  4061.         mask = MASK_VISIBLE,
  4062.         filter = me,
  4063.     });
  4064.     if(tr.Hit) then
  4065.         ox = -181;
  4066.         oy = -90;
  4067.     end]]
  4068. end
  4069. local switchF
  4070. propturn = 0
  4071. propthrow = false
  4072. proppitch = 1
  4073. propswitch = true
  4074. propswitch2 = 0
  4075. local function antiaimer(ucmd)
  4076.     local eye = em.EyePos(me);
  4077.     wep = me:GetActiveWeapon()
  4078.     local trace = ({
  4079.         start = eye,
  4080.         endpos = (eye + (am.Forward(fa) * 70)),
  4081.         mask = MASK_SHOT,
  4082.         filter = me,
  4083.     });
  4084.     local tr = util.TraceLine(trace)
  4085.     if IsValid(wep) then
  4086.         if (me:GetActiveWeapon():GetPrimaryAmmoType() < 0 && wm.GetNextPrimaryFire(wep) > servertime) then
  4087.             return
  4088.         elseif  wep:GetClass() == "weapon_zm_carry" then
  4089.             if (cm.CommandNumber(ucmd) ~= 0 ) then
  4090.                 if gKey("Aimbot", "Aimbot", "Key Toggle") && !propswitch && propturn == 0 && propswitch2 == 0 then
  4091.                     magtr = {
  4092.                 start = me:EyePos(),
  4093.                 endpos = me:EyePos() + (am.Forward(fa)*200),
  4094.                 mask = MASK_SOLID,
  4095.                 filter = me,
  4096.             };
  4097.             magres = util.TraceLine(magtr)
  4098.             if IsValid(magres.Entity) then
  4099.                 if (string.find(magres.Entity:GetClass(), "prop")||string.find(magres.Entity:GetClass(), "phys")) && magres.Entity && magres.Entity:GetOwner() == me then
  4100.                     propmin, propmax =magres.Entity:OBBMins(), magres.Entity:OBBMaxs()
  4101.                 end
  4102.             end
  4103.             propthrow = true
  4104.             propswitch = true
  4105.         elseif gKey("Aimbot", "Aimbot", "Key Toggle") && !propswitch && propturn == 135 then
  4106.             propmin, propmax = Vector( -5, -5, -5 ), Vector(5,5,5)
  4107.             propthrow = false
  4108.             propturn = 45
  4109.             proppitch = 1
  4110.             propswitch = true
  4111.             propswitch2 = propswitch2 +1
  4112.         elseif  !gKey("Aimbot", "Aimbot", "Key Toggle") && propswitch then
  4113.             propswitch = false
  4114.  
  4115.         end
  4116.         if propswitch2 >= 1 && propswitch2 <= 15 then
  4117.             propswitch2  = propswitch2 +1
  4118.         elseif propswitch2 >= 15 then
  4119.             propswitch2 = 0
  4120.             propturn = 0
  4121.         end
  4122.         if propthrow && propturn ~= 135 then
  4123.             propturn = math.Clamp(propturn + 10, 0, 135)
  4124.             proppitch = math.Clamp(proppitch - 0.1, -0.5, 1)
  4125.         end
  4126.         bSendPacket = true
  4127.  
  4128.             --[[
  4129.             pitchtest = math.rad(fa.p)
  4130.                     pitchtest2 = math.rad(fa.p)
  4131.                     math.NormalizeAngle(pitchtest)
  4132.                     math.NormalizeAngle(pitchtest2)
  4133.                     newpPitch2 = math.abs(math.cos(pitchtest) * (propturn/135))
  4134.                     newpYaw = math.cos(pitchtest2)
  4135.                         ]]
  4136.  
  4137.             --cm.SetViewAngles(ucmd, Angle((fa.p/2) * -newpPitch2, fa.y + propturn - (45 * (1-newpPitch2)), 0))
  4138.        
  4139.  
  4140.             cm.SetViewAngles(ucmd, Angle(fa.p * proppitch, fa.y + propturn, 0))
  4141.         elseif gBool("Misc", "Thirdperson", "Enabled") then
  4142.             cm.SetViewAngles(ucmd, Angle(fa.p * proppitch, fa.y + propturn, 0))
  4143.         end
  4144.             return
  4145.         elseif wep:GetClass() ~= "weapon_zm_carry" then
  4146.             propthrow = false
  4147.             propturn = 0
  4148.             proppitch = 1
  4149.         end
  4150.     end
  4151.     if( cm.KeyDown(ucmd, 1) || me:GetObserverMode() > 0 || input.WasKeyPressed(KEY_T) || cm.KeyDown(ucmd, 32) || !me:Alive() || me:WaterLevel() >= 2 || me:GetMoveType() == MOVETYPE_LADDER || me:GetMoveType() == MOVETYPE_NOCLIP || aa || !gBool("HVH", "Anti-Aim", "Enabled")) then
  4152.     else
  4153.    
  4154.    
  4155.     if tr.Entity:IsValid() then
  4156.         if tr.Entity:GetClass() == "prop_ragdoll" then
  4157.             return
  4158.         end
  4159.     end
  4160.     --walldetect();
  4161.         if (cm.CommandNumber(ucmd) ~= 0 ) then
  4162.             GetX();
  4163.             GetY();
  4164.             GetFX();
  4165.             GetFY();
  4166.             if(gBool("HVH", "FakeAngles", "Enabled")) then
  4167.                 if (Switchy) then
  4168.                     cm.SetViewAngles(ucmd, Angle(ox, oy, 0));
  4169.                 else
  4170.                     cm.SetViewAngles(ucmd, Angle(ofx, ofy, 0))
  4171.                 end
  4172.             else
  4173.                 cm.SetViewAngles(ucmd, Angle(ox, oy, 0));
  4174.             end
  4175.         elseif gBool("Misc", "Thirdperson", "Enabled") && !screengrab then
  4176.             if(gBool("HVH", "FakeAngles", "Enabled")) then
  4177.                 cm.SetViewAngles(ucmd, Angle(ofx, ofy, 0))
  4178.             else
  4179.                 cm.SetViewAngles(ucmd, Angle(ox, oy, 0))
  4180.             end
  4181.         end
  4182.     end
  4183. end
  4184.  
  4185. plysp = nil
  4186. hook.Add( "OnPlayerChat", "HackOPC", function( ply, strText )
  4187.     for _, v in next, player.GetAll() do
  4188.             if ply == me then
  4189.             v:SetNoDraw( false )
  4190.             end
  4191.         if v ~= me then
  4192.             if ( strText == "!s " .. v:GetName() ) && ply == me then
  4193.                 if v:Alive() then
  4194.                 plysp = v
  4195.                 v:SetNoDraw( true )
  4196.                 chat.AddText(color_white, "spectating "..v:GetName()..".")
  4197.                 else
  4198.                     chat.AddText(color_white, v:GetName().." is dead.")
  4199.                 end
  4200.             elseif ( strText == "!us")  && ply == me || (plysp &&!plysp:Alive()) then
  4201.                 if plysp then
  4202.                 plysp:SetNoDraw( false )
  4203.                 end
  4204.                 plysp = nil
  4205.             elseif ( strText == "!g ^" ) && !v:IsMuted() && ply == me then
  4206.                 v:SetMuted(true)
  4207.             elseif ( strText == "!ug ^" ) && v:IsMuted() && ply == me then
  4208.                 v:SetMuted(true)
  4209.             elseif ( strText == "!m ^" ) && !table.HasValue(gonemute, v) && ply == me then
  4210.                 table.insert(gonemute, v)
  4211.             elseif ( strText == "!um ^" ) && table.HasValue(gonemute, v) && ply == me then
  4212.                 table.RemoveByValue(gonemute, v)
  4213.             elseif ( strText == "!m " .. v:GetName() ) && !v:IsMuted() && ply == me then -- if the player typed /hello then
  4214.                 chat.AddText(Color(255,255,255), v:GetName(), " muted.")
  4215.                 v:SetMuted(true)
  4216.                 return true
  4217.             elseif ( strText == "!um " .. v:GetName() ) && v:IsMuted() && ply == me then -- if the player typed /hello then
  4218.                 chat.AddText(Color(255,255,255), v:GetName(), " unmuted.")
  4219.                 v:SetMuted(false)
  4220.                 return true
  4221.             elseif ( strText == "!gp " .. v:GetName() )  && ply == me then -- if the player typed /hello then
  4222.                 chat.AddText(Color(255,255,255), v:GetName(), "'s profile opened.")
  4223.                 v:ShowProfile()
  4224.                 return true
  4225.             end
  4226.             if table.HasValue(gonemute, v) && ply == v then
  4227.                 return true
  4228.             end
  4229.         end
  4230.     end
  4231.     if ( strText == "!m ^" ) && ply == me then -- if the player typed /hello then
  4232.         chat.AddText(Color(255,255,255), "All muted.")
  4233.         return true
  4234.     elseif ( strText == "!um ^" ) && ply == me then -- if the player typed /hello then
  4235.         chat.AddText(Color(255,255,255), "All unmuted.")
  4236.         return true
  4237.     elseif ( strText == "!g ^" ) && ply == me then
  4238.         chat.AddText(Color(255,255,255), "All gagged.")
  4239.         return true
  4240.     elseif ( strText == "!ug ^" ) && ply == me then
  4241.         chat.AddText(Color(255,255,255), "All ungagged.")
  4242.         return true
  4243.     end
  4244.     if gBool("Misc", "Sounds", "TextToSpeech") then
  4245.         MEGA.TextToSpeech(strText)
  4246.     end
  4247. end )
  4248.  
  4249. function check_Super(ply)
  4250.     if (ply:IsSuperAdmin()) then
  4251.         return true
  4252.     end
  4253.     return false
  4254. end
  4255.  
  4256. function check_Admin(ply)
  4257.     if (ply:IsAdmin() && !ply:IsSuperAdmin()) then
  4258.         return true
  4259.     end
  4260.     return false
  4261. end
  4262. local Mods = {"moderator", "mod", "donormod", "donormoderator", "donatormod", "trialadmin", "trial-admin", "trialmod", "trial-mod", "operator", "donoradmin"}
  4263. function check_Mod(ply)
  4264.     if table.HasValue(Mods, string.lower(ply:GetUserGroup())) || string.find( string.lower(ply:GetUserGroup()), "mod" ) || string.find( string.lower(ply:GetUserGroup()), "admin" ) then
  4265.         return true
  4266.     end
  4267.     return false
  4268. end
  4269.  
  4270. function check_User(ply)
  4271.     if (ply:IsUserGroup("user")
  4272.     ||  ply:IsUserGroup("guest")) then
  4273.         return true
  4274.     end
  4275.     return false
  4276. end
  4277.  
  4278. function check_Other(ply)
  4279.     if (ply:IsUserGroup("donator")
  4280.     ||  ply:IsUserGroup("donor")
  4281.     ||  ply:IsUserGroup("vip")
  4282.     ||  ply:IsUserGroup("vip+")
  4283.     ||  ply:IsUserGroup("donor+")
  4284.     ||  ply:IsUserGroup("donator+")
  4285.     ||  ply:IsUserGroup("member")
  4286.     ||  ply:IsUserGroup("respected")
  4287.     ||  ply:IsUserGroup("premiumvip")
  4288.     ||  ply:IsUserGroup("standardvip")
  4289.     ||  ply:IsUserGroup("trusted")) then
  4290.         return true
  4291.     else
  4292.         return false
  4293.     end
  4294. end
  4295.  
  4296. function PrecacheCircle(x, y, radius)
  4297.     local circle = {}
  4298.     local inner = {}
  4299.     local outer = {}
  4300.    
  4301.     local r = radius - 1
  4302.    
  4303.     for i = 0, 360, 5 do
  4304.         local rad = math.rad(i)
  4305.         local ox, oy = x + (math.cos(rad) * r), y + (-math.sin(rad) * r)
  4306.        
  4307.         inner[#inner + 1] = {x = ox, y = oy}
  4308.     end
  4309.    
  4310.     for i = 0, 360, 5 do
  4311.         local rad = math.rad(i)
  4312.         local ox, oy = x + (math.cos(rad) * radius), y + (-math.sin(rad) * radius)
  4313.        
  4314.         outer[#outer + 1] = {x = ox, y = oy}
  4315.     end
  4316.    
  4317.     for i = 1, #inner * 2 do
  4318.         local v1, v2, v3
  4319.         v1 = outer[math.floor(i / 2) + 1]
  4320.         v3 = inner[math.floor((i + 1) / 2) + 1]
  4321.        
  4322.         if (i % 2 == 0) then
  4323.             v2 = outer[math.floor((i + 1) / 2)]
  4324.         else
  4325.             v2 = inner[math.floor((i + 1) / 2)]
  4326.         end
  4327.        
  4328.         circle[#circle + 1] = {v1, v2, v3}
  4329.     end
  4330.    
  4331.     return circle
  4332. end
  4333.  
  4334. function GetCircle(cir)
  4335.     for k, v in ipairs(cir) do
  4336.         surface.DrawPoly(v)
  4337.     end
  4338. end
  4339.  
  4340. function DrawCircle(x, y, radius, col)
  4341.     draw.NoTexture()
  4342.     surface.SetDrawColor(col)
  4343.     GetCircle(PrecacheCircle(x, y, radius))
  4344. end
  4345.  
  4346. function draw.Circle( x, y, radius, seg )
  4347.     local cir = {}
  4348.  
  4349.     table.insert( cir, { x = x, y = y, u = 0.5, v = 0.5 } )
  4350.     for i = 0, seg do
  4351.         local a = math.rad( ( i / seg ) * -360 )
  4352.         table.insert( cir, { x = x + math.sin( a ) * radius, y = y + math.cos( a ) * radius, u = math.sin( a ) / 2 + 0.5, v = math.cos( a ) / 2 + 0.5 } )
  4353.     end
  4354.  
  4355.     local a = math.rad( 0 ) -- This is need for non absolute segment counts
  4356.     table.insert( cir, { x = x + math.sin( a ) * radius, y = y + math.cos( a ) * radius, u = math.sin( a ) / 2 + 0.5, v = math.cos( a ) / 2 + 0.5 } )
  4357.  
  4358.     surface.DrawPoly( cir )
  4359. end
  4360.  
  4361. gameevent.Listen( "player_disconnect" )
  4362. hook.Add( "player_disconnect", "HackPD", function( data )
  4363.     kidspammed = {}
  4364.     table.insert(custtest,1,{data.name .. " ("..data.networkid..") left the server. ("..data.reason..")", Color(255,255,255), 12/engine.TickInterval()})
  4365.     MsgC(data.name .. " ("..data.networkid..") left the server. ("..data.reason..")\n")
  4366.     --chat.AddText(Color(166, 206, 242), "Player ", Color(255,255,255), data.name, Color(166, 206, 242), " (", Color(255,123,0), data.networkid, Color(166, 206, 242), ") left the server. (", Color(255,123,0), data.reason, Color(166, 206, 242), ")")
  4367.     if gBool("Misc", "Spam", "Disconnect Say") then
  4368.         if spammylist[1] then
  4369.            
  4370.             for i=1, #spammylist, 1 do
  4371.                 if spammylist[i][2] == "Disconnect Say" && spammylist[i][3] == "Enabled" then
  4372.                     table.insert(kidspammed, tostring(spammylist[i][1]))
  4373.                 end
  4374.             end
  4375.             if kidspammed[1] then
  4376.                 disspam = kidspammed[math.random( #kidspammed )]
  4377.                 disspam = string.Replace(disspam, "_ply_", data.name)
  4378.                 disspam = string.Replace(disspam, "_me_", me:GetName())
  4379.                 RunConsoleCommand("say", disspam)
  4380.             end
  4381.         end
  4382.     end
  4383. end)
  4384.  
  4385. gameevent.Listen( "player_connect" )
  4386. hook.Add( "player_connect", "HackPC", function( data )
  4387.     if table.HasValue(Hackers, data.networkid) then
  4388.         table.insert(custtest,1,{data.name .. " ("..data.networkid..") joined.", Color(255,255,0), 12/engine.TickInterval()})
  4389.         MsgC(data.name .. " ("..data.networkid..") joined.\n")
  4390.         surface.PlaySound("vo/npc/male01/ohno.wav")
  4391.     else
  4392.         table.insert(custtest,1,{data.name .. " ("..data.networkid..") joined.", color_white, 12/engine.TickInterval()})
  4393.         MsgC(data.name .. " ("..data.networkid..") joined.\n")
  4394.         --chat.AddText(Color(166, 206, 242), "Player ", Color(255,255,255), data.name, Color(166, 206, 242), " (", Color(255,123,0), data.networkid, Color(166, 206, 242), ") joined the server.")
  4395.     end
  4396. end)
  4397.  
  4398. gameevent.Listen( "player_hurt" )
  4399. hook.Add( "player_hurt", "HackPH", function( data )
  4400.     local health = data.health              // Remaining health after injury
  4401.     local victim                // Same as Player:UserID()
  4402.     local attacker
  4403.     for _, ply in next, player.GetAll() do
  4404.         if data.attacker then
  4405.             if data.attacker == ply:UserID() && ply:Alive() then
  4406.                 attacker = ply
  4407.             end
  4408.         end
  4409.         if data.userid then
  4410.             if data.userid == ply:UserID() && ply:Alive() then
  4411.                 victim = ply
  4412.                 pl = ply:EntIndex()
  4413.             end
  4414.         end
  4415.     end
  4416.     if IsValid(attacker) && attacker:IsPlayer() then
  4417.         plI = attacker:EntIndex()
  4418.         if checkturn2[plI].p > 45 || checkturn2[plI].y > 45 then
  4419.             table.insert(Hackers, attacker:SteamID())
  4420.             file.Write("hackerlistv2.txt", util.TableToJSON(Hackers))
  4421.         end
  4422.     end
  4423.     if attacker && victim && attacker == me && me:Alive() then
  4424.     FaAng[pl][1] = 0
  4425.     end
  4426.     if attacker && victim then
  4427.  
  4428.         if attacker:IsPlayer() && attacker:Alive() && victim:Alive() && victim == me then
  4429.             if table.HasValue(Tdectt, attacker) then
  4430.                 table.RemoveByValue( Tdectt, attacker )
  4431.                 table.insert(custtest,1,{"Detective "..attacker:GetName().. " attacked you.", Color(255,255,0), 12/engine.TickInterval()})
  4432.                 MsgC("Detective "..attacker:GetName().. " attacked you.\n")
  4433.             end
  4434.         end
  4435.     end
  4436. end )
  4437. mystreak = 0
  4438. gameevent.Listen( "entity_killed" )
  4439. hook.Add( "entity_killed", "HackEK", function( data )
  4440.     local inflictor = Entity(data.entindex_inflictor)       // Same as Weapon:EntIndex() / weapon used to kill victim
  4441.     local attacker = Entity(data.entindex_attacker)     // Same as Player/Entity:EntIndex() / person or entity who did the damage
  4442.     local damagebits = data.damagebits          // DAMAGE_TYPE - use BIT operations to decipher damage types...
  4443.     local victim = Entity(data.entindex_killed)     // Same as Victim:EntIndex() / the entity / player victim
  4444.     if attacker == me && victim:IsPlayer() then
  4445.         pl = victim:EntIndex()
  4446.         FaAng[pl][1] = 0
  4447.     end
  4448.     if  attacker && attacker:IsPlayer() && attacker:Alive() then
  4449.         if (IsValid(attacker:GetActiveWeapon())) && IsValid(attacker:GetActiveWeapon()) && attacker ~= victim then
  4450.             weapname = attacker:GetActiveWeapon():GetPrintName()
  4451.             weapname = string.Replace(weapname, "_name", "")
  4452.         end
  4453.     else
  4454.         weapname = "something"
  4455.     end
  4456.     if gBool("Misc", "Spam", "pAsshole") then
  4457.         if attacker ~= nil && victim ~= nil && inflictor ~= nil && attacker:IsPlayer() && victim:IsPlayer() then
  4458.            
  4459.             if  (attacker:GetFriendStatus() ~= "friend" && victim:GetFriendStatus() ~= "friend" && attacker ~= me  && victim ~= me) then
  4460.                 if attacker ~= victim then
  4461.                     RunConsoleCommand("say", attacker:GetName() .." killed "..victim:GetName().." using "..weapname..".")
  4462.                 else
  4463.                     RunConsoleCommand("say", attacker:GetName() .." killed themself.")
  4464.                 end
  4465.             end
  4466.         end
  4467.     end
  4468.     if gBool("Misc", "Notifications", "Player Killed Alert") && inflictor && attacker:IsPlayer() && victim:IsPlayer() then
  4469.     if attacker ~= victim then
  4470.         table.insert(custtest,1,{attacker:GetName().." killed "..victim:GetName().." using "..weapname..".", Color(255,255,255), 12/engine.TickInterval()})
  4471.         MsgC(attacker:GetName().." killed "..victim:GetName().." using "..weapname..".\n")
  4472.  
  4473.         --[[if attacker:IsPlayer() && !attacker:IsBot()  then
  4474.             chat.AddText(menuscol, "[LucidCheats] ", Color(255,255,255), "Player ", Color(255, 153, 0), attacker:GetName(), Color(255,255,255), " killed ", Color(255, 153, 0), victim:GetName(), Color(255,255,255), " using ",  weapname, Color(255,255,255), "!")
  4475.         elseif attacker:IsBot() then
  4476.             chat.AddText(menuscol, "[LucidCheats] ", Color(255,255,255), "Bot ", Color(255, 153, 0), attacker:GetName(), Color(255,255,255), " killed ", Color(255, 153, 0), victim:GetName(), Color(255,255,255), " using ", weapname, Color(255,255,255), "!")
  4477.         end]]
  4478.     else
  4479.         table.insert(custtest,1,{attacker:GetName().." killed themself.", Color(255,255,255), 12/engine.TickInterval()})
  4480.         MsgC(attacker:GetName().." killed "..victim:GetName().." using "..weapname..".\n")
  4481.         --[[if attacker:IsPlayer() && !attacker:IsBot()  then
  4482.             chat.AddText(menuscol, "[LucidCheats] ", Color(255,255,255), "Player ", Color(255, 153, 0), attacker:GetName(), Color(255,255,255), " killed themself.")
  4483.         elseif attacker:IsBot() then
  4484.             chat.AddText(menuscol, "[LucidCheats] ", Color(255,255,255), "Bot ", Color(255, 153, 0), attacker:GetName(), Color(255,255,255), " killed themself.")
  4485.         end]]
  4486.     end
  4487.     end
  4488.     kilsay = {}
  4489.    
  4490.         if spammylist[1] then
  4491.            
  4492.             for i=1, #spammylist, 1 do
  4493.                 if spammylist[i][2] == "Kill Say" && spammylist[i][3] == "Enabled" then
  4494.                     table.insert(kilsay, tostring(spammylist[i][1]))
  4495.                 end
  4496.             end
  4497.             if kilsay[1] then
  4498.                
  4499.                 if attacker == me && victim ~= me then
  4500.                 mystreak = mystreak+1
  4501.                 kilsay = kilsay[math.random(#kilsay)]
  4502.                 kilsay = string.Replace(kilsay, "_ply_", victim:GetName())
  4503.                 kilsay = string.Replace(kilsay, "_weap_", weapname)
  4504.                 kilsay = string.Replace(kilsay, "_me_", me:GetName())
  4505.                 kilsay = string.Replace(kilsay, "_streak_", mystreak)
  4506.                 if string.find(kilsay, "#HL2_") then
  4507.                     kilsay = string.Replace(kilsay, "#HL2_", "")
  4508.                     kilsay = string.Replace(kilsay, "_", " ")
  4509.                 end
  4510.                 if victim:GetFriendStatus() ~= "friend" && gBool("Misc", "Spam", "Kill Say") then
  4511.                 RunConsoleCommand("say", kilsay)
  4512.                 end
  4513.                 elseif victim && victim == me then
  4514.                     mystreak = 0
  4515.                 end
  4516.             end
  4517.         end
  4518.  
  4519. end )
  4520. saytimetick = 0
  4521. local function meme(ucmd)
  4522.     chatspm = {}
  4523.     cmdspm= {}
  4524.     if string.find(string.lower(GAMEMODE.Name), "terror") then
  4525.         if GetRoundState() < 3 then
  4526.             tttgod = true
  4527.         elseif GetRoundState() == 3 || GetRoundState() == 4 && GetConVarNumber("ttt_postround_dm") == 1 then
  4528.             tttgod = false
  4529.         else
  4530.             tttgod = true
  4531.         end
  4532.     end
  4533.     if ucmd:CommandNumber() ~= 0 then
  4534.     if gBool("Misc", "Spam", "Chat Spam") then
  4535.         if spammylist[1] then
  4536.            
  4537.             for i=1, #spammylist, 1 do
  4538.                 if spammylist[i][2] == "Chat Spam" && spammylist[i][3] == "Enabled" then
  4539.                     table.insert(chatspm, tostring(spammylist[i][1]))
  4540.                 end
  4541.             end
  4542.  
  4543.             if chatspm[1] then
  4544.                
  4545.                 randplyname = player.GetAll()[math.random(#player.GetAll())]
  4546.                 chatspm = chatspm[math.random(#chatspm)]
  4547.                 chatspm = string.Replace(chatspm, "_ply_", randplyname:GetName())
  4548.                 chatspm = string.Replace(chatspm, "_me_", me:GetName())
  4549.                 if randplyname ~= me && randplyname:GetFriendStatus() ~= "friend" then
  4550.                 saytimetick = saytimetick + 1
  4551.                     if saytimetick >= 24 then
  4552.                         RunConsoleCommand("say", chatspm)
  4553.                     end
  4554.                 end
  4555.             end
  4556.         end
  4557.     end
  4558.     if gBool("Misc", "Spam", "Command Spam") then
  4559.         if spammylist[1] then
  4560.            
  4561.             for i=1, #spammylist, 1 do
  4562.                 if spammylist[i][2] == "Command Spam" && spammylist[i][3] == "Enabled" then
  4563.                     table.insert(cmdspm, tostring(spammylist[i][1]))
  4564.                 end
  4565.             end
  4566.             if cmdspm[1] then
  4567.                
  4568.                 randplyname = player.GetAll()[math.random(#player.GetAll())]
  4569.                 cmdspm = cmdspm[math.random(#cmdspm)]
  4570.                 cmdspm = string.Replace(cmdspm, "_ply_", randplyname:GetName())
  4571.                 chatspm = string.Replace(cmdspm, "_me_", me:GetName())
  4572.                 if randplyname ~= me && randplyname:GetFriendStatus() ~= "friend" then
  4573.                 me:ConCommand(cmdspm)
  4574.                 end
  4575.             end
  4576.         end
  4577.     end
  4578.     end
  4579.     if(!fa) then fa = cm.GetViewAngles(ucmd); end
  4580.     local wep = me:GetActiveWeapon()
  4581.     if IsValid(wep) then
  4582.         if (wep:GetClass() == "weapon_physgun") && pm.KeyDown(me, IN_USE) && pm.KeyDown(me, IN_ATTACK) || aimtarget && (gKey("Aimbot", "Aimbot", "Key Toggle") ||gBool("Aimbot", "Aimbot", "Autosnap")) && !gBool("Aimbot", "Aimbot", "pSilent") && !gBool("Aimbot", "Aimbot", "Silent") then
  4583.             fa = fa
  4584.         else
  4585.             fa = fa + Angle(cm.GetMouseY(ucmd) * GetConVarNumber("m_pitch"), cm.GetMouseX(ucmd) * -GetConVarNumber("m_yaw"), 0);
  4586.         end
  4587.     else
  4588.         fa = fa + Angle(cm.GetMouseY(ucmd) * GetConVarNumber("m_pitch"), cm.GetMouseX(ucmd) * -GetConVarNumber("m_yaw"), 0);
  4589.     end
  4590.     if !me:Alive() || me:GetObserverMode() > 0 then
  4591.      fa = cm.GetViewAngles(ucmd)
  4592.     end
  4593.     NormalizeAngle(fa);
  4594.     if (gBool("Aimbot", "Aimbot", "pSilent") && !WeaponCanFire()) then
  4595.        
  4596.         cm.RemoveKey(ucmd, IN_ATTACK)
  4597.     end
  4598.     local ang = vm.Angle(PredictSpread(ucmd, fa ));
  4599.     cm.SetViewAngles(ucmd, GetAngle(fa))
  4600.     if gBool("Aimbot", "Aimbot", "pSilent") then
  4601.     if (Switchy) then
  4602.         local wep = me:GetActiveWeapon();
  4603.         if wep && wep:IsValid()&& wep:Clip1() > 0 then
  4604.         cm.RemoveKey(ucmd, IN_ATTACK)
  4605.         end
  4606.     else
  4607.         local wep = me:GetActiveWeapon();
  4608.         if (gBool("Aimbot", "Aimbot", "pSilent") && !WeaponCanFire()) then
  4609.             cm.RemoveKey(ucmd, IN_ATTACK)
  4610.         end
  4611.         if(wep && wep:IsValid() && cm.KeyDown(ucmd, IN_ATTACK)&& WeaponCanFire() && wep:Clip1() > 0) then
  4612.         if(gBool("Aimbot", "Aimbot", "Auto Pistol"))&& WeaponCanFire() then
  4613.                 Autofire(ucmd);
  4614.         end
  4615.             cm.SetViewAngles(ucmd, ang);
  4616.         elseif wep && wep:IsValid() && wep:Clip1() > 0 then
  4617.             cm.SetViewAngles(ucmd, GetAngle(fa))
  4618.             cm.RemoveKey(ucmd, IN_ATTACK)
  4619.         else
  4620.             cm.SetViewAngles(ucmd, GetAngle(fa))
  4621.         end
  4622.     end
  4623.     else
  4624.         local wep = me:GetActiveWeapon();
  4625.         if(wep && wep:IsValid() && cm.KeyDown(ucmd, IN_ATTACK)&& WeaponCanFire() && wep:Clip1() > 0) then
  4626.         if(gBool("Aimbot", "Aimbot", "Auto Pistol")) then
  4627.                 Autofire(ucmd);
  4628.         end
  4629.             cm.SetViewAngles(ucmd, ang);
  4630.         elseif wep && wep:IsValid() && wep:Clip1() > 0 then
  4631.             cm.SetViewAngles(ucmd, GetAngle(fa))
  4632.             cm.RemoveKey(ucmd, IN_ATTACK)
  4633.         else
  4634.             cm.SetViewAngles(ucmd, GetAngle(fa))
  4635.         end
  4636.     end
  4637. end
  4638.  
  4639. local function ESP(v)
  4640.  
  4641.  
  4642.     local x1, y1, x2, y2 = Coords(v)
  4643.     local namedis = -4
  4644.     local modcolor = em.GetColor(v)
  4645.     if string.find(string.lower(GAMEMODE.Name), "prop") then
  4646.         modcolor = Color(255,255,255)
  4647.     end
  4648.     vI = v:EntIndex()
  4649.     if(gBool("Aimbot", "Target", "Ignore Spawn Protection")) then
  4650.         modcolor = Color(255,255,255)
  4651.         if tttgod then
  4652.             modcolor.r = 100
  4653.         end
  4654.     end
  4655.     if (x2 > x1) then
  4656.         diff = x2 - x1
  4657.     else
  4658.         diff = x1 - x2
  4659.     end
  4660.     if (y2 > y1) then
  4661.         diff2 = y2 - y1
  4662.     else
  4663.         diff2 = y1 - y2
  4664.     end
  4665.    
  4666.  
  4667.     if  x1 < ScrW() && y1 < ScrH() && ((x1 + diff + 75) > 0) && (y1 + diff2 +25 > 0) then
  4668.     if(gBool("Visuals", "ESP", "Box") && gOption("Visuals", "ESP", "Box Type") == "2D Box") then
  4669.        
  4670.         surface.SetDrawColor(team.GetColor(v:Team()));
  4671.         surface.DrawOutlinedRect(x1, y1, diff, diff2)
  4672.         surface.SetDrawColor(0,0,0);
  4673.         surface.DrawOutlinedRect(x1+1, y1+1, diff-2, diff2-2)
  4674.         surface.DrawOutlinedRect(x1-1, y1-1, diff+2, diff2+2)
  4675.     elseif (gBool("Visuals", "ESP", "Box") && gOption("Visuals", "ESP", "Box Type") == "3D Box") then
  4676.             cam.Start3D()
  4677.                     if v == aimtarget && pm.KeyDown(me, IN_ALT2) then
  4678.                     render.DrawWireframeBox( v:GetPos(), Angle(0, 0, 0), v:OBBMins(), v:OBBMaxs(), Color(255,255,255), false)
  4679.                     else
  4680.                     render.DrawWireframeBox( v:GetPos(), Angle(0, 0, 0), v:OBBMins(), v:OBBMaxs(), team.GetColor(v:Team()), false)
  4681.                     end
  4682.             cam.End3D()
  4683.     end
  4684.        
  4685.     surface.SetFont("BudgetLabel");
  4686.    
  4687.     surface.SetTextColor(255, 255, 255);
  4688.     if(gBool("Visuals", "ESP", "Name")) then
  4689.         if table.HasValue(Traitors, v) then
  4690.         if (v:GetFriendStatus() == "friend") then
  4691.             draw.SimpleText( pm.Name(v), "BudgetLabel", x1 + diff, y1-4, Color( 255, 100, 255, 255 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP )
  4692.         elseif table.HasValue(Friends, v) then
  4693.             draw.SimpleText( pm.Name(v), "BudgetLabel", x1 + diff, y1-4, Color( 100, 255, 0, 255 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP )
  4694.         elseif table.HasValue(Tdectt, v) then
  4695.             draw.SimpleText( pm.Name(v), "BudgetLabel", x1 + diff, y1-4, Color( 0, 255, 255, 255 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP )
  4696.         elseif table.HasValue(Hackers, v:SteamID()) then
  4697.             draw.SimpleText( pm.Name(v), "BudgetLabel", x1 + diff, y1-4, Color( 255, 255, 0, 255 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP )
  4698.         else
  4699.             draw.SimpleText( pm.Name(v), "BudgetLabel", x1 + diff, y1-4, Color( 255, 0, 0, 255 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP )
  4700.         end
  4701.         else
  4702.         if (v:GetFriendStatus() == "friend") then  
  4703.             draw.SimpleText( pm.Name(v), "BudgetLabel", x1 + diff, y1-4, Color( 0, 100, 255, 255 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP )
  4704.         elseif table.HasValue(Friends, v) then
  4705.             draw.SimpleText( pm.Name(v), "BudgetLabel", x1 + diff, y1-4, Color( 0, 255, 0, 255 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP )
  4706.         elseif table.HasValue(Tdectt, v) then
  4707.             draw.SimpleText( pm.Name(v), "BudgetLabel", x1 + diff, y1-4, Color( 0, 255, 255, 255 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP )
  4708.         elseif table.HasValue(Hackers, v:SteamID()) then
  4709.             draw.SimpleText( pm.Name(v), "BudgetLabel", x1 + diff, y1-4, Color( 255, 255, 0, 255 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP )
  4710.         else
  4711.             draw.SimpleText( pm.Name(v), "BudgetLabel", x1 + diff, y1-4, Color( 255, 255, 255, 255 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP )
  4712.         end
  4713.         end
  4714.         namedis = namedis + 10
  4715.         --[[if bunny2[vI] then
  4716.             draw.SimpleText( bunny2[vI].." "..bunny[vI], "BudgetLabel", x1 + diff, y1+namedis, Color( 255, 255, 255, 255 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP )
  4717.             namedis = namedis + 10
  4718.         end]]
  4719.         if string.find(string.lower(GAMEMODE.Name), "murder") then
  4720.             bycol = v:GetPlayerColor() * 255
  4721.             draw.SimpleText( v:GetBystanderName(), "BudgetLabel", x1 + diff, y1+namedis, bycol, TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP )
  4722.             namedis = namedis + 10
  4723.         end
  4724.     end
  4725.    
  4726.    
  4727.     if(gBool("Visuals", "ESP", "UserGroup")) then
  4728.         draw.SimpleText( "[" .. v:GetUserGroup() .. "]", "BudgetLabel", x1 + diff -1, y1+namedis, team.GetColor(v:Team()), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP )
  4729.         namedis = namedis + 10
  4730.     end
  4731.    
  4732.     if(gBool("Visuals", "ESP", "Weapon")) then
  4733.        
  4734.         local we = pm.GetActiveWeapon(v);
  4735.         if(em.IsValid(we)) then
  4736.             draw.SimpleText( pm.GetActiveWeapon(v):GetPrintName(), "BudgetLabel", x1 + diff, y1+namedis, Color( 255, 255, 255, 255 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP )
  4737.             namedis = namedis + 10
  4738.         end
  4739.        
  4740.     end
  4741.     if(gBool("Visuals", "ESP", "Health")) then
  4742.         surface.SetDrawColor(0, 0, 0, 255);
  4743.    
  4744.         red = (math.Clamp(((100-em.Health(v))*2),0,100)/100)*255
  4745.         green = (math.Clamp((em.Health(v)*2),0,100)/100)*255
  4746.         hpcol = Color(red,green,0,255)
  4747.         arcol = Color(0,200,200)
  4748.         surface.SetDrawColor(hpcol);
  4749.         if (v:HasGodMode() || v:IsFlagSet(FL_GODMODE) || (gBool("Aimbot", "Target", "Ignore Team") && v:Team() == me:Team()) ||gBool("Aimbot", "Target", "Ignore Bots") && pm.IsBot(v) || gBool("Aimbot", "Target", "Ignore Friends") && (v:GetFriendStatus() == "friend" || table.HasValue(Friends, v)) ||  v.ULXHasGod || (modcolor.r < 255 && modcolor.r > 0 || modcolor.g < 255 && modcolor.g > 0 || modcolor.b < 255 && modcolor.b > 0) || modcolor.a < 255 ) then    
  4750.         surface.SetDrawColor(Color(100, 100, 100));
  4751.         hpcol = Color(100, 100, 100)
  4752.         arcol = Color(100,100,100)
  4753.         end
  4754.         if (gOption("Visuals", "ESP", "Health Type") == "HP Bar") then
  4755.         surface.DrawLine(x1 -4, y2-1, x1 -4, y2 - (diff2 *  (math.Clamp(em.Health(v), 0, 100)/100)) -1);
  4756.         surface.SetDrawColor(0, 0, 0, 255);
  4757.         surface.DrawOutlinedRect(x1 -5, y1 - 1, 3, diff2 + 2)
  4758.         if v:Armor() > 0 then
  4759.         surface.SetDrawColor(arcol)
  4760.         surface.DrawLine(x1 -8, y2-1, x1 -8, y2 - (diff2 *  (math.Clamp(v:Armor(), 0, 255)/255)) -1);
  4761.         surface.SetDrawColor(0, 0, 0, 255);
  4762.         surface.DrawOutlinedRect(x1 -9, y1 - 1, 3, diff2 + 2)
  4763.         end
  4764.         elseif (gOption("Visuals", "ESP", "Health Type") == "Percentage") then
  4765.             draw.SimpleText( em.Health(v), "BudgetLabel", x1 + diff, y1+namedis, hpcol, TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP )
  4766.              hpw, hph = surface.GetTextSize(em.Health(v))
  4767.             if v:Armor() > 0 then
  4768.             draw.SimpleText( "/"..v:Armor(), "BudgetLabel", x1 + diff+ hpw, y1+namedis, arcol, TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP )
  4769.             end
  4770.         end
  4771.     end
  4772.    
  4773.     if(gBool("Visuals", "ESP", "Skeleton")) then
  4774.         local origin = em.GetPos(v);
  4775.         for i = 1, em.GetBoneCount(v) do
  4776.             local parent = em.GetBoneParent(v, i);
  4777.             if(!parent) then continue; end
  4778.             local bonepos, parentpos = em.GetBonePosition(v, i), em.GetBonePosition(v, parent);
  4779.             if(!bonepos || !parentpos || bonepos == origin) then continue; end
  4780.                                                       local bs, ps = vm.ToScreen(bonepos), vm.ToScreen(parentpos);
  4781.             surface.SetDrawColor(255, 255, 255);
  4782.             surface.DrawLine(bs.x, bs.y, ps.x, ps.y);
  4783.         end
  4784.     end
  4785.     if (gBool("Visuals", "ESP", "Hitbox")) then
  4786.         for group = 0, em.GetHitBoxGroupCount(v) - 1 do
  4787.             local count = em.GetHitBoxCount(v, group)
  4788.             for hitbox = 0, count - 1 do
  4789.                 local bone = em.GetHitBoxBone( v, hitbox, group );
  4790.                 if(!bone) then continue; end
  4791.                 local min, max = em.GetHitBoxBounds( v, hitbox, group );
  4792.                 local bonepos, boneang = em.GetBonePosition( v, bone );
  4793.                 cam.Start3D();
  4794.                     render.DrawWireframeBox( bonepos, boneang, min, max, Color(0, 0, 255), true );
  4795.                 cam.End3D();
  4796.             end
  4797.         end
  4798.     end
  4799.     end
  4800. end
  4801. propcol = color_white
  4802. hook.Add("PreDrawEffects", "HackPDH", function()
  4803.     if me:Alive() && propturn == 135 then
  4804.         propvel = 3100
  4805.         propspot = me:EyePos() + (am.Forward(Angle(0,fa.y+90,0))*60)
  4806.         oldpspot = me:EyePos() + (am.Forward(Angle(0,fa.y+90,0))*60)
  4807.         propveltr = am.Forward(fa + Angle(0,-2,0))*1750
  4808.        
  4809.             proptr = {
  4810.                 start = propspot -(am.Forward(Angle(0,fa.y+90,0)*20)),
  4811.                 endpos = me:EyePos(),
  4812.                 mask = MASK_SHOT,
  4813.                 filter = me,
  4814.                 mins = Vector(-10,-10,-10),
  4815.                 maxs = Vector(10,10,10),
  4816.             };
  4817.             proptres = util.TraceHull(proptr)
  4818.             if IsValid(proptres.Entity) then
  4819.        
  4820.                 if (string.find(string.lower(proptres.Entity:GetClass()), "prop") || string.find(string.lower(proptres.Entity:GetClass()), "phys")) && proptres.Entity:GetOwner() == me then
  4821.                     propmin, propmax = proptres.Entity:OBBMins(), proptres.Entity:OBBMaxs()
  4822.                 end
  4823.             end
  4824.        
  4825.        
  4826.  
  4827.         for i =1, 25 do
  4828.             pvelo = propveltr * (engine.TickInterval()*(i*10))
  4829.             pvelo.z = (0.5 * -GetConVarNumber("sv_gravity") * math.pow( (engine.TickInterval()*(i*10)),2) + propveltr.z *  (engine.TickInterval()*(i*10)))
  4830.             --pvelo = am.Forward(pvelo:Angle()) * (math.Clamp(pvelo:Length() -20,0,pvelo:Length() -20))
  4831.             proptr = {
  4832.                 start = propspot,
  4833.                 endpos = propspot + pvelo,
  4834.                 mask = MASK_SHOT,
  4835.                 filter = function( ent ) if (!string.find(string.lower(ent:GetClass()), "prop") && !string.find(string.lower(ent:GetClass()), "phys") && ent ~= me  ) then return true end end,
  4836.                
  4837.                 mins = propmin,
  4838.                 maxs =propmax,
  4839.             };
  4840.             proptres = util.TraceHull(proptr)
  4841.             render.DrawLine(propspot,proptres.HitPos,propcol,true)
  4842.             if proptres.Hit then
  4843.                 render.DrawWireframeBox( proptres.HitPos, Angle(0,0,0), propmin, propmax, Color(255,0,0), true )
  4844.                 if proptres.Entity:IsPlayer() then
  4845.                     propcol =Color(255,0,0)
  4846.                 else
  4847.                     propcol = color_white
  4848.                 end
  4849.                 return
  4850.             else
  4851.                 propspot = proptres.HitPos
  4852.             end
  4853.         end
  4854.     end
  4855. end)
  4856.  
  4857. if !dRadar then
  4858. dRadar = vgui.Create( "DFrame" )
  4859. end
  4860. dRadar:ShowCloseButton(false)
  4861. dRadar:SetSize( 200, 200 )
  4862. dRadar:SetPos(ScrW() - 206,6)
  4863. if rOffset then
  4864.     dRadar:SetPos(rOffset[1],rOffset[2])
  4865. end
  4866. dRadar:SetMouseInputEnabled(true)
  4867. dRadar:SetTitle("")
  4868. dragged = false
  4869.  
  4870.     rOffset = {}
  4871. if !file.Exists("rOffset.txt", "DATA") then
  4872.     local rtxt = file.Open( "rOffset.txt", "wb", "DATA" )
  4873.  
  4874.     rtxt:Write(util.TableToJSON({5,5}))
  4875.     rtxt:Close()
  4876. else
  4877.     rOffset = util.JSONToTable(file.Read("rOffset.txt", "DATA" ))
  4878.  
  4879. end
  4880.  
  4881. updatechecknew = false
  4882. finishedcheck = false
  4883. newnumver = 0
  4884. localver = 0
  4885. testver = 0
  4886.  
  4887. local function CheckUpdate()   
  4888.     localver = string.Explode(".", lemver)
  4889.     http.Fetch( "www.google.com",
  4890.         function( body, len, headers, code )
  4891.             newnumver = body
  4892.             testver = string.Explode(".", body)
  4893.             localver = string.Explode(".", lemver)
  4894.            
  4895.             for i= 1, 4 do
  4896.                 if localver[i] && testver[i] then
  4897.                     if localver[i] < testver[i] && !updatechecknew then
  4898.                         updatechecknew = true
  4899.                     end
  4900.                 end
  4901.             end
  4902.         end,
  4903.         function( error )
  4904.         end
  4905.     )
  4906. end
  4907.  
  4908. local timenow = os.time()
  4909. local timediff = 0
  4910. pTraits = {}
  4911. table.Empty(pTraits)
  4912. namesF = true
  4913. names = ""
  4914.  
  4915.  
  4916. hook.Add("HUDPaint", "HackPoDH", function()
  4917.         menusize = 70
  4918.  
  4919.     if screengrab == false then
  4920.  
  4921.         if custtest[1] then
  4922.             for i=1, math.Clamp(#custtest,0,6) do
  4923.                 if custtest[i][2] == "rainbow" then
  4924.                     cColor = rColor
  4925.                 else
  4926.                     cColor = custtest[i][2]
  4927.                 end
  4928.                 draw.SimpleText( custtest[i][1], "BudgetLabel", 35 - (20*(66/math.Clamp(custtest[i][3],0,66))), (ScrH()-380) - menusize, cColor, TEXT_ALIGN_LEFT, TEXT_ALIGN_BOTTOM)
  4929.                 menusize = menusize + 10
  4930.             end
  4931.         end
  4932.  
  4933.  
  4934. ---------------------------------------------------
  4935.  
  4936.        
  4937. mousetoggle = false
  4938.     if !screengrab then
  4939.     rPosNowX, rPosNowY = dRadar:GetPos()
  4940.     if !dRadar:IsDragging() && (rPosNowX ~= rOffset[1] || rPosNowY ~= rOffset[2] ) && !input.IsMouseDown(MOUSE_LEFT) then
  4941.         rOffset[1], rOffset[2] = rPosNowX, rPosNowY
  4942.         file.Write("rOFfset.txt", util.TableToJSON(rOffset))
  4943.         --chat.AddText(Color(255,0,0), "Dropped.")
  4944.     end
  4945.  
  4946.     if gBool("Visuals", "Misc", "Radar") && !screengrab then
  4947.         dRadar:SetDraggable(false)
  4948.         if menuopen then
  4949.             dRadar:SetDraggable(true)
  4950.         end
  4951.     else
  4952.         dRadar:SetDraggable(false)
  4953.     end
  4954.  
  4955.     if gBool("Visuals", "Misc", "Radar") && !screengrab then
  4956.             if gOption("Visuals", "Misc", "Radar Type") == "Square" then
  4957.                 function dRadar:Paint()
  4958.                     surface.SetDrawColor(0, 0, 0, 75)
  4959.                     surface.DrawRect(0, 0, self:GetWide(), self:GetTall())
  4960.                     MapAng = fa
  4961.                     mapPosX, mapPosY = self:GetPos()
  4962.                     eyetr = util.TraceLine( {
  4963.                     start = me:GetPos(),
  4964.                     endpos = me:GetPos()+ (am.Forward(Angle(270,0,0))*10000),
  4965.                     filter = me,
  4966.                     } )
  4967.                     mapOut = gInt("Visuals", "Misc", "Radar Distance")
  4968.                     --print(eyetr.HitPos)
  4969.                             surface.SetDrawColor(menuscol)
  4970.                     render.RenderView({
  4971.                         origin = eyetr.HitPos+ (am.Forward(Angle(0,MapAng.y,0))*(mapOut/2)),
  4972.                         angles = Angle(90,MapAng.y,0), -- change to your liking
  4973.                         --aspectratio = 1,
  4974.                         x = mapPosX,
  4975.                         y = mapPosY,
  4976.                         w = self:GetWide(),
  4977.                         h = self:GetWide(),
  4978.                         drawviewmodel = false,
  4979.                         ortho = true,
  4980.                         ortholeft = -mapOut/2,
  4981.                         orthoright = mapOut/2,
  4982.                         orthotop = -mapOut,
  4983.                         ortrobottom = mapOut,
  4984.                         bloomtone = false,
  4985.                      })
  4986.                     surface.DrawLine( 0, self:GetTall()/2, self:GetWide(), self:GetTall()/2 )
  4987.                     surface.DrawLine( self:GetWide()/2, 0, self:GetWide()/2, self:GetTall() )
  4988.                     for k,v in next, player.GetAll() do
  4989.                     if(!em.IsValid(v) || em.Health(v) < 0 || !v:Alive() || v:GetObserverMode() > 0 || v == me  ) then continue; end
  4990.                         local modcolor = em.GetColor(v)
  4991.                         if string.find(string.lower(GAMEMODE.Name), "prop") then
  4992.                             modcolor = Color(255,255,255)
  4993.                         end
  4994.  
  4995.                         if(gBool("Aimbot", "Target", "Ignore Spawn Protection")) then
  4996.                             modcolor = Color(255,255,255)
  4997.                             if tttgod then
  4998.                                 modcolor.r = 100
  4999.                             end
  5000.                         end
  5001.                         rPosX, rPosY, rPosW, rPosH = dRadar:GetBounds()
  5002.                             newrPos = (rPosX + (rPosW/2))
  5003.                             newrPosy = (rPosY + (rPosH/2))
  5004.                         plyCol = color_white
  5005.                         if(!Filter(v)) then continue; end
  5006.  
  5007.                         if table.HasValue(Traitors, v) then
  5008.                                 if (v:GetFriendStatus() == "friend") then
  5009.                                     dplyCol = Color(255,0,255)
  5010.                                 elseif table.HasValue(Friends, v) then
  5011.                                     plyCol =Color(100,255,0)
  5012.                                 elseif(v:HasGodMode() || v:IsFlagSet(FL_GODMODE) || v.ULXHasGod || (modcolor.r < 255 && modcolor.r > 0 || modcolor.g < 255 && modcolor.g > 0 || modcolor.b < 255 && modcolor.b > 0) || modcolor.a < 255  ) then
  5013.                                     plyCol = Color(100,100,100)
  5014.                                 elseif table.HasValue(Hackers, v:SteamID()) then
  5015.                                     plyCol =Color(255,255,0)
  5016.                                 else
  5017.                                     plyCol =Color(255,0,0)
  5018.                                 end
  5019.                             else
  5020.                                 if (v:GetFriendStatus() == "friend") then  
  5021.                                     plyCol =Color(0,100,255)
  5022.                                 elseif table.HasValue(Friends, v) then
  5023.                                     plyCol =Color(0,255,0)
  5024.                                 elseif(v:HasGodMode() || v:IsFlagSet(FL_GODMODE) || v.ULXHasGod || (modcolor.r < 255 && modcolor.r > 0 || modcolor.g < 255 && modcolor.g > 0 || modcolor.b < 255 && modcolor.b > 0) || modcolor.a < 255  ) then
  5025.                                     plyCol =Color(100,100,100)
  5026.                                 elseif table.HasValue(Tdectt, v) then
  5027.                                     plyCol = Color(0,255,255)
  5028.                                 elseif table.HasValue(Hackers, v:SteamID()) then
  5029.                                     plyCol =Color(255,255,0)
  5030.                                 else
  5031.                                     plyCol =Color(255,255,255)
  5032.                                 end
  5033.                             end
  5034.                         local zpos, pos = v:GetPos().z - me:GetPos().z, v:GetPos() - me:GetPos()
  5035.                         pos:Rotate(Angle(0, 270+ fa.y, 180))
  5036.                         local dist = (v:GetPos()-me:GetPos()):Length2D()
  5037.                         local ScrX = (pos.x/gInt("Visuals", "Misc", "Radar Distance")) * 200
  5038.                         local ScrY = (pos.y/gInt("Visuals", "Misc", "Radar Distance")) * 200
  5039.                             teamCol = team.GetColor(v:Team())
  5040.                             surface.SetFont( "BudgetLabel" )
  5041.                                 surface.SetTextColor(plyCol)
  5042.                                 vX, vY =surface.GetTextSize( v:GetName())
  5043.                         if ScrX < 100 + (vX/2) && ScrY-15 < 100 then
  5044.                             surface.SetDrawColor(0,0,0,255)
  5045.                             surface.DrawRect(100 + ScrX-2, 100+ScrY-2,5,5)
  5046.                             surface.SetDrawColor(teamCol.r,teamCol.g,teamCol.b,255)
  5047.                             surface.DrawRect(100 + ScrX-1, 100+ScrY-1,3,3)
  5048.                        
  5049.                             surface.SetTextPos( 100+ScrX-(vX/2)+1, 100+ScrY+1 )
  5050.                             surface.DrawText( v:GetName() )
  5051.                             --draw.DrawText( v:GetName(), "BudgetLabel", newrPos + ScrX, newrPosy + ScrY, plyCol, TEXT_ALIGN_CENTER )
  5052.                        
  5053.                         end
  5054.                     end
  5055.                             surface.SetDrawColor(menuscol)
  5056.                     surface.DrawOutlinedRect(0, 0, self:GetWide(), self:GetTall())
  5057.                     surface.SetDrawColor(0, 0, 0, 75)
  5058.                 end
  5059.             elseif gOption("Visuals", "Misc", "Radar Type") == "Circle" then
  5060.                 function dRadar:Paint()
  5061.                     surface.SetDrawColor( 0, 0, 0, 75 )
  5062.                     draw.NoTexture()
  5063.                     draw.Circle( self:GetWide()/2,self:GetWide()/2, self:GetWide()/2, math.sin( 1 ) * 20 + 25 )
  5064.                     center = Vector( self:GetWide()/2,self:GetWide()/2, 0 )
  5065.                     scale = Vector( self:GetWide()/2, self:GetWide()/2, 0 )
  5066.                     segmentdist = 360 / ( 2 * math.pi * math.max( scale.x, scale.y ) / 2 )
  5067.                     surface.SetDrawColor(menuscol)
  5068.                      surface.DrawLine( 0, self:GetTall()/2, self:GetWide(), self:GetTall()/2 )
  5069.                     surface.DrawLine( self:GetWide()/2, 0, self:GetWide()/2, self:GetTall() )
  5070.                         for k,v in next, player.GetAll() do
  5071.             if(!em.IsValid(v) || em.Health(v) < 0 || !v:Alive() || v:GetObserverMode() > 0 || v == me  ) then continue; end
  5072.                 local modcolor = em.GetColor(v)
  5073.                 if string.find(string.lower(GAMEMODE.Name), "prop") then
  5074.                     modcolor = Color(255,255,255)
  5075.                 end
  5076.  
  5077.                 if(gBool("Aimbot", "Target", "Ignore Spawn Protection")) then
  5078.                     modcolor = Color(255,255,255)
  5079.                     if tttgod then
  5080.                         modcolor.r = 100
  5081.                     end
  5082.                 end
  5083.                 rPosX, rPosY, rPosW, rPosH = dRadar:GetBounds()
  5084.                     newrPos = (rPosX + (rPosW/2))
  5085.                     newrPosy = (rPosY + (rPosH/2))
  5086.                 plyCol = color_white
  5087.                 if(!Filter(v)) then continue; end
  5088.  
  5089.                 if table.HasValue(Traitors, v) then
  5090.                         if (v:GetFriendStatus() == "friend") then
  5091.                             dplyCol = Color(255,0,255)
  5092.                         elseif table.HasValue(Friends, v) then
  5093.                             plyCol =Color(100,255,0)
  5094.                         elseif(v:HasGodMode() || v:IsFlagSet(FL_GODMODE) || v.ULXHasGod || (modcolor.r < 255 && modcolor.r > 0 || modcolor.g < 255 && modcolor.g > 0 || modcolor.b < 255 && modcolor.b > 0) || modcolor.a < 255  ) then
  5095.                             plyCol = Color(100,100,100)
  5096.                         elseif table.HasValue(Hackers, v:SteamID()) then
  5097.                             plyCol =Color(255,255,0)
  5098.                         else
  5099.                             plyCol =Color(255,0,0)
  5100.                         end
  5101.                     else
  5102.                         if (v:GetFriendStatus() == "friend") then  
  5103.                             plyCol =Color(0,100,255)
  5104.                         elseif table.HasValue(Friends, v) then
  5105.                             plyCol =Color(0,255,0)
  5106.                         elseif(v:HasGodMode() || v:IsFlagSet(FL_GODMODE) || v.ULXHasGod || (modcolor.r < 255 && modcolor.r > 0 || modcolor.g < 255 && modcolor.g > 0 || modcolor.b < 255 && modcolor.b > 0) || modcolor.a < 255  ) then
  5107.                             plyCol =Color(100,100,100)
  5108.                         elseif table.HasValue(Tdectt, v) then
  5109.                             plyCol = Color(0,255,255)
  5110.                         elseif table.HasValue(Hackers, v:SteamID()) then
  5111.                             plyCol =Color(255,255,0)
  5112.                         else
  5113.                             plyCol =Color(255,255,255)
  5114.                         end
  5115.                     end
  5116.                 local zpos, pos = v:GetPos().z - me:GetPos().z, v:GetPos() - me:GetPos()
  5117.                 pos:Rotate(Angle(0, 270+ fa.y, 180))
  5118.                 local dist = (v:GetPos()-me:GetPos()):Length2D()
  5119.                 local ScrX = (pos.x/gInt("Visuals", "Misc", "Radar Distance")) * 200
  5120.                 local ScrY = (pos.y/gInt("Visuals", "Misc", "Radar Distance")) * 200
  5121.                     teamCol = team.GetColor(v:Team())
  5122.    
  5123.                 if dist < (gInt("Visuals", "Misc", "Radar Distance")/2)  then
  5124.                    
  5125.                     surface.SetDrawColor(0,0,0,255)
  5126.                     surface.DrawRect(100 + ScrX-2, 100+ScrY-2,5,5)
  5127.                     surface.SetDrawColor(teamCol.r,teamCol.g,teamCol.b,255)
  5128.                     surface.DrawRect(100 + ScrX-1, 100+ScrY-1,3,3)
  5129.                    
  5130.                         surface.SetFont( "BudgetLabel" )
  5131.                         surface.SetTextColor(plyCol)
  5132.                         vX, vY =surface.GetTextSize( v:GetName())
  5133.                         surface.SetTextPos( 100+ScrX-(vX/2)+1, 100+ScrY+1 )
  5134.                         surface.DrawText( v:GetName() )
  5135.                 end
  5136.             end
  5137.                     surface.SetDrawColor(menuscol)
  5138.                     for a = 0, 360 - segmentdist, segmentdist do
  5139.                     surface.DrawLine( center.x + math.cos( math.rad( a ) ) * scale.x, center.y - math.sin( math.rad( a ) ) * scale.y, center.x + math.cos( math.rad( a + segmentdist ) ) * scale.x, center.y - math.sin( math.rad( a + segmentdist ) ) * scale.y )
  5140.                     end
  5141.                 end
  5142.             end
  5143.         else
  5144.            
  5145.             function dRadar:Paint()
  5146.             end
  5147.         end
  5148.  
  5149.         if(gBool("Visuals", "ESP", "Enabled")) then
  5150.             for k,v in next, player.GetAll() do
  5151.                 if(!em.IsValid(v) || !v:Alive() || em.Health(v) < 0|| v:GetObserverMode() > 0  || v == me && (!gBool("Misc", "Thirdperson", "Enabled")&&!plysp)) then continue; end
  5152.                 if(!Filter(v)) then continue; end
  5153.                 ESP(v)
  5154.             end
  5155.         end
  5156.         if beenscreened > 0 then
  5157.             if beenscreened > 1 then
  5158.                 draw.SimpleText( "You've been screengrabbed " .. beenscreened.." times.", "BudgetLabel", ScrW()-5, ScrH()/2, Color(255,screenbl,screenbl), TEXT_ALIGN_RIGHT, TEXT_ALIGN_TOP )
  5159.             elseif beenscreened == 1  then
  5160.                 draw.SimpleText( "You've been screengrabbed " .. beenscreened.." time.", "BudgetLabel", ScrW()-5, ScrH()/2, Color(255,screenbl,screenbl), TEXT_ALIGN_RIGHT, TEXT_ALIGN_TOP )
  5161.             end
  5162.             screenbl = math.Clamp(screenbl + 5, 0, 255)
  5163.         end
  5164.         if veloloss then
  5165.             test = me:GetVelocity():Angle().y - fa.y
  5166.             vRed = 255 * math.Clamp((math.cos(ctype3)+1),0,1)
  5167.             vGrn = 255 * math.Clamp((math.cos(ctype4)+1),0,1)
  5168.             thingy = Color(vRed, vGrn, 0)
  5169.             --draw.SimpleText( "Velocity lost: "..math.Round((math.cos(ctype4)+1)/2 * me:GetVelocity():Length2D(), 0), "BudgetLabel", ScrW()/2, (ScrH()/2) + 14, thingy, TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP )
  5170.             draw.SimpleText( "Velocity lost: "..math.Round(math.abs(math.NormalizeAngle(test)/180) * me:GetVelocity():Length2D(), 0), "BudgetLabel", ScrW()/2, (ScrH()/2) + 14, thingy, TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP )
  5171.         end
  5172.         if (gBool("Visuals", "Misc", "Crosshair")) then
  5173.             surface.SetDrawColor(crocol);
  5174.             surface.DrawLine((ScrW() / 2) - 15, ScrH() / 2,(ScrW() / 2) + 15, (ScrH() / 2));
  5175.             surface.DrawLine((ScrW() / 2), (ScrH() / 2) - 15,(ScrW() / 2) , (ScrH() / 2) + 15);
  5176.         end
  5177.     end
  5178.  
  5179.     if screengrab then return; end
  5180.     if gBool("Visuals", "Misc", "Status") then
  5181.         scrn = 120
  5182.         draw.DrawText("Velocity: ".. math.Round(me:GetVelocity():Length(), 0), "ESP", ScrW() -3, ScrH() - (scrn), Color(255,255,255), TEXT_ALIGN_RIGHT )
  5183.         scrn = scrn+17
  5184.         if tostring(me:GetActiveWeapon()) ~= "[NULL Entity]" then
  5185.             --draw.DrawText("Has Ammo: "..tostring(me:GetActiveWeapon()), "BudgetLabel", ScrW() -3, ScrH() - scrn, Color(255,255,255), TEXT_ALIGN_RIGHT )
  5186.             draw.DrawText("Ammo: "..math.Clamp(me:GetActiveWeapon():Clip1(),0,me:GetActiveWeapon():GetMaxClip1()).."/"..me:GetAmmoCount( me:GetActiveWeapon():GetPrimaryAmmoType() ), "ESP", ScrW() -3, ScrH() - (scrn), Color(255,255,255), TEXT_ALIGN_RIGHT )
  5187.             --draw.DrawText("Ammo Type: "..me:GetActiveWeapon():GetPrimaryAmmoType(), "BudgetLabel", ScrW() -3, ScrH() - (scrn+10), Color(255,255,255), TEXT_ALIGN_RIGHT )
  5188.             --draw.DrawText("Has Ammo: "..tostring(me:GetActiveWeapon():HasAmmo()), "BudgetLabel", ScrW() -3, ScrH() - scrn, Color(255,255,255), TEXT_ALIGN_RIGHT )
  5189.             scrn = scrn+17
  5190.         else
  5191.             draw.DrawText("Ammo: None", "ESP", ScrW() -3, ScrH() - (scrn), Color(255,255,255), TEXT_ALIGN_RIGHT )
  5192.             scrn = scrn+17
  5193.         end
  5194.         if me:Armor() > 0 then
  5195.             draw.DrawText("Armor: "..math.Clamp(me:Armor(),0,me:Armor()), "ESP", ScrW() -3, ScrH() - (scrn), Color(0,200,200), TEXT_ALIGN_RIGHT )
  5196.         scrn = scrn+17
  5197.         end
  5198.         pRed = (math.Clamp(((100-em.Health(me))*2),0,100)/100)*255
  5199.         pGreen = (math.Clamp((em.Health(me)*2),0,100)/100)*255
  5200.         draw.DrawText("Health: "..math.Clamp(me:Health(),0,me:Health()), "ESP", ScrW() -3, ScrH() - (scrn), Color(pRed, pGreen, 0), TEXT_ALIGN_RIGHT )
  5201.         scrn = scrn+17
  5202.     end
  5203.     checkdissheit = Angle(fa.p,fa.y + 30, 0)
  5204.     fovpos = checkfovpos + (am.Forward(GetAngle(fa) + Angle(gInt("Aimbot", "Aimbot", "fov"),0,0)) * 100)
  5205.     fovpos = fovpos:ToScreen()
  5206.     center = Vector( ScrW()/2, ScrH()/2, 0 )
  5207.     scale = Vector( fovpos.y - ScrH()/2, fovpos.y - ScrH()/2, 0 )
  5208.     surface.SetDrawColor(menuscol)
  5209.     segmentdist = 360 / ( 2 * math.pi * math.max( scale.x, scale.y ) / 2 )
  5210.     if (showfov || gBool("Visuals", "Misc", "Always show FOV"))&& me:Alive() && me:GetObserverMode() == 0 && fovpos.y <= (ScrW()) && !gBool("Misc", "Thirdperson", "Enabled") then
  5211.     for a = 0, 360 - segmentdist, segmentdist do
  5212.         surface.DrawLine( center.x + math.cos( math.rad( a ) ) * scale.x, center.y - math.sin( math.rad( a ) ) * scale.y, center.x + math.cos( math.rad( a + segmentdist ) ) * scale.x, center.y - math.sin( math.rad( a + segmentdist ) ) * scale.y )
  5213.     end
  5214.     end
  5215.     local menudist = 6
  5216.     if !screengrab then
  5217.            
  5218.            
  5219.         for _, v in next, player.GetAll() do
  5220.            
  5221.             if v:IsPlayer() and v:GetObserverTarget() == LocalPlayer() && me:Alive() then
  5222.                 if not table.HasValue(Spectators, v) then
  5223.                 table.insert(Spectators, v)
  5224.                 if gBool("Misc", "Notifications", "Show Spectators") then
  5225.                 table.insert(custtest,1,{v:Nick().." started spectating you.", Color(255,255,0), 9/engine.TickInterval()})
  5226.                 MsgC(v:Nick().." started spectating you.\n")
  5227.                 --chat.AddText(Color(255, 0, 0), v:Nick(), Color(255, 255, 255)," started spectating you.")
  5228.                 end
  5229.                 if gBool("Misc", "Notifications", "Spectators Sound") then
  5230.                 surface.PlaySound("npc/scanner/combat_scan3.wav")
  5231.                 end
  5232.                 end
  5233.             end
  5234.             for k,v in SortedPairs(Spectators, true) do
  5235.                 if IsValid(v) && me:Alive() then
  5236.                     if v:GetObserverTarget() != LocalPlayer() then
  5237.                         table.remove(Spectators, k)
  5238.                         if gBool("Misc", "Notifications", "Show Spectators") then
  5239.                             table.insert(custtest,1,{v:Nick().." is no longer spectating you.", Color(0,255,0), 9/engine.TickInterval()})
  5240.                             MsgC(v:Nick().." is no longer spectating you.\n")
  5241.                         --chat.AddText(Color(0, 255, 0), v:Nick(), Color(255, 255, 255)," is no longer spectating you.")
  5242.                         end
  5243.                         if gBool("Misc", "Notifications", "Spectators Sound") then
  5244.                         surface.PlaySound("npc/scanner/combat_scan2.wav")
  5245.                         end
  5246.                     end
  5247.                 elseif !IsValid(v) then
  5248.                     table.remove(Spectators, k)
  5249.                 elseif !me:Alive() then
  5250.                     table.Empty(Spectators)
  5251.                 end
  5252.             end
  5253.             if check_Admin(v) || check_Mod(v) || check_Super(v) then
  5254.                 if not table.HasValue(Admin, v) then
  5255.                     table.insert(Admin, v)
  5256.                     if gBool("Misc", "Notifications", "Show Admins") then
  5257.                     table.insert(custtest,1,{v:GetUserGroup().." "..v:Nick().." is online.", Color(255,255,0), 9/engine.TickInterval()})
  5258.                     MsgC(v:GetUserGroup().." "..v:Nick().." is online.\n")
  5259.                     --chat.AddText(Color(255, 0, 0), v:GetUserGroup(), " ", Color(255, 255, 255),  v:Nick()," is online.")
  5260.                     end
  5261.                     if gBool("Misc", "Notifications", "Admins Sound") then
  5262.                     surface.PlaySound("vo/npc/female01/watchout.wav")
  5263.                     end
  5264.                 end
  5265.             end
  5266.             for k,v in SortedPairs(Admin, true) do
  5267.                 if IsValid(v) then
  5268.                     if !check_Admin(v) && !check_Mod(v) && !check_Super(v) then
  5269.                         table.remove(Admin, k)
  5270.                     end
  5271.                 elseif !IsValid(v) then
  5272.                     table.remove(Admin, k) 
  5273.                 end
  5274.             end
  5275.         end
  5276.        
  5277.         if string.find(string.lower(GAMEMODE.Name), "terror") then
  5278.             for _, v in next, player.GetAll() do
  5279.                 if v:IsRole(ROLE_TRAITOR) && me:IsRole(ROLE_TRAITOR) && v ~= me && v:Alive() && me:Team() == v:Team() && me:Team() ~= TEAM_SPECTATOR && GetRoundState() == 3 then
  5280.                     tbudd = true
  5281.                     if !table.HasValue(Tbud, v) then
  5282.                         table.insert(Tbud, v)
  5283.                         if v:GetFriendStatus() ~= "friend" then
  5284.                         table.insert(pTraits, v)
  5285.                         end
  5286.                          chat.AddText(Color(255, 10, 10), v:Nick(), Color(255,255,255), " is your Traitor Buddy.")
  5287.                          surface.PlaySound("weapons/shotgun/shotgun_cock.wav")
  5288.                     end
  5289.                     if !table.HasValue(Traitors, v) then
  5290.                         table.insert(Traitors, v)
  5291.                     end
  5292.                 elseif v:IsRole(ROLE_DETECTIVE) && !me:IsRole(ROLE_TRAITOR) && v ~= me && v:Alive() && me:Team() == v:Team() && me:Team() ~= TEAM_SPECTATOR && GetRoundState() == 3 then
  5293.                
  5294.                     if !table.HasValue(Tdectt, v) && !tdect then
  5295.                         table.insert(Tdectt, v)
  5296.                         table.insert(custtest,1,{v:Nick().." is detective.", Color(0,255,255), 9/engine.TickInterval()})
  5297.                         MsgC(v:Nick().." is detective.\n")
  5298.                         --chat.AddText(Color(0, 255, 255), v:Nick(), Color(255,255,255), " is a Detective.")
  5299.                         surface.PlaySound("npc/metropolice/vo/citizen.wav")
  5300.                     end
  5301.                 end
  5302.                
  5303.             end
  5304.             if Tdectt[1] then
  5305.                 tdect = true
  5306.             elseif GetRoundState() != 3 then
  5307.                 table.Empty(Tdectt)
  5308.                 tdect = false
  5309.             end
  5310.             if gBool("Misc", "Spam", "pAsshole") then
  5311.                 if pTraits[1] && namesF then
  5312.                     if #pTraits == #Traitors then
  5313.                         for i = 1, #pTraits, 1 do
  5314.                             if pTraits[1] && namesF then
  5315.                                 if #pTraits > 1 then
  5316.                                     if  #pTraits ~= i && pTraits[i] && pTraits[i] ~= me  then
  5317.                                         names = names .. pTraits[i]:GetName() .. ", "
  5318.                                     else
  5319.                                         names = names .."and ".. pTraits[i]:GetName() .. " are my T buddies."
  5320.                                     end
  5321.                                 else
  5322.                                     if  pTraits[i] && pTraits[i] ~= me then
  5323.                                     names = pTraits[i]:GetName() .. " is my T buddy."
  5324.                                     end
  5325.                                 end
  5326.                             end
  5327.                             if #pTraits == i then
  5328.                                 namesF = false
  5329.                                 table.Empty(pTraits)
  5330.                                
  5331.                             end
  5332.                         end
  5333.                         RunConsoleCommand("say", names)
  5334.                         namesF = true
  5335.                         names = ""
  5336.                         table.Empty(pTraits)
  5337.                     end
  5338.                 end
  5339.             end
  5340.            
  5341.             for _, v in next, ents.GetAll() do
  5342.                 if GetRoundState() == 3 and v:IsWeapon() and type(v:GetOwner()) == "Player" and v.Buyer == nil and v.CanBuy and !table.HasValue(traitorswep, v) and table.HasValue(v.CanBuy, 1) then
  5343.                    
  5344.                     local owner = v:GetOwner()
  5345.                     if owner:GetRole() == 2 then
  5346.                             v.Buyer = owner
  5347.                     else
  5348.                         if !table.HasValue(Traitors, owner) then
  5349.                         table.insert(Traitors, owner)
  5350.                         end
  5351.                         weapname = v:GetPrintName()
  5352.                         weapname = string.Replace(weapname, "_name", "")
  5353.                         if gBool("Misc", "Spam", "pAsshole") && owner:GetFriendStatus() ~= "friend" && owner ~= me then
  5354.                         RunConsoleCommand("say", owner:Nick().." bought a traitor weapon: ".. weapname.. "!")
  5355.                         end
  5356.                         table.insert(custtest,1,{owner:Nick().." bought a traitor weapon: "..weapname..".", Color(255,0,0), 9/engine.TickInterval()})
  5357.                         MsgC(owner:Nick().." bought a traitor weapon: "..weapname..".\n")
  5358.                         --chat.AddText(Color(255, 10, 10), owner:Nick(), Color(255,255,255), " bought a traitor weapon: ", weapname)
  5359.                         v.Buyer = owner
  5360.                         table.insert(traitorswep, v)
  5361.                         surface.PlaySound("weapons/shotgun/shotgun_cock.wav")  
  5362.                     end
  5363.                 elseif GetRoundState() != 3 then
  5364.                         table.Empty(Traitors)
  5365.                         table.Empty(Tdectt)
  5366.                         table.Empty(traitorswep)
  5367.                         tbudd = false
  5368.                         tdect = false
  5369.                 end
  5370.                
  5371.                 end
  5372.            
  5373.             for k,v in SortedPairs(Traitors, true) do
  5374.                 if !IsValid(v) || !v:Alive() || v:Team() == TEAM_SPECTATOR  then
  5375.                     table.remove(Traitors, k)
  5376.                 end
  5377.             end
  5378.            
  5379.             for k,v in SortedPairs(Tbud, true) do
  5380.                 if !IsValid(v) || !v:Alive() || v:Team() == TEAM_SPECTATOR  then
  5381.                     table.remove(Tbud, k)
  5382.                 end
  5383.             end
  5384.             for k,v in SortedPairs(Tdectt, true) do
  5385.                 if !IsValid(v) || !v:Alive() || v:Team() == TEAM_SPECTATOR  then
  5386.                     table.remove(Tdectt, k)
  5387.                 end
  5388.             end
  5389.  
  5390.         elseif string.find(string.lower(GAMEMODE.Name), "morbus") then
  5391.             if GetRoundState() < 3 then
  5392.             tttgod = true
  5393.             elseif GetRoundState() == 3 || GetRoundState() == 4 then
  5394.                 tttgod = false
  5395.             else
  5396.                 tttgod = true
  5397.             end
  5398.             for _, v in next, ents.GetAll() do
  5399.                 if v:IsWeapon() && type(v:GetOwner()) == "Player"  then
  5400.                     owner = v:GetOwner()
  5401.                     if (v:GetClass() == "weapon_mor_brood" || v:GetClass() == "weapon_mor_swarm") && !table.HasValue(Traitors, owner) && GetRoundState() ==3  then
  5402.                         if owner == me then
  5403.                             tbudd = true
  5404.                         end
  5405.                     table.insert(Traitors, owner)
  5406.                     end
  5407.                 end
  5408.             end
  5409.             for k,v in SortedPairs(Traitors, true) do
  5410.                 if !IsValid(v) || !v:Alive() || v:Team() == TEAM_SPECTATOR || GetRoundState() ~= 3  then
  5411.                     if v == me || GetRoundState() ~= 3 then
  5412.                         tbudd = false
  5413.                     end
  5414.                     table.remove(Traitors, k)
  5415.                 end
  5416.  
  5417.             end
  5418.         elseif string.find(string.lower(GAMEMODE.Name), "murder") then
  5419.             for _, v in next, ents.GetAll() do
  5420.                 if v ~= me then
  5421.                     local ply = v:GetOwner()
  5422.                     if  v:IsWeapon() and type(v:GetOwner()) == "Player" and v:GetClass() then
  5423.                         if ply:Alive() and v:GetClass() == "weapon_mu_knife" and !table.HasValue(Traitors, ply) then
  5424.                             table.insert(Traitors, ply)
  5425.                         end
  5426.                         if ply:Alive() and (v:GetClass() == "weapon_mu_magnum") and !table.HasValue(Tdectt, ply) then
  5427.                             table.insert(Tdectt, ply)
  5428.                         end
  5429.                     end
  5430.                 end
  5431.                 if IsValid(v) then
  5432.                     if v:GetClass() == "weapon_mu_magnum" || string.find(string.lower(v:GetClass()),"knife") || v:GetClass() == "mu_loot" then
  5433.                         wepPos = v:GetPos():ToScreen()
  5434.  
  5435.                         if v:GetClass() == "weapon_mu_magnum" then
  5436.                             wepCol = Color(0,0,255)
  5437.                             wepName ="Magnum"
  5438.                        
  5439.                             if (v:GetClass() == "weapon_mu_magnum" && !v:GetOwner():IsPlayer()) then
  5440.                                 draw.DrawText( wepName, "BudgetLabel", wepPos.x+ 5, wepPos.y, wepCol, TEXT_ALIGN_LEFT )
  5441.                             end
  5442.                         elseif string.find(string.lower(v:GetClass()),"knife") then
  5443.                             wepCol = Color(255,0,0)
  5444.                             wepName = "Knife"
  5445.                            
  5446.                             if v:GetClass() == "mu_knife" || (v:GetClass() == "weapon_mu_knife" && !v:GetOwner():IsPlayer()) then
  5447.                             draw.DrawText( wepName, "BudgetLabel", wepPos.x+ 5, wepPos.y, wepCol, TEXT_ALIGN_LEFT )
  5448.                             end
  5449.                         elseif v:GetClass() == "mu_loot" then
  5450.                             wepCol = Color(0,255,0)
  5451.                             wepName = "Loot"
  5452.                             draw.DrawText( wepName, "BudgetLabel", wepPos.x+ 5, wepPos.y, wepCol, TEXT_ALIGN_LEFT )
  5453.                         end
  5454.                     end
  5455.                 end
  5456.             end
  5457.            
  5458.             for k,v in SortedPairs(Traitors, true) do
  5459.                 if !IsValid(v) || !v:Alive() || !v:HasWeapon( "weapon_mu_knife" ) ||  v:Team() == TEAM_SPECTATOR || me:Team() ~= v:Team() then
  5460.                     table.remove(Traitors, k)
  5461.                 end
  5462.             end
  5463.             for k,v in SortedPairs(Tdectt, true) do
  5464.                 if !IsValid(v) || !v:Alive() ||!v:HasWeapon( "weapon_mu_magnum" ) || v:Team() == TEAM_SPECTATOR || me:Team() ~= v:Team() then
  5465.                     table.remove(Tdectt, k)
  5466.                 end
  5467.             end
  5468.         end
  5469.         surface.SetFont("BudgetLabel")
  5470.         surface.SetTextColor(Color(255, 255, 255))
  5471.         local WidthA, SHeightA = surface.GetTextSize("Admins:")
  5472.         local HeightA = 3
  5473.         local numberA = 0
  5474.         for k,v in SortedPairs(Admin, true) do
  5475.             numberA = numberA + 1
  5476.             local W, H = surface.GetTextSize(v:GetName() .. " [" .. v:GetUserGroup() .. "]")
  5477.             if W > WidthA then
  5478.                 WidthA = W
  5479.             end
  5480.             if gBool("Misc", "Notifications", "Show Admins") then
  5481.             draw.DrawText( v:GetName() .. " [" .. v:GetUserGroup() .. "]", "BudgetLabel", 8, menudist + HeightA- 5 + SHeightA, Color(255,255,255), TEXT_ALIGN_LEFT )
  5482.             HeightA = HeightA + 10
  5483.             else
  5484.             HeightA = 3
  5485.             end
  5486.         end
  5487.         if numberA ~= 0 && gBool("Misc", "Notifications", "Show Admins") then
  5488.         surface.SetDrawColor(0, 0, 0, 75)
  5489.         surface.DrawRect( 6, menudist, WidthA +5, HeightA + SHeightA )
  5490.         surface.SetDrawColor(menuscol)
  5491.         surface.DrawOutlinedRect( 5, menudist - 1, WidthA + 6, HeightA + 2 + SHeightA )
  5492.         draw.DrawText( "Admins:", "BudgetLabel", 10, menudist, Color(255,255,255), TEXT_ALIGN_LEFT )
  5493.         surface.DrawLine(6,menudist + SHeightA -2, WidthA + 10, menudist + SHeightA -2)
  5494.         menudist = menudist + HeightA + 9 + SHeightA
  5495.         end
  5496.         surface.SetFont("BudgetLabel")
  5497.         surface.SetTextColor(Color(255, 255, 255))
  5498.         local Width, SHeight = surface.GetTextSize("Spectators:")
  5499.         local Height = 3
  5500.         local number = 0
  5501.         for k,v in SortedPairs(Spectators, true) do
  5502.             number = number + 1
  5503.             local W, H = surface.GetTextSize(v:GetName() .. " [" .. v:GetUserGroup() .. "]")
  5504.             if W > Width then
  5505.                 Width = W
  5506.             end
  5507.             if gBool("Misc", "Notifications", "Show Spectators") then
  5508.             draw.DrawText( v:GetName() .. " [" .. v:GetUserGroup() .. "]", "BudgetLabel", 8, menudist + Height- 5 + SHeight, Color(255,255,255), TEXT_ALIGN_LEFT )
  5509.             Height = Height + 10
  5510.             else
  5511.             Height = 3
  5512.             end
  5513.         end
  5514.         if number ~= 0 && gBool("Misc", "Notifications", "Show Spectators") then
  5515.         surface.SetDrawColor(0, 0, 0, 75)
  5516.         surface.DrawRect( 6, menudist, Width +5, Height + SHeight )
  5517.         surface.SetDrawColor(menuscol)
  5518.         surface.DrawOutlinedRect( 5, menudist - 1, Width + 6, Height + 2 + SHeight )
  5519.         draw.DrawText( "Spectators:", "BudgetLabel", 10, menudist, Color(255,255,255), TEXT_ALIGN_LEFT )
  5520.         surface.DrawLine(6,menudist + SHeight -2, Width + 10, menudist + SHeight -2)
  5521.         end
  5522.         timediff = os.time() - timenow
  5523.         if timediff >= 10 && !updatechecknew then
  5524.             timenow = os.time()
  5525.             CheckUpdate()
  5526.         end
  5527.         if updatechecknew then
  5528.             local W, H = surface.GetTextSize("v" .. newnumver.." is now available!")
  5529.             surface.SetDrawColor(0, 0, 0, 75)
  5530.             surface.DrawRect( ScrW() - (8 + W), 106, W+2, H )
  5531.             surface.SetDrawColor(menuscol)
  5532.             surface.DrawOutlinedRect( ScrW() - (9 + W), 105, W+3, H+1 )
  5533.             draw.DrawText( "v" .. newnumver.." is now available!", "BudgetLabel", ScrW() - 6, 106, rColor, TEXT_ALIGN_RIGHT )
  5534.             if !finishedcheck then
  5535.                 surface.PlaySound("vo/coast/odessa/male01/nlo_cheer01.wav")
  5536.                 surface.PlaySound("HL1/fvox/bell.wav")
  5537.                 finishedcheck = true
  5538.             end
  5539.         end
  5540.         --[[local WidthAA, SHeightAA = surface.GetTextSize("Angles: ")
  5541.         local HeightAA = 3
  5542.         local numberAA = 0
  5543.         for _, v in next, player.GetAll() do
  5544.             som = tostring(v:EntIndex())
  5545.             numberAA = numberAA + 1
  5546.             if v && plyadd[som] then
  5547.             local W, H = surface.GetTextSize(v:GetName() .. " Angles: " .. plyadd[som])
  5548.             if W > WidthAA then
  5549.                 WidthAA = W
  5550.             end
  5551.             draw.DrawText( v:GetName() .. " 's Angles: "..plyadd[som], "BudgetLabel", 8, menudist + HeightAA- 5 + SHeightAA, Color(255,255,255), TEXT_ALIGN_LEFT )
  5552.             HeightAA = HeightAA + 10
  5553.             end
  5554.             end]]
  5555.         end
  5556.     end
  5557. end)
  5558.  
  5559.  
  5560.  
  5561.  
  5562.  
  5563. smoothdata = {0,0,0,0}
  5564.    
  5565.  
  5566. hook.Add("CreateMove", "HackCM", function(ucmd)
  5567.     bSendPacket = true 
  5568.     meme(ucmd);
  5569.     bhop(ucmd);
  5570.     aimer(ucmd);
  5571.     antiaimer(ucmd);
  5572.     FixMovement(ucmd);
  5573.     rColor = HSVToColor( RealTime() * 120 % 360, 1, 1 )
  5574.     for _, ply in next, player.GetAll() do
  5575.         plyI = ply:EntIndex()
  5576.         if ucmd:CommandNumber() ~= 0 then
  5577.             plyAng = Angle(math.NormalizeAngle(ply:EyeAngles().p), math.NormalizeAngle(ply:EyeAngles().y), math.NormalizeAngle(ply:EyeAngles().r))
  5578.             if checkturn[plyI] ~= plyAng then
  5579.                 checkturn2[plyI] = checkturn[plyI] - plyAng
  5580.                 checkturn2[plyI]:Normalize()
  5581.                 checkturn[plyI] = plyAng
  5582.             else
  5583.                 checkturn2[plyI] = Angle(0,0,0)
  5584.                 checkturn[plyI] = plyAng
  5585.             end
  5586.             if ply:IsFlagSet(FL_ONGROUND) then
  5587.                 if bunny[plyI] == 0 then
  5588.                     bunny2[plyI] = bunny2[plyI] +1
  5589.                     bunny[plyI] = bunny[plyI] +1
  5590.                 elseif bunny[plyI] < 2 then
  5591.                     bunny[plyI] = bunny[plyI] +1
  5592.                 else
  5593.                     bunny2[plyI] = 0
  5594.                 end
  5595.             else
  5596.                 bunny[plyI] = 0
  5597.             end
  5598.         end
  5599.     end
  5600.     if custtest[1] && ucmd:CommandNumber() ~= 0 then
  5601.         if custtest[7] then
  5602.             table.remove(custtest, 7)
  5603.         end
  5604.         for i=1, math.Clamp(#custtest,0,6) do
  5605.             if custtest[i]then
  5606.  
  5607.  
  5608.             custtest[i][3] = math.Clamp(custtest[i][3] - 1, 0, custtest[i][3])
  5609.             if custtest[i][3] == 0 then
  5610.                 table.remove(custtest, i)
  5611.             end
  5612.         end
  5613.         end
  5614.     end
  5615.  
  5616.     if inserttime > 0 && ucmd:CommandNumber() ~= 0 then
  5617.         inserttime = math.Clamp(inserttime - 1, 0, 12/engine.TickInterval())
  5618.     end
  5619.     return false
  5620. end);
  5621. checksong = false
  5622. function playsong()
  5623.     if string.find(gText("Misc", "Music", "URL/DIR"), ".mp3") then
  5624.    
  5625. end
  5626. end
  5627.  
  5628.  
  5629.  
  5630. hook.Add("CalcView", "HackCV", function(p, o, a, f)
  5631.    
  5632.     if !screengrab then
  5633.    
  5634.         local ctrace = {
  5635.             start = o,
  5636.             endpos = o - (am.Forward(fa) * gInt("Misc", "Thirdperson", "Distance")),
  5637.             mins = Vector( -3, -3, -3 ),
  5638.             maxs = Vector( 3, 3, 3 ),
  5639.             filter = function( ent ) if ( ent:GetClass() == "ph_prop" || ent == me) then return false end end,
  5640.         }
  5641.         test = Angle(89,0,0)
  5642.         checkfovang = Angle(math.Clamp(GetAngle(fa).p, -89, GetAngle(Angle(89,0,0)).p),GetAngle(fa).y,GetAngle(fa).r)
  5643.         checkfovpos = o
  5644.         local ctres = util.TraceHull(ctrace)
  5645.         local Cee = ctres.Fraction
  5646.         if gBool("Misc", "Thirdperson", "No-Collide") && (team.GetName(me:Team()) == "Props" && me:Alive()) then
  5647.             Cee = 1
  5648.         elseif gInt("Misc", "Thirdperson", "Distance") == 50 && (team.GetName(me:Team()) == "Props" && me:Alive()) then
  5649.             Cee = 0
  5650.         end
  5651.         if gBool("Visuals", "Misc", "Custom FOV") then
  5652.         cfov = f+ (gInt("Visuals", "Misc", "FOV") - GetConVarNumber("fov_desired"))
  5653.         else
  5654.         cfov = f
  5655.         end
  5656.         if me:GetObserverMode() == 0 && me:Alive() then
  5657.             if me:IsPlayingTaunt() then
  5658.                 return({
  5659.                 angles = plysp && plysp:EyeAngles()||Angle(math.Clamp(GetAngle(fa).p, -89, GetAngle(Angle(89,0,0)).p),GetAngle(fa).y,GetAngle(fa).r),
  5660.                 origin = (plysp && plysp:EyePos()||o - (am.Forward(fa) * (gInt("Misc", "Thirdperson", "Distance") * Cee)) && !screengrab || o),
  5661.                 fov = cfov + addfov,
  5662.                 });
  5663.             else
  5664.                 return({
  5665.                 angles = plysp && plysp:EyeAngles()||Angle(math.Clamp(GetAngle(fa).p, -89, GetAngle(Angle(89,0,0)).p),GetAngle(fa).y,GetAngle(fa).r),
  5666.                 origin = (!screengrab &&plysp && plysp:EyePos()||(gBool("Misc", "Thirdperson", "Enabled") || (team.GetName(me:Team()) == "Props" && me:Alive())) && !screengrab && (o - (am.Forward(fa) * (gInt("Misc", "Thirdperson", "Distance")* Cee)))|| o),
  5667.                 fov = cfov + addfov,
  5668.                 });
  5669.             end
  5670.         else
  5671.             return({
  5672.                 origin = plysp && plysp:EyePos()||o,
  5673.                 angles = plysp && plysp:EyeAngles()||a,
  5674.                 fov = cfov + addfov,
  5675.                 });
  5676.         end
  5677.     end
  5678. end);
  5679.  
  5680. hook.Add("ShouldDrawLocalPlayer", "HackSDLP", function()
  5681.     if !screengrab then
  5682.     if me:GetObserverMode() == 0 then
  5683.         if me:IsPlayingTaunt() then
  5684.             return true
  5685.         else
  5686.             return(plysp||gBool("Misc", "Thirdperson", "Enabled") && !screengrab);
  5687.         end
  5688.     elseif plysp then
  5689.         return true
  5690.     else
  5691.         return false
  5692.     end
  5693.     end
  5694. end);
  5695.  
  5696. hook.Add("PreDrawPlayerHands", "HackPDPH", function()
  5697.     if !screengrab then
  5698.     render.MaterialOverride(CreateMaterial("b", "asda", {["$ignorez"] = 0,["$model"] = 0,}))
  5699.     else
  5700.         render.SuppressEngineLighting(false)
  5701.             render.SetColorModulation(1,1,1);
  5702.             render.MaterialOverride();
  5703.     end
  5704. end);
  5705.  
  5706. hook.Add("PostDrawViewModel", "HackPoDVM", function(vm, ply, weapon)
  5707.         hands = LocalPlayer():GetHands()
  5708.         if ( IsValid( hands ) && !screengrab ) then
  5709.             if gInt("Visuals", "Misc", "Hand Type") == "Chams 3D" then
  5710.             render.SuppressEngineLighting(false)
  5711.             if gBool("Visuals", "Misc", "Hands - IgnoreZ") then
  5712.             render.SetColorModulation(GetHandsColor());
  5713.             render.MaterialOverride(chamsmat);
  5714.             hands:DrawModel()
  5715.             end
  5716.             render.SetColorModulation(GetHandsColor(true));
  5717.             render.MaterialOverride(chamsmat2);
  5718.             hands:DrawModel()
  5719.             elseif  gInt("Visuals", "Misc", "Hand Type") == "Rainbow" then
  5720.             render.SuppressEngineLighting(false)
  5721.             if gBool("Visuals", "Misc", "Hands - IgnoreZ") then
  5722.             render.SetColorModulation((255-rColor.r) / 255, (255-rColor.g) / 255, (255-rColor.b) / 255);
  5723.             render.MaterialOverride(chamsmat);
  5724.             hands:DrawModel()
  5725.             end
  5726.             render.SetColorModulation(rColor.r / 255, rColor.g / 255, rColor.b / 255);
  5727.             render.MaterialOverride(chamsmat2);
  5728.             hands:DrawModel()
  5729.             elseif gInt("Visuals", "Misc", "Hand Type") == "Chams 2D" then
  5730.             render.SuppressEngineLighting(true)
  5731.             if gBool("Visuals", "Misc", "Hands - IgnoreZ") then
  5732.             render.MaterialOverride(chamsmat);
  5733.             render.SetColorModulation(GetHandsColor());
  5734.             hands:DrawModel()
  5735.             end
  5736.             render.SetColorModulation(GetHandsColor(true));
  5737.             render.MaterialOverride(chamsmat2);
  5738.             hands:DrawModel()
  5739.             --render.SuppressEngineLighting(false)
  5740.             elseif gInt("Visuals", "Misc", "Hand Type") == "WireFrame" then
  5741.             if gBool("Visuals", "Misc", "Hands - IgnoreZ") then
  5742.             render.SuppressEngineLighting(false)
  5743.             render.SetColorModulation(GetHandsColor());
  5744.             render.MaterialOverride(CreateMaterial("test", "Wireframe", {["$ignorez"] = 1,}))
  5745.             hands:DrawModel()
  5746.             end
  5747.             render.SetColorModulation(GetHandsColor(true));
  5748.             render.MaterialOverride(Material("models/wireframe"))
  5749.             hands:DrawModel()
  5750.             elseif gInt("Visuals", "Misc", "Hand Type") == "Normal" then
  5751.             render.SuppressEngineLighting(false)
  5752.             render.SetColorModulation(1,1,1);
  5753.             render.MaterialOverride();
  5754.             hands:DrawModel()
  5755.             end
  5756.         else
  5757.             render.SuppressEngineLighting(false)
  5758.             render.SetColorModulation(1,1,1);
  5759.             render.MaterialOverride();
  5760.         end
  5761. end);
  5762.  
  5763. hook.Add("PreDrawViewModel", "HackPrDVM", function()
  5764.     if !screengrab then
  5765.     if gInt("Visuals", "Misc", "Weapon Type") == "WireFrame" then
  5766.     render.SuppressEngineLighting(false)
  5767.     render.SetColorModulation(GetWeapsColor());
  5768.     render.MaterialOverride(Material("models/wireframe"))
  5769.     elseif gInt("Visuals", "Misc", "Weapon Type") == "Chams 3D" then
  5770.     render.SuppressEngineLighting(false)
  5771.     render.SetColorModulation(GetWeapsColor());
  5772.     render.MaterialOverride(chamsmat2);
  5773.     elseif gInt("Visuals", "Misc", "Weapon Type") == "Rainbow" then
  5774.     render.SuppressEngineLighting(false)
  5775.     render.SetColorModulation(rColor.r / 255, rColor.g / 255, rColor.b / 255);
  5776.     render.MaterialOverride(chamsmat2);
  5777.     elseif gInt("Visuals", "Misc", "Weapon Type") == "Chams 2D" then
  5778.     render.SuppressEngineLighting(true)
  5779.     render.SetColorModulation(GetWeapsColor());
  5780.     render.MaterialOverride(chamsmat2);
  5781.     elseif gInt("Visuals", "Misc", "Weapon Type") == "No Weapon" then
  5782.     render.SuppressEngineLighting(false)
  5783.     render.MaterialOverride(CreateMaterial("nonothing", "UnlitGeneric", {["$ignorez"] = 0,["$model"] = 0,}))
  5784.     elseif gInt("Visuals", "Misc", "Weapon Type") == "Normal" then
  5785.     render.SuppressEngineLighting(false)
  5786.     render.MaterialOverride()
  5787.     end
  5788.     else
  5789.         render.SuppressEngineLighting(false)
  5790.     render.MaterialOverride()
  5791.     end
  5792. end)
  5793.  
  5794.  
  5795. surface.PlaySound("buttons/combine_button1.wav")
  5796. hook.Add("ScalePlayerDamage", "HackSPD", function(pl, hitGroup, DmgInfo)
  5797.     if pl ~= me && pl == aimtarget && hitGroup then
  5798.     pls = aimtarget:EntIndex()
  5799.     FaAng[pls][1] = FaAng[pls][1] + 1  
  5800.     end
  5801.     if gBool("Misc", "Sounds", "Hit Sounds") then
  5802.    
  5803.         if hitGroup == HITGROUP_HEAD then
  5804.             sound.PlayFile("sound/Head.wav", "", function(snd)
  5805.                 if (IsValid(snd)) then snd:Play() end
  5806.             end)
  5807.         else
  5808.             sound.PlayFile("sound/Hit.wav", "", function(snd)
  5809.                 if (IsValid(snd)) then snd:Play() end
  5810.             end)
  5811.         end
  5812.     end
  5813. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement