LunaScripts

(gmod) Smeg hack

Mar 14th, 2016
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Variables
  2. local SmegHack = {}
  3. SmegHack.FriendsList = {}
  4. SmegHack.TextEntries = {}
  5. SmegHack.Hooks = {}
  6. SmegHack.EntityESP = {}
  7. SmegHack.BoneOrder = {}
  8. SmegHack.Traitors = {}
  9. SmegHack.Murderers = {}
  10.  
  11. SmegHack.Options = {}
  12.  
  13. SmegHack.Options["Aimbot_Toggle"] = false
  14. SmegHack.Options["Aimbot_LOSCheck"] = false
  15. SmegHack.Options["Aimbot_AutoWall"] = true
  16. SmegHack.Options["Aimbot_AimOnKey"] = false
  17. SmegHack.Options["Aimbot_AimOnKey_Key"] = 0
  18. SmegHack.Options["Aimbot_SmoothAim"] = false
  19. SmegHack.Options["Aimbot_SmoothAim_Value"] = 600
  20. SmegHack.Options["Aimbot_AimPriority"] = "Distance"
  21. SmegHack.Options["Aimbot_FOV"] = false
  22. if LocalPlayer():GetFOV() != nil then SmegHack.Options["Aimbot_FOV_Value"] = LocalPlayer():GetFOV() else SmegHack.Options["Aimbot_FOV_Value"] = 75 end
  23. SmegHack.Options["Aimbot_StickToTarget"] = false
  24. SmegHack.Options["Aimbot_BoneAim"] = false
  25. SmegHack.Options["Aimbot_AutoShoot"] = false
  26.  
  27. SmegHack.Options["Aimbot_AimTeam"] = false
  28. SmegHack.Options["Aimbot_AimOpponents"] = true
  29. SmegHack.Options["Aimbot_AimFriends"] = false
  30. SmegHack.Options["Aimbot_AimEnemies"] = false
  31. SmegHack.Options["Aimbot_AimNPCs"] = false
  32. SmegHack.Options["Aimbot_AimSpectators"] = false
  33. SmegHack.Options["Aimbot_AimTeamV"] = "Aim"
  34. SmegHack.Options["Aimbot_AimOpponentsV"] = "Aim"
  35. SmegHack.Options["Aimbot_AimFriendsV"] = "Aim"
  36. SmegHack.Options["Aimbot_AimEnemiesV"] = "Aim"
  37. SmegHack.Options["Aimbot_AimNPCsV"] = "Aim"
  38. SmegHack.Options["Aimbot_AimSpectatorsV"] = "Aim"
  39.  
  40. SmegHack.Options["Aimbot_OffsetX"] = 0
  41. SmegHack.Options["Aimbot_OffsetY"] = 0
  42.  
  43. SmegHack.Options["ESP_Toggle"] = false
  44. SmegHack.Options["ESP_ShowTeam"] = true
  45. SmegHack.Options["ESP_ShowOpponents"] = true
  46. SmegHack.Options["ESP_ShowFriends"] = false
  47. SmegHack.Options["ESP_ShowEnemies"] = false
  48. SmegHack.Options["ESP_ShowNPCs"] = false
  49. SmegHack.Options["ESP_ShowSpectators"] = false
  50.  
  51. SmegHack.Options["ESP_ShowTeamV"] = "Show"
  52. SmegHack.Options["ESP_ShowOpponentsV"] = "Show"
  53. SmegHack.Options["ESP_ShowFriendsV"] = "Show"
  54. SmegHack.Options["ESP_ShowEnemiesV"] = "Show"
  55. SmegHack.Options["ESP_ShowNPCsV"] = "Show"
  56. SmegHack.Options["ESP_ShowSpectatorsV"] = "Show"
  57.  
  58. SmegHack.Options["ESP_Entity_Toggle"] = false
  59. SmegHack.Options["ESP_Entities_NameTags"] = false
  60. SmegHack.Options["ESP_Entities_BoundaryBoxes"] = false
  61. SmegHack.Options["ESP_Entities_BoundaryBoxes_Mode"] = "2D"
  62.  
  63. SmegHack.Options["ESP_BoundaryBoxes"] = false
  64. SmegHack.Options["ESP_BoundaryBoxes_Mode"] = "2D"
  65. SmegHack.Options["ESP_NameTags"] = false
  66. SmegHack.Options["ESP_Weapon"] = false
  67. SmegHack.Options["ESP_Distance"] = false
  68. SmegHack.Options["ESP_Health"] = false
  69. SmegHack.Options["ESP_Skeleton"] = false
  70. SmegHack.Options["ESP_Crosshair"] = false
  71. SmegHack.Options["ESP_Crosshair_Size"] = 50
  72. SmegHack.Options["ESP_Crosshair_Mode"] = "Team"
  73. SmegHack.Options["ESP_Crosshair_Color_R"] = 0
  74. SmegHack.Options["ESP_Crosshair_Color_G"] = 0
  75. SmegHack.Options["ESP_Crosshair_Color_B"] = 255
  76. SmegHack.Options["ESP_Crosshair_Color_A"] = 255
  77.  
  78. SmegHack.Options["Misc_Clock"] = false
  79. SmegHack.Options["Misc_Clock_Mode"] = "Fast"
  80. if GetConVarNumber("host_timescale") != nil then SmegHack.Options["Misc_Clock_Speed"] = GetConVarNumber("host_timescale") else SmegHack.Options["Misc_Clock_Speed"] = 1 end
  81. SmegHack.Options["Misc_AdminBox"] = false
  82. SmegHack.Options["Misc_AdminBox_Mode"] = "Auto"
  83. SmegHack.Options["Misc_AdminBox_PosX"] = 0
  84. SmegHack.Options["Misc_AdminBox_PosY"] = 0
  85. SmegHack.Options["Misc_SpectatorsBox"] = false
  86. SmegHack.Options["Misc_SpectatorsBox_Mode"] = "Auto"
  87. SmegHack.Options["Misc_SpectatorsBox_PosX"] = 150
  88. SmegHack.Options["Misc_SpectatorsBox_PosY"] = 0
  89. SmegHack.Options["Misc_AutoButton"] = false
  90.  
  91. SmegHack.Options["Friends_FriendIsEnemy"] = false
  92. SmegHack.Options["Friends_SteamFriends"] = false
  93. SmegHack.Options["Friends_SteamEnemies"] = false
  94.  
  95. SmegHack.Options["Cams_Toggle"] = false
  96. SmegHack.Options["Cams_CSNoclip"] = false
  97. SmegHack.Options["Cams_CSNoclip_Speed"] = 10
  98. SmegHack.Options["Cams_ThirdPerson"] = false
  99. SmegHack.Options["Cams_ThirdPerson_Zoom"] = 30
  100.  
  101. SmegHack.Options["Bhop_Toggle"] = false
  102. SmegHack.Options["Bhop_FastWalk"] = false
  103. SmegHack.Options["Bhop_AutoHop"] = false
  104. SmegHack.Options["Bhop_AutoStrafe"] = false
  105. SmegHack.Options["Bhop_EdgeJump"] = false
  106. SmegHack.Options["Bhop_EdgeJump_Distance"] = 40
  107. SmegHack.Options["Bhop_Sideways"] = false
  108. SmegHack.Options["Bhop_WOnly"] = false
  109.  
  110. SmegHack.Options["Spam_Toggle"] = false
  111. SmegHack.Options["Spam_Delay"] = false
  112. SmegHack.Options["Spam_Delay_Value"] = 10
  113. SmegHack.Options["Spam_AntiAntiSpam"] = false
  114. SmegHack.Options["Spam_Message_1"] = false
  115. SmegHack.Options["Spam_Message_2"] = false
  116. SmegHack.Options["Spam_Message_3"] = false
  117. SmegHack.Options["Spam_Message_4"] = false
  118. SmegHack.Options["Spam_Message_5"] = false
  119.  
  120.  
  121. local function RandomString() return tostring(math.random(-9999999999, 9999999999)) end
  122. local function RandomShortString() return tostring(math.random(0, 100)) end
  123. local MenuOpen = false
  124. local UpdateBoneThink = false
  125. local UpdateBoneThinkNum = 0
  126. local NormSvCheats, NormHostTimeScale, TimeScaleChange = 0, 1, false
  127. local FPSValue = 0
  128. local DisplayBoxWidths = 0
  129. local AdminsListBool = false
  130. local SpecsListBool = false
  131. local AdminBoxTall, AdminBoxWide, SpecBoxTall, SpecBoxWide = 0, 0, 0, 0
  132. local GMode
  133. local MDone = false
  134. if string.find(string.lower(GAMEMODE.Name), "terror") != nil then
  135.     GMode = 1
  136. elseif string.find(string.lower(GAMEMODE.Name), "murder") != nil then
  137.     GMode = 2
  138. else
  139.     GMode = 3
  140. end
  141.  
  142. //Fonts
  143. surface.CreateFont("Menu_Title",{font = "coolvetica", size = 25})
  144. surface.CreateFont("ESP_Font_Main",{font = "coolvetica", size = 20})
  145. surface.CreateFont("ESP_Font_Entity",{font = "coolvetica", size = 17})
  146. surface.CreateFont("ESP_Font_Health",{font = "coolvetica", size = 12})
  147. surface.CreateFont("Cams",{font = "Arial", size = 25})
  148.  
  149. //Hack Management
  150. function AddHook( NormID, Event, ID, Function )
  151.     table.insert( SmegHack.Hooks, NormID.."|"..Event.."|"..ID )
  152.     hook.Add( Event, ID, Function )
  153. end
  154.  
  155. function RemoveHook( NormID )
  156.     for k, v in pairs( SmegHack.Hooks ) do
  157.         local SubTable = string.Explode( "|", v )
  158.         if SubTable[1] == NormID then
  159.             hook.Remove( SubTable[2], SubTable[3] )
  160.             table.remove( SmegHack.Hooks, k )
  161.         end
  162.     end
  163. end
  164.  
  165. function GetTeam( Ply )
  166.     local Team = Ply:Team()
  167.     local t, c
  168.     if GMode == 1 then
  169.         if Team == TEAM_SPECTATOR then
  170.             t = Team
  171.             c = team.GetColor(Team)
  172.         else
  173.             if table.HasValue(SmegHack.Traitors, Ply:SteamID()) then
  174.                 t = 1
  175.                 c = Color(255,0,0)
  176.             elseif Ply:GetRole() == 2 then
  177.                 t = 0
  178.                 c = Color(0,0,255)
  179.             else
  180.                 t = 0
  181.                 c = Color(0,255,0)
  182.             end
  183.         end
  184.     elseif GMode == 2 then
  185.         if Team == TEAM_SPECTATOR then
  186.             t = Team
  187.             c = team.GetColor(Team)
  188.         else
  189.             if table.HasValue(SmegHack.Murderers, Ply:SteamID()) then
  190.                 t = 2
  191.                 c = Color(255,0,0)
  192.             else
  193.                 t = 1
  194.                 local Moo = false
  195.                 for k, v in pairs(Ply:GetWeapons()) do
  196.                     if v:GetClass() == "weapon_mu_magnum" then
  197.                         Moo = true
  198.                         break
  199.                     end
  200.                 end
  201.                 if Moo == true then
  202.                     c = Color(0,0,255)
  203.                 else
  204.                     c = Color(0,255,0)
  205.                 end
  206.             end
  207.         end
  208.     else
  209.         t = Team
  210.         c = team.GetColor(Team)
  211.     end
  212.     return t, c
  213. end
  214.  
  215. function UnloadSmegHack( Display )
  216.     //Menu
  217.     concommand.Remove("SmegHack_Menu")
  218.  
  219.     //Hooks
  220.     SmegHack.Options["Misc_AdminBox"] = false
  221.     SmegHack.Options["Misc_SpectatorsBox"] = false //These remove the admin/spectator boxes
  222.  
  223.     timer.Simple( 0.5, function()
  224.         for k, v in pairs( SmegHack.Hooks ) do
  225.             local SubTable = string.Explode( "|", v )
  226.             hook.Remove( SubTable[2], SubTable[3] )
  227.         end
  228.         table.Empty( SmegHack.Hooks )
  229.  
  230.         //Clock Speed Manipulator
  231.         if GetConVarNumber("sv_cheats") != NormSvCheats then LocalPlayer():ConCommand("incrementvar sv_cheats "..NormSvCheats.." "..NormSvCheats.." "..NormSvCheats) end
  232.         if GetConVarNumber("host_timescale") != NormHostTimeScale then LocalPlayer():ConCommand("incrementvar host_timescale "..NormHostTimeScale.." "..NormHostTimeScale.." "..NormHostTimeScale) end
  233.         if Display then
  234.             AddHook( "Unloaded", "HUDPaint", RandomString(), function()
  235.                 draw.SimpleTextOutlined( "Smeg Hack Unloaded Successfully!", "Menu_Title", ScrW()/2, 50, Color(0,150,150), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color(0,0,0) )
  236.                 timer.Simple( 3, function()
  237.                     RemoveHook("Unloaded")
  238.                 end)
  239.             end)
  240.         end
  241.     end)
  242. end
  243.  
  244. function ReloadSmegHack( Display )
  245.     local Admin = SmegHack.Options["Misc_AdminBox"]
  246.     local Spec = SmegHack.Options["Misc_SpectatorsBox"]
  247.     UnloadSmegHack()
  248.     timer.Simple( 0.5, function()
  249.         LoadSmegHack()
  250.         if Admin then
  251.             SmegHack.Options["Misc_AdminBox"] = true
  252.             AddDisplayBox( "Admins", 1 )
  253.         end
  254.         if Spec then
  255.             SmegHack.Options["Misc_SpectatorsBox"] = true
  256.             AddDisplayBox( "Spectators", 2 )
  257.         end
  258.         LocalPlayer():ConCommand("SmegHack_Menu")
  259.         if Display then
  260.             AddHook( "Reloaded", "HUDPaint", RandomString(), function()
  261.                 draw.SimpleTextOutlined( "Smeg Hack Reloaded Successfully!", "Menu_Title", ScrW()/2, 50, Color(0,150,150), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color(0,0,0) )
  262.                 timer.Simple( 3, function()
  263.                     RemoveHook("Reloaded")
  264.                 end)
  265.             end)
  266.         end
  267.     end)
  268. end
  269.  
  270. function LoadSmegHack( Display )
  271.     //Commands
  272.     CreateClientConVar("SmegHack_Panic", 0, false, false)
  273.     concommand.Add("SmegHack_Menu", SmegHackMenu)
  274.  
  275.     local EntTable = ents.GetAll()
  276.     local FastWalk = false
  277.     local MenuDelay, FPSDelay = false, false
  278.     local ForwardMove = 0
  279.     local SideMove = 0
  280.     local TapS = false
  281.     local WLeft, WRight, WForward, WBack, WActive = false, false, true, false, false
  282.     local NoclipPos, NoclipAngles, NoclipOn, NoclipX, NoclipY, NoclipDuck, NoclipJump = LocalPlayer():EyePos(), LocalPlayer():GetAngles(), false, 0, 0, false, false
  283.     local ScaleActive, ScaleNum = false, 1
  284.     local SpamWait, Spam1, Spam2, Spam3, Spam4, Spam5 = false, false, false, false, false, false
  285.    
  286.     //Hooks
  287.     AddHook( "Menu", "Think", RandomString(), function()
  288.         if input.IsKeyDown(KEY_INSERT) && !MenuDelay then
  289.             MenuDelay = true
  290.             SmegHackMenu()
  291.             timer.Simple( 0.5, function() MenuDelay = false end )
  292.         end
  293.  
  294.         //For FPS
  295.         if FPSDelay == false then
  296.             FPSDelay = true
  297.             timer.Simple( 0.5, function() FPSValue = math.Round(1/RealFrameTime()) FPSDelay = false end )
  298.         end
  299.  
  300.         //For Time Scale
  301.         if SmegHack.Options["Misc_Clock"] && GetConVarNumber("SmegHack_Panic") == 0 then
  302.             if GetConVarNumber("sv_cheats") != 1 then LocalPlayer():ConCommand("incrementvar sv_cheats 1 1 1") end
  303.             if SmegHack.Options["Misc_Clock_Speed"] != ScaleNum || !ScaleActive || TimeScaleChange then
  304.                 local k
  305.                 if SmegHack.Options["Misc_Clock_Mode"] == "Slow" then k = 1-(SmegHack.Options["Misc_Clock_Speed"]/10) else k = SmegHack.Options["Misc_Clock_Speed"] end
  306.                 LocalPlayer():ConCommand("incrementvar host_timescale "..k.." "..k.." "..k) //Sozz, but I had to add kkk in somewhere :P
  307.                 ScaleNum = k
  308.                 if !ScaleActive then ScaleActive = true end
  309.             end
  310.         elseif SmegHack.Options["Misc_Clock"] && GetConVarNumber("SmegHack_Panic") == 1 then
  311.             if ScaleActive then
  312.                 LocalPlayer():ConCommand("incrementvar sv_cheats "..NormSvCheats.." "..NormSvCheats.." "..NormSvCheats)
  313.                 LocalPlayer():ConCommand("incrementvar host_timescale "..NormHostTimeScale.." "..NormHostTimeScale.." "..NormHostTimeScale)
  314.                 ScaleActive = false
  315.             end
  316.         end
  317.         //Reset T Round
  318.         if GMode == 1 then
  319.             if GetRoundState() != 3 then
  320.                 table.Empty(SmegHack.Traitors)
  321.             else
  322.                 for k, v in pairs(player.GetAll()) do
  323.                     local Ply = v
  324.                     local Team = Ply:GetRole()
  325.                     if Team == 2 then return end
  326.                     if LocalPlayer():GetRole() != 1 then
  327.                         for k, v in pairs(Ply:GetWeapons()) do
  328.                             if table.HasValue(v.CanBuy, 1) && !table.HasValue(SmegHack.Traitors, Ply:SteamID()) then
  329.                                 table.insert(SmegHack.Traitors, Ply:SteamID())
  330.                             end
  331.                         end
  332.                     else
  333.                         if Team == 1 && !table.HasValue(SmegHack.Traitors, Ply:SteamID()) then
  334.                             table.insert(SmegHack.Traitors, Ply:SteamID())
  335.                         end
  336.                     end
  337.                 end
  338.             end
  339.         elseif GMode == 2 then
  340.             if !MDone then
  341.                 for k, v in pairs(ents.GetAll()) do
  342.                     if v:GetClass() == "weapon_mu_knife" then
  343.                         table.insert(SmegHack.Murderers, v:GetOwner():SteamID())
  344.                     end
  345.                 end
  346.                 MDone = true
  347.             else
  348.                 for k, v in pairs(ents.GetAll()) do
  349.                     if v:GetClass() == "weapon_mu_knife" then
  350.                         if !table.HasValue(SmegHack.Murderers, v:GetOwner():SteamID()) then
  351.                             table.Empty(SmegHack.Murderers)
  352.                             MDone = false
  353.                         end
  354.                     end
  355.                 end
  356.             end
  357.         end
  358.     end)
  359.  
  360.     AddHook( "Aimbot", "Think", RandomString(), function()
  361.         if GetConVarNumber("SmegHack_Panic") == 0 && SmegHack.Options["Aimbot_Toggle"] && !MenuOpen && !(SmegHack.Options["Cams_Toggle"] && SmegHack.Options["Cams_CSNoclip"]) then
  362.             if !SmegHack.Options["Aimbot_AimOnKey"] || ( ( ( SmegHack.Options["Aimbot_AimOnKey_Key"] >= 107 && SmegHack.Options["Aimbot_AimOnKey_Key"] <= 113 ) && input.IsMouseDown(SmegHack.Options["Aimbot_AimOnKey_Key"]) ) || input.IsKeyDown(SmegHack.Options["Aimbot_AimOnKey_Key"]) ) then
  363.                 local FinAngleP
  364.                 local AimSpotT = {}
  365.                 local PlayerDistance, NewPlayerDistance, MousePos, NewMousePos = math.huge, math.huge, math.huge, math.huge
  366.                 if !SmegHack.Options["Aimbot_StickToTarget"] then EntTable = ents.GetAll() end
  367.                 for k, v in pairs(EntTable) do
  368.                     if v != LocalPlayer() && v:IsValid() && v:Health() > 0 && ( v:IsNPC() || v:IsPlayer() ) then
  369.                         local Ent = v
  370.                         local AimTeam, AimOpponents, AimFriends, AimEnemies, AimSpectators, AimNPCs = false, false, false, false, false, false
  371.                         local AimTeamV, AimOpponentsV, AimFriendsV, AimEnemiesV, AimSpectatorsV, AimNPCsV = true, true, true, true, true, true
  372.                         if !Ent:IsNPC() then
  373.                             local Team, _ = GetTeam(Ent)
  374.                             if Ent:Team() != TEAM_SPECTATOR && SmegHack.Options["Aimbot_AimTeam"] && Team == GetTeam(LocalPlayer()) then
  375.                                 if SmegHack.Options["Aimbot_AimTeamV"] == "Aim" then
  376.                                     AimTeam = true
  377.                                 else
  378.                                     AimTeamV = false
  379.                                 end
  380.                             end
  381.                             if Ent:Team() != TEAM_SPECTATOR && SmegHack.Options["Aimbot_AimOpponents"] && Team != GetTeam(LocalPlayer()) then
  382.                                 if SmegHack.Options["Aimbot_AimOpponentsV"] == "Aim" then
  383.                                     AimOpponents = true
  384.                                 else
  385.                                     AimOpponentsV = false
  386.                                 end
  387.                             end
  388.                             if Ent:Team() != TEAM_SPECTATOR && SmegHack.Options["Aimbot_AimFriends"] && ( (!SmegHack.Options["Friends_FriendIsEnemy"] && table.HasValue( SmegHack.FriendsList, Ent:SteamID() ) ) || (SmegHack.Options["Friends_FriendIsEnemy"] && !table.HasValue( SmegHack.FriendsList, Ent:SteamID() ) ) ) then
  389.                                 if SmegHack.Options["Aimbot_AimFriendsV"] == "Aim" then
  390.                                     AimFriends = true
  391.                                 else
  392.                                     AimFriendsV = false
  393.                                 end
  394.                             end
  395.                             if Ent:Team() != TEAM_SPECTATOR && SmegHack.Options["Aimbot_AimEnemies"] && ( (!SmegHack.Options["Friends_FriendIsEnemy"] && !table.HasValue( SmegHack.FriendsList, Ent:SteamID() ) ) || (SmegHack.Options["Friends_FriendIsEnemy"] && table.HasValue( SmegHack.FriendsList, Ent:SteamID() ) ) ) then
  396.                                 if SmegHack.Options["Aimbot_AimEnemiesV"] == "Aim" then
  397.                                     AimEnemies = true
  398.                                 else
  399.                                     AimEnemiesV = false
  400.                                 end
  401.                             end
  402.                             if SmegHack.Options["Aimbot_AimSpectators"] && Ent:Team() == TEAM_SPECTATOR then
  403.                                 if SmegHack.Options["AimSpectatorsV"] == "Aim" then
  404.                                     AimSpectators = true
  405.                                 else
  406.                                     AimSpectatorsV = false
  407.                                 end
  408.                             end
  409.                         else
  410.                             if SmegHack.Options["Aimbot_AimNPCs"] && SmegHack.Options["Aimbot_AimNPCsV"] == "Aim" then
  411.                                 if SmegHack.Options["Aimbot_AimNPCsV"] == "Aim" then
  412.                                     AimNPCs = true
  413.                                 else
  414.                                     AimNPCsV = false
  415.                                 end
  416.                             end
  417.                         end
  418.                         if (AimTeam || AimOpponents || AimFriends || AimEnemies || AimSpectators || AimNPCs) && (AimTeamV && AimOpponentsV && AimFriendsV && AimEnemiesV && AimSpectatorsV && AimNPCsV) then
  419.                             local LOS, AimP, AimF = false, false, false
  420.                             local AimSpot
  421.  
  422.                             if SmegHack.Options["Aimbot_BoneAim"] && SmegHack.BoneOrder[1] != nil then
  423.                                 table.Empty( AimSpotT )
  424.                                 for k, v in pairs(SmegHack.BoneOrder) do
  425.                                     if Ent:GetBonePosition(Ent:LookupBone(v)) != nil && AimSpot == nil then
  426.                                         AimSpot = Ent:GetBonePosition(Ent:LookupBone(v))
  427.                                     end
  428.                                     if Ent:GetBonePosition(Ent:LookupBone(v)) != nil then
  429.                                         local BonePos = Ent:GetBonePosition(Ent:LookupBone(v))
  430.                                         if v == "ValveBiped.Bip01_Head1" then BonePos = BonePos+Vector(0,0,1) end
  431.                                         table.insert( AimSpotT, BonePos )
  432.                                     end
  433.                                 end
  434.                                 if AimSpot == nil then AimSpot = Ent:LocalToWorld(Ent:OBBCenter()) end
  435.                                 if AimSpotT == nil then AimSpotT = {Ent:LocalToWorld(Ent:OBBCenter())} end
  436.                             else
  437.                                 AimSpot = Ent:LocalToWorld(Ent:OBBCenter())
  438.                                 AimSpotT = {Ent:LocalToWorld(Ent:OBBCenter())}
  439.                             end
  440.  
  441.                             local CurAngle = LocalPlayer():EyeAngles()
  442.                             local CurPos = LocalPlayer():GetShootPos()
  443.  
  444.                             AimSpot = AimSpot+(CurAngle:Right()*SmegHack.Options["Aimbot_OffsetX"]) //This is screw up when close to your target
  445.                             AimSpot.z = AimSpot.z + SmegHack.Options["Aimbot_OffsetY"]
  446.  
  447.                             local FinAngle = ( AimSpot - CurPos ):Angle()
  448.                             if FinAngle.y > 180 then
  449.                                 FinAngle.y = FinAngle.y-360
  450.                             end
  451.  
  452.                             if SmegHack.Options["Aimbot_AimPriority"] == "Distance" then
  453.                                 if LocalPlayer():GetShootPos():Distance(AimSpot) < PlayerDistance then NewPlayerDistance = LocalPlayer():GetShootPos():Distance(AimSpot) AimP = true end
  454.                             elseif SmegHack.Options["Aimbot_AimPriority"] == "Crosshair" then
  455.                                 local FirstCalc = math.Distance( CurAngle.x, CurAngle.y, FinAngle.x, FinAngle.y )
  456.                                 local Calc
  457.                                 if FirstCalc > 180 && ( ( CurAngle.y >= 0 && FinAngle.y < 0 ) || ( CurAngle.y < 0 && FinAngle.y >= 0 ) ) then
  458.                                     Calc = 360 - math.Distance( CurAngle.x, CurAngle.y, FinAngle.x, FinAngle.y )
  459.                                 else
  460.                                     Calc = math.Distance( CurAngle.x, CurAngle.y, FinAngle.x, FinAngle.y )
  461.                                 end
  462.                                 if Calc < MousePos then NewMousePos = Calc AimP = true end
  463.                             end
  464.  
  465.                             if SmegHack.Options["Aimbot_FOV"] then
  466.                                 local CalcX = FinAngle.y - CurAngle.y
  467.                                 local CalcY = FinAngle.x - CurAngle.x
  468.                                 if CalcY < 0 then CalcY = CalcY * -1 end
  469.                                 if CalcX < 0 then CalcX = CalcX * -1 end
  470.                                 if CalcY > 180 then CalcY = 360 - CalcY end
  471.                                 if CalcX > 180 then CalcX = 360 - CalcX end
  472.                                 if CalcX <= SmegHack.Options["Aimbot_FOV_Value"]/2 && CalcY <= SmegHack.Options["Aimbot_FOV_Value"]*0.4 then AimF = true end
  473.                             else
  474.                                 AimF = true
  475.                             end
  476.  
  477.                             if SmegHack.Options["Aimbot_LOSCheck"] || SmegHack.Options["Aimbot_AutoWall"] then
  478.                                 for k, v in pairs(AimSpotT) do
  479.                                     local TrLOS = {}
  480.                                     TrLOS.start = LocalPlayer():GetShootPos()
  481.                                     TrLOS.endpos = v
  482.                                     TrLOS.filter = {}
  483.                                     if SmegHack.Options["Aimbot_StickToTarget"] then
  484.                                         for k, v in pairs(ents.GetAll()) do
  485.                                             if v:IsValid() && ( v:IsPlayer() || v:IsNPC() ) then
  486.                                                 table.insert( TrLOS.filter, v )
  487.                                             end
  488.                                         end
  489.                                     else TrLOS.filter = {LocalPlayer(), Ent} end
  490.                                     if SmegHack.Options["Aimbot_AutoWall"] then TrLOS.mask = MASK_SHOT else TrLOS.mask = MASK_VISIBLE_AND_NPCS end
  491.                                     if util.TraceLine(TrLOS).Fraction == 1 then
  492.                                         LOS = true
  493.                                         AimSpot = v
  494.                                         break
  495.                                     end
  496.                                 end
  497.                             else
  498.                                 LOS = true
  499.                             end
  500.                             if LOS && AimP && AimF then
  501.                                 EntTable = {Ent}
  502.                                 FinAngleP = FinAngle
  503.                                 PlayerDistance = NewPlayerDistance
  504.                                 MousePos = NewMousePos
  505.                             elseif SmegHack.Options["Aimbot_StickToTarget"] && EntTable[2] != nil then
  506.                                 EntTable = ents.GetAll()
  507.                             end
  508.                         end
  509.                     end
  510.                 end
  511.                 if EntTable != nil && FinAngleP != nil then
  512.                     if SmegHack.Options["Aimbot_SmoothAim"] then
  513.                         SmoothAngles( FinAngleP, SmegHack.Options["Aimbot_SmoothAim_Value"] )
  514.                     else
  515.                         if SmegHack.Options["Aimbot_AutoShoot"] then
  516.                             LocalPlayer():SetEyeAngles(FinAngleP)
  517.                             LocalPlayer():ConCommand("+attack")
  518.                             timer.Simple( 0.1, function() LocalPlayer():ConCommand("-attack") end )
  519.                         else
  520.                             LocalPlayer():SetEyeAngles(FinAngleP)
  521.                         end
  522.                     end
  523.                 elseif EntTable[2] == nil then
  524.                     EntTable = ents.GetAll()
  525.                 end
  526.             else
  527.                 if EntTable[2] == nil then
  528.                     EntTable = ents.GetAll()
  529.                 end
  530.             end
  531.         end
  532.     end)
  533.     AddHook( "ChatSpam", "Think", RandomString(), function()
  534.         if GetConVarNumber("SmegHack_Panic") == 0 then
  535.             if !SpamWait then
  536.                 if SmegHack.Options["Spam_Toggle"] then
  537.                     if SmegHack.Options["Spam_Delay"] then
  538.                         SpamWait = true
  539.                         Spam1, Spam2, Spam3, Spam4, Spam5 = false, false, false, false, false
  540.                         local Timer = SmegHack.Options["Spam_Delay_Value"]
  541.                         if SmegHack.Options["Spam_Message_1"] && SmegHack.TextEntries["Spam1"] != nil then
  542.                             local String = SmegHack.TextEntries["Spam1"]
  543.                             if SmegHack.Options["Spam_AntiAntiSpam"] then String = String.." ("..RandomShortString()..")" end
  544.                             timer.Simple( Timer, function()
  545.                                 LocalPlayer():ConCommand("say "..String)
  546.                                 Spam1 = true
  547.                             end)
  548.                             Timer = Timer + SmegHack.Options["Spam_Delay_Value"]
  549.                         else Spam1 = true end
  550.  
  551.                         if SmegHack.Options["Spam_Message_2"] && SmegHack.TextEntries["Spam2"] != nil then
  552.                             local String = SmegHack.TextEntries["Spam2"]
  553.                             if SmegHack.Options["Spam_AntiAntiSpam"] then String = String.." ("..RandomShortString()..")" end
  554.                             timer.Simple( Timer, function()
  555.                                 LocalPlayer():ConCommand("say "..String)
  556.                                 Spam2 = true
  557.                             end)
  558.                             Timer = Timer + SmegHack.Options["Spam_Delay_Value"]
  559.                         else Spam2 = true end
  560.  
  561.                         if SmegHack.Options["Spam_Message_3"] && SmegHack.TextEntries["Spam3"] != nil then
  562.                             local String = SmegHack.TextEntries["Spam3"]
  563.                             if SmegHack.Options["Spam_AntiAntiSpam"] then String = String.." ("..RandomShortString()..")" end
  564.                             timer.Simple( Timer, function()
  565.                                 LocalPlayer():ConCommand("say "..String)
  566.                                 Spam3 = true
  567.                             end)
  568.                             Timer = Timer + SmegHack.Options["Spam_Delay_Value"]
  569.                         else Spam3 = true end
  570.  
  571.                         if SmegHack.Options["Spam_Message_4"] && SmegHack.TextEntries["Spam4"] != nil then
  572.                             local String = SmegHack.TextEntries["Spam4"]
  573.                             if SmegHack.Options["Spam_AntiAntiSpam"] then String = String.." ("..RandomShortString()..")" end
  574.                             timer.Simple( Timer, function()
  575.                                 LocalPlayer():ConCommand("say "..String)
  576.                                 Spam4 = true
  577.                             end)
  578.                             Timer = Timer + SmegHack.Options["Spam_Delay_Value"]
  579.                         else Spam4 = true end
  580.  
  581.                         if SmegHack.Options["Spam_Message_5"] && SmegHack.TextEntries["Spam5"] != nil then
  582.                             local String = SmegHack.TextEntries["Spam5"]
  583.                             if SmegHack.Options["Spam_AntiAntiSpam"] then String = String.." ("..RandomShortString()..")" end
  584.                             timer.Simple( Timer, function()
  585.                                 LocalPlayer():ConCommand("say "..String)
  586.                                 Spam5 = true
  587.                             end)
  588.                             Timer = Timer + SmegHack.Options["Spam_Delay_Value"]
  589.                         else Spam5 = true end
  590.                     else
  591.                         if SmegHack.Options["Spam_Message_1"] && SmegHack.TextEntries["Spam1"] != nil then
  592.                             local String = SmegHack.TextEntries["Spam1"]
  593.                             if SmegHack.Options["Spam_AntiAntiSpam"] then String = String.." ("..RandomShortString()..")" end
  594.                             LocalPlayer():ConCommand("say "..String)
  595.                         end
  596.                         if SmegHack.Options["Spam_Message_1"] && SmegHack.TextEntries["Spam2"] != nil then
  597.                             local String = SmegHack.TextEntries["Spam2"]
  598.                             if SmegHack.Options["Spam_AntiAntiSpam"] then String = String.." ("..RandomShortString()..")" end
  599.                             LocalPlayer():ConCommand("say "..String)
  600.                         end
  601.                         if SmegHack.Options["Spam_Message_1"] && SmegHack.TextEntries["Spam3"] != nil then
  602.                             local String = SmegHack.TextEntries["Spam3"]
  603.                             if SmegHack.Options["Spam_AntiAntiSpam"] then String = String.." ("..RandomShortString()..")" end
  604.                             LocalPlayer():ConCommand("say "..String)
  605.                         end
  606.                         if SmegHack.Options["Spam_Message_1"] && SmegHack.TextEntries["Spam4"] != nil then
  607.                             local String = SmegHack.TextEntries["Spam4"]
  608.                             if SmegHack.Options["Spam_AntiAntiSpam"] then String = String.." ("..RandomShortString()..")" end
  609.                             LocalPlayer():ConCommand("say "..String)
  610.                         end
  611.                         if SmegHack.Options["Spam_Message_1"] && SmegHack.TextEntries["Spam5"] != nil then
  612.                             local String = SmegHack.TextEntries["Spam5"]
  613.                             if SmegHack.Options["Spam_AntiAntiSpam"] then String = String.." ("..RandomShortString()..")" end
  614.                             LocalPlayer():ConCommand("say "..String)
  615.                         end
  616.                     end
  617.                 end
  618.             else
  619.                 if Spam1 && Spam2 && Spam3 && Spam4 && Spam5 then SpamWait = false end
  620.             end
  621.         end
  622.     end)
  623.     AddHook( "ESP", "HUDPaint", RandomString(), function()
  624.         if GetConVarNumber("SmegHack_Panic") == 0 then
  625.             if SmegHack.Options["Cams_Toggle"] && SmegHack.Options["Cams_CSNoclip"] then
  626.                 local MaxX, MaxY, MinX, MinY = ESPGetPos( LocalPlayer() )
  627.                 local Dist = math.floor(LocalPlayer():GetPos():Distance(NoclipPos)/40)
  628.                 draw.SimpleTextOutlined( "You are here ".."["..Dist.."]", "Cams", ((MaxX-MinX)/2)+MinX, MinY-5, Color(0,150,250), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, Color(0,0,0) )
  629.                 surface.SetDrawColor( Color(0,0,255) )
  630.                 surface.DrawLine( MaxX, MaxY, MinX, MaxY )
  631.                 surface.DrawLine( MaxX, MaxY, MaxX, MinY )
  632.                 surface.DrawLine( MinX, MinY, MaxX, MinY )
  633.                 surface.DrawLine( MinX, MinY, MinX, MaxY )
  634.             end
  635.             if SmegHack.Options["ESP_Toggle"] || SmegHack.Options["ESP_Entity_Toggle"] then
  636.                 for k, v in pairs( ents.GetAll() ) do
  637.                     if v:IsValid() && v != LocalPlayer() && !v:IsDormant() then
  638.                         local Ent = v
  639.                         if SmegHack.Options["ESP_Entity_Toggle"] then
  640.                             for k, v in pairs( SmegHack.EntityESP ) do
  641.                                 if v == Ent:GetClass() && Ent:GetOwner() != LocalPlayer()  then
  642.                                     local MaxX, MaxY, MinX, MinY, V1, V2, V3, V4, V5, V6, V7, V8 = ESPGetPos( Ent )
  643.                                     if SmegHack.Options["ESP_Entities_NameTags"] == true then
  644.                                         local Name = Ent:GetClass()
  645.                                         local Dist = math.floor(Ent:GetPos():Distance(LocalPlayer():GetShootPos())/40)
  646.                                         draw.SimpleTextOutlined( Name.." ["..Dist.."]", "ESP_Font_Entity", ((MaxX-MinX)/2)+MinX, MinY-5, Color(0,160,240), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, Color(0,0,0) )
  647.                                     end
  648.                                     if SmegHack.Options["ESP_Entities_BoundaryBoxes"] == true then
  649.                                         surface.SetDrawColor( Color(0,160,240) )
  650.                                         if SmegHack.Options["ESP_Entities_BoundaryBoxes_Mode"] == "2D" then
  651.                                             surface.DrawLine( MaxX, MaxY, MinX, MaxY )
  652.                                             surface.DrawLine( MaxX, MaxY, MaxX, MinY )
  653.                                             surface.DrawLine( MinX, MinY, MaxX, MinY )
  654.                                             surface.DrawLine( MinX, MinY, MinX, MaxY )
  655.                                         else
  656.                                             //Top Box
  657.                                             surface.DrawLine( V4.x, V4.y, V6.x, V6.y )
  658.                                             surface.DrawLine( V1.x, V1.y, V8.x, V8.y )
  659.                                             surface.DrawLine( V6.x, V6.y, V8.x, V8.y )
  660.                                             surface.DrawLine( V4.x, V4.y, V1.x, V1.y )
  661.  
  662.                                             //Bottom Box
  663.                                             surface.DrawLine( V3.x, V3.y, V5.x, V5.y )
  664.                                             surface.DrawLine( V2.x, V2.y, V7.x, V7.y )
  665.                                             surface.DrawLine( V3.x, V3.y, V2.x, V2.y )
  666.                                             surface.DrawLine( V5.x, V5.y, V7.x, V7.y )
  667.  
  668.                                             //Verticals
  669.                                             surface.DrawLine( V3.x, V3.y, V4.x, V4.y )
  670.                                             surface.DrawLine( V2.x, V2.y, V1.x, V1.y )
  671.                                             surface.DrawLine( V7.x, V7.y, V8.x, V8.y )
  672.                                             surface.DrawLine( V5.x, V5.y, V6.x, V6.y )
  673.                                         end
  674.                                     end
  675.                                 end
  676.                             end
  677.                         end
  678.                         if SmegHack.Options["ESP_Toggle"] then
  679.                             if SmegHack.Options["ESP_Crosshair"] == true then
  680.                                 local _, TeamColor = GetTeam(LocalPlayer())
  681.                                 if SmegHack.Options["ESP_Crosshair_Mode"] == "Team" && Color(SmegHack.Options["ESP_Crosshair_Color_R"], SmegHack.Options["ESP_Crosshair_Color_G"], SmegHack.Options["ESP_Crosshair_Color_B"]) != TeamColor then
  682.                                     SmegHack.Options["ESP_Crosshair_Color_R"] = TeamColor.r
  683.                                     SmegHack.Options["ESP_Crosshair_Color_G"] = TeamColor.g
  684.                                     SmegHack.Options["ESP_Crosshair_Color_B"] = TeamColor.b
  685.                                 end
  686.                                 surface.SetDrawColor(Color(SmegHack.Options["ESP_Crosshair_Color_R"], SmegHack.Options["ESP_Crosshair_Color_G"], SmegHack.Options["ESP_Crosshair_Color_B"], SmegHack.Options["ESP_Crosshair_Color_A"]))
  687.                                 surface.DrawLine((ScrW()/2)-SmegHack.Options["ESP_Crosshair_Size"], ScrH()/2, (ScrW()/2)+SmegHack.Options["ESP_Crosshair_Size"], ScrH()/2)
  688.                                 surface.DrawLine(ScrW()/2, (ScrH()/2)-SmegHack.Options["ESP_Crosshair_Size"], ScrW()/2, (ScrH()/2)+SmegHack.Options["ESP_Crosshair_Size"])
  689.                             end
  690.                             if Ent:IsNPC() || Ent:IsPlayer() then
  691.                                 local Name
  692.                                 local ShowTeam, ShowOpponents, ShowFriends, ShowEnemies, ShowNPCs, ShowSpectators = false, false, false, false, false, false
  693.                                 local ShowTeamV, ShowOpponentsV, ShowFriendsV, ShowEnemiesV, ShowNPCsV, ShowSpectatorsV = true, true, true, true, true, true
  694.  
  695.                                 if !Ent:IsNPC() && Ent:Health() > 0 then
  696.                                     local Team, _ = GetTeam(Ent)
  697.                                     if Ent:Team() != TEAM_SPECTATOR && SmegHack.Options["ESP_ShowTeam"] && Team == GetTeam(LocalPlayer()) then
  698.                                         if SmegHack.Options["ESP_ShowTeamV"] == "Show" then
  699.                                             ShowTeam = true
  700.                                         else
  701.                                             ShowTeamV = false
  702.                                         end
  703.                                     end
  704.                                     if Ent:Team() != TEAM_SPECTATOR && SmegHack.Options["ESP_ShowOpponents"] && Team != GetTeam(LocalPlayer()) then
  705.                                         if SmegHack.Options["ESP_ShowOpponentsV"] == "Show" then
  706.                                             ShowOpponents = true
  707.                                         else
  708.                                             ShowOpponentsV = false
  709.                                         end
  710.                                     end
  711.                                     if Ent:Team() != TEAM_SPECTATOR && SmegHack.Options["ESP_ShowFriends"] && ( (!SmegHack.Options["Friends_FriendIsEnemy"] && table.HasValue( SmegHack.FriendsList, Ent:SteamID() ) ) || (SmegHack.Options["Friends_FriendIsEnemy"] && !table.HasValue( SmegHack.FriendsList, Ent:SteamID() ) ) ) then
  712.                                         if SmegHack.Options["ESP_ShowFriendsV"] == "Show" then
  713.                                             ShowFriends = true
  714.                                         else
  715.                                             ShowFriendsV = false
  716.                                         end
  717.                                     end
  718.                                     if Ent:Team() != TEAM_SPECTATOR && SmegHack.Options["ESP_ShowEnemies"] && ( (!SmegHack.Options["Friends_FriendIsEnemy"] && !table.HasValue( SmegHack.FriendsList, Ent:SteamID() ) ) || (SmegHack.Options["Friends_FriendIsEnemy"] && table.HasValue( SmegHack.FriendsList, Ent:SteamID() ) ) ) then
  719.                                         if SmegHack.Options["ESP_ShowEnemiesV"] =="Show" then
  720.                                             ShowEnemies = true
  721.                                         else
  722.                                             ShowEnemiesV = false
  723.                                         end
  724.                                     end
  725.                                     if SmegHack.Options["ESP_ShowSpectators"] && Ent:Team() == TEAM_SPECTATOR then
  726.                                         if SmegHack.Options["ESP_ShowSpectatorsV"] == "Show" then
  727.                                             ShowSpectators = true
  728.                                         else
  729.                                             ShowSpectatorsV = false
  730.                                         end
  731.                                     end
  732.                                     Name = Ent:Nick()
  733.                                 else
  734.                                     if SmegHack.Options["ESP_ShowNPCs"] && Ent:IsNPC() then
  735.                                         if SmegHack.Options["ESP_ShowNPCsV"] == "Show" then
  736.                                             ShowNPCs = true
  737.                                         else
  738.                                             ShowNPCsV = false
  739.                                         end
  740.                                     end
  741.                                     Name = Ent:GetClass()
  742.                                 end
  743.                                 if (ShowTeam || ShowOpponents || ShowFriends || ShowEnemies || ShowNPCs || ShowSpectators) && (ShowTeamV && ShowOpponentsV && ShowFriendsV && ShowEnemiesV && ShowNPCsV && ShowSpectatorsV) then
  744.                                     local MaxX, MaxY, MinX, MinY, V1, V2, V3, V4, V5, V6, V7, V8 = ESPGetPos( Ent )
  745.                                     local DrawColor
  746.                                     local ESPPos = MinY
  747.                                     if Ent:IsNPC() then DrawColor = Color(170,220,120) else _, DrawColor = GetTeam(Ent) end
  748.                                     if SmegHack.Options["ESP_BoundaryBoxes"] then
  749.                                         surface.SetDrawColor( DrawColor )
  750.                                         if SmegHack.Options["ESP_BoundaryBoxes_Mode"] == "2D" then
  751.                                             surface.DrawLine( MaxX, MaxY, MinX, MaxY )
  752.                                             surface.DrawLine( MaxX, MaxY, MaxX, MinY )
  753.                                             surface.DrawLine( MinX, MinY, MaxX, MinY )
  754.                                             surface.DrawLine( MinX, MinY, MinX, MaxY )
  755.                                         else
  756.                                             //Top Box
  757.                                             surface.DrawLine( V4.x, V4.y, V6.x, V6.y )
  758.                                             surface.DrawLine( V1.x, V1.y, V8.x, V8.y )
  759.                                             surface.DrawLine( V6.x, V6.y, V8.x, V8.y )
  760.                                             surface.DrawLine( V4.x, V4.y, V1.x, V1.y )
  761.  
  762.                                             //Bottom Box
  763.                                             surface.DrawLine( V3.x, V3.y, V5.x, V5.y )
  764.                                             surface.DrawLine( V2.x, V2.y, V7.x, V7.y )
  765.                                             surface.DrawLine( V3.x, V3.y, V2.x, V2.y )
  766.                                             surface.DrawLine( V5.x, V5.y, V7.x, V7.y )
  767.  
  768.                                             //Verticals
  769.                                             surface.DrawLine( V3.x, V3.y, V4.x, V4.y )
  770.                                             surface.DrawLine( V2.x, V2.y, V1.x, V1.y )
  771.                                             surface.DrawLine( V7.x, V7.y, V8.x, V8.y )
  772.                                             surface.DrawLine( V5.x, V5.y, V6.x, V6.y )
  773.                                         end
  774.                                     end
  775.                                     if SmegHack.Options["ESP_Health"] then                 
  776.                                         local HealthColor = Color( (1-(Ent:Health()/Ent:GetMaxHealth()))*255, (Ent:Health()/Ent:GetMaxHealth())*255, 0 )
  777.                                         local HealthString = tostring(Ent:Health())
  778.  
  779.                                         if MaxY-MinY <= 45 then
  780.                                             local TopHealthFar = ((1-(Ent:Health()/Ent:GetMaxHealth()))*43)+MinY+1
  781.                                             local BottomHealthFar = 43-((1-(Ent:Health()/Ent:GetMaxHealth()))*43)
  782.                                             draw.RoundedBox( 0, MinX-15, MinY, 10, 45, Color(0,0,0) )
  783.                                             draw.RoundedBox( 0, MinX-14, TopHealthFar, 8, BottomHealthFar, HealthColor )
  784.                                             draw.SimpleTextOutlined( HealthString.."%", "ESP_Font_Entity", MinX-17, MinY+22.5, HealthColor, TEXT_ALIGN_RIGHT, TEXT_ALIGN_CENTER, 1, Color(0,0,0) )
  785.                                         else
  786.                                             local TopHealthClose = (MinY+((1-(Ent:Health()/Ent:GetMaxHealth()))*(MaxY-MinY)))+1
  787.                                             local BottomHealthClose = ((Ent:Health()/Ent:GetMaxHealth())*(MaxY-MinY))-2
  788.                                             draw.RoundedBox( 0, MinX-15, MinY, 10, MaxY-MinY, Color(0,0,0) )
  789.                                             draw.RoundedBox( 0, MinX-14, TopHealthClose, 8, BottomHealthClose, HealthColor )
  790.                                             draw.SimpleTextOutlined( HealthString.."%", "ESP_Font_Entity", MinX-17, ((MinY-MaxY)/2)+MaxY, HealthColor, TEXT_ALIGN_RIGHT, TEXT_ALIGN_CENTER, 1, Color(0,0,0) )
  791.                                         end
  792.  
  793.                                     end
  794.                                     if SmegHack.Options["ESP_NameTags"] then
  795.                                         if GMode == 2 && Ent:GetBystanderName() != nil then
  796.  
  797.                                             draw.SimpleTextOutlined( "N: "..Name.." ("..Ent:GetBystanderName()..")", "ESP_Font_Main", MaxX+5, ESPPos, DrawColor, TEXT_ALIGN_LEFT, TEXT_ALIGN_BOTTOM, 1, Color(0,0,0) )
  798.                                         else
  799.                                             draw.SimpleTextOutlined( "N: "..Name, "ESP_Font_Main", MaxX+5, ESPPos, DrawColor, TEXT_ALIGN_LEFT, TEXT_ALIGN_BOTTOM, 1, Color(0,0,0) )
  800.                                         end
  801.                                         ESPPos = ESPPos + 15
  802.                                     end
  803.                                     if SmegHack.Options["ESP_Weapon"] then
  804.                                         if Ent:GetActiveWeapon():IsValid() then
  805.                                             local WName = Ent:GetActiveWeapon():GetPrintName()
  806.                                             draw.SimpleTextOutlined( "W: "..WName, "ESP_Font_Main", MaxX+5, ESPPos, DrawColor, TEXT_ALIGN_LEFT, TEXT_ALIGN_BOTTOM, 1, Color(0,0,0) )
  807.                                             ESPPos = ESPPos + 15
  808.                                         end
  809.                                     end
  810.                                     if SmegHack.Options["ESP_Distance"] then
  811.                                         local Dist = math.floor(Ent:GetPos():Distance(LocalPlayer():GetShootPos())/40)
  812.                                         draw.SimpleTextOutlined( "D: "..Dist, "ESP_Font_Main", MaxX+5, ESPPos, DrawColor, TEXT_ALIGN_LEFT, TEXT_ALIGN_BOTTOM, 1, Color(0,0,0) )
  813.                                         ESPPos = ESPPos + 15
  814.                                     end
  815.                                     if SmegHack.Options["ESP_Skeleton"] then
  816.                                         local Bones = {}
  817.                                         local Success = true
  818.                                         for k, v in pairs(SmegHack.Bones) do
  819.                                             if Ent:LookupBone(v) != nil && Ent:GetBonePosition(Ent:LookupBone(v)) != nil then
  820.                                                 table.insert( Bones, Ent:GetBonePosition(Ent:LookupBone(v)):ToScreen() )
  821.                                             else
  822.                                                 Success = false //Just incase entities have some bones but not others (I have no idea if that happens, but I figgured better safe then sorry)
  823.                                                 return
  824.                                             end
  825.                                         end
  826.                                         if Success then
  827.                                             surface.SetDrawColor( DrawColor )
  828.                                             //Spine
  829.                                             surface.DrawLine( Bones[1].x, Bones[1].y, Bones[2].x, Bones[2].y )
  830.                                             surface.DrawLine( Bones[2].x, Bones[2].y, Bones[3].x, Bones[3].y )
  831.                                             surface.DrawLine( Bones[3].x, Bones[3].y, Bones[4].x, Bones[4].y )
  832.                                             surface.DrawLine( Bones[4].x, Bones[4].y, Bones[5].x, Bones[5].y )
  833.                                             surface.DrawLine( Bones[5].x, Bones[5].y, Bones[6].x, Bones[6].y )
  834.                                             surface.DrawLine( Bones[6].x, Bones[6].y, Bones[7].x, Bones[7].y )
  835.  
  836.                                             //Legs
  837.                                             surface.DrawLine( Bones[7].x, Bones[7].y, Bones[14].x, Bones[14].y )
  838.                                             surface.DrawLine( Bones[14].x, Bones[14].y, Bones[15].x, Bones[15].y )
  839.                                             surface.DrawLine( Bones[15].x, Bones[15].y, Bones[16].x, Bones[16].y )
  840.                                             surface.DrawLine( Bones[16].x, Bones[16].y, Bones[17].x, Bones[17].y )
  841.  
  842.                                             surface.DrawLine( Bones[7].x, Bones[7].y, Bones[18].x, Bones[18].y )
  843.                                             surface.DrawLine( Bones[18].x, Bones[18].y, Bones[19].x, Bones[19].y )
  844.                                             surface.DrawLine( Bones[19].x, Bones[19].y, Bones[20].x, Bones[20].y )
  845.                                             surface.DrawLine( Bones[20].x, Bones[20].y, Bones[21].x, Bones[21].y )
  846.  
  847.                                             //Arms
  848.                                             surface.DrawLine( Bones[3].x, Bones[3].y, Bones[8].x, Bones[8].y )
  849.                                             surface.DrawLine( Bones[8].x, Bones[8].y, Bones[9].x, Bones[9].y )
  850.                                             surface.DrawLine( Bones[9].x, Bones[9].y, Bones[10].x, Bones[10].y )
  851.  
  852.                                             surface.DrawLine( Bones[3].x, Bones[3].y, Bones[11].x, Bones[11].y )
  853.                                             surface.DrawLine( Bones[11].x, Bones[11].y, Bones[12].x, Bones[12].y )
  854.                                             surface.DrawLine( Bones[12].x, Bones[12].y, Bones[13].x, Bones[13].y )
  855.  
  856.                                         end
  857.                                     end
  858.                                 end
  859.                             end
  860.                         end
  861.                     end
  862.                 end
  863.             end
  864.         end
  865.     end)
  866.  
  867.     AddHook( "BhopCalcView", "CalcView", RandomString(), function( ply, pos, angles, fov )
  868.         if GetConVarNumber("SmegHack_Panic") == 0 && SmegHack.Options["Bhop_Toggle"] then
  869.             if SmegHack.Options["Bhop_Sideways"] then
  870.                 local CamData = {}
  871.                 if TapS then CamData.angles = LocalPlayer():EyeAngles()+Angle(0,180,0) else CamData.angles = LocalPlayer():EyeAngles()+Angle(0,90,0) end
  872.                 CamData.origin = LocalPlayer():GetShootPos()
  873.                 CamData.fov = fov
  874.  
  875.                 return CamData
  876.             elseif SmegHack.Options["Bhop_WOnly"] then
  877.                 local CamData = {}
  878.                 if WLeft then
  879.                     CamData.angles = LocalPlayer():EyeAngles()-Angle(0,90,0)
  880.                 elseif WRight then
  881.                     CamData.angles = LocalPlayer():EyeAngles()+Angle(0,90,0)
  882.                 elseif WBack then
  883.                     CamData.angles = LocalPlayer():EyeAngles()+Angle(0,180,0)
  884.                 end
  885.                 CamData.origin = LocalPlayer():GetShootPos()
  886.                 CamData.fov = fov
  887.  
  888.                 return CamData
  889.             end
  890.         end
  891.     end)
  892.     AddHook( "Bhop", "CreateMove", RandomString(), function(ucmd)
  893.         if SmegHack.Options["Bhop_Toggle"] && GetConVarNumber("SmegHack_Panic") == 0 then
  894.             if SmegHack.Options["Bhop_FastWalk"] then
  895.                 if LocalPlayer():IsOnGround() && ( ucmd:KeyDown(IN_FORWARD) || ucmd:KeyDown(IN_BACK) ) then
  896.                     if FastWalk == false then
  897.                         ucmd:SetSideMove(ucmd:GetSideMove()-5000)
  898.                     else
  899.                         ucmd:SetSideMove(ucmd:GetSideMove()+5000)
  900.                     end
  901.                     FastWalk = !FastWalk
  902.                 end
  903.             end
  904.             if SmegHack.Options["Bhop_AutoHop"] then
  905.                 if ucmd:KeyDown(IN_JUMP) then
  906.                     if LocalPlayer():WaterLevel() <= 1 && LocalPlayer():GetMoveType() != MOVETYPE_LADDER && !LocalPlayer():IsOnGround() then
  907.                         ucmd:RemoveKey(IN_JUMP)
  908.                     end
  909.                 end
  910.             end
  911.             if SmegHack.Options["Bhop_AutoStrafe"] && !LocalPlayer():IsOnGround() && LocalPlayer():WaterLevel() <= 1 && LocalPlayer():GetMoveType() != MOVETYPE_LADDER && !( LocalPlayer():KeyDown(IN_FORWARD) || LocalPlayer():KeyDown(IN_BACK) || LocalPlayer():KeyDown(IN_MOVELEFT) || LocalPlayer():KeyDown(IN_MOVERIGHT) ) then
  912.                 if SmegHack.Options["Bhop_Sideways"] && !TapS then
  913.                     if ucmd:GetMouseX() < 0 then
  914.                         ucmd:SetForwardMove(-1000000)
  915.                     end
  916.                     if ucmd:GetMouseX() > 0 then
  917.                         ucmd:SetForwardMove(1000000)
  918.                     end
  919.                 elseif SmegHack.Options["Bhop_WOnly"] then
  920.                     if ucmd:GetMouseX() < 0 then
  921.                         ucmd:SetForwardMove(1000000)
  922.                         if !WLeft then
  923.                             if WRight then
  924.                                 ucmd:SetViewAngles(ucmd:GetViewAngles()+Angle(0,180,0))
  925.                             elseif WForward then
  926.                                 ucmd:SetViewAngles(ucmd:GetViewAngles()+Angle(0,90,0))
  927.                             elseif WBack then
  928.                                 ucmd:SetViewAngles(ucmd:GetViewAngles()-Angle(0,90,0))
  929.                             end
  930.                             WLeft = true
  931.                             WRight, WForward, WBack = false, false, false
  932.                         end
  933.                     elseif ucmd:GetMouseX() > 0 then
  934.                         ucmd:SetForwardMove(1000000)
  935.                         if !WRight then
  936.                             if WLeft then
  937.                                 ucmd:SetViewAngles(ucmd:GetViewAngles()+Angle(0,180,0))
  938.                             elseif WForward then
  939.                                 ucmd:SetViewAngles(ucmd:GetViewAngles()-Angle(0,90,0))
  940.                             elseif WBack then
  941.                                 ucmd:SetViewAngles(ucmd:GetViewAngles()+Angle(0,90,0))
  942.                             end
  943.                             WRight = true
  944.                             WLeft, WForward, WBack = false, false, false
  945.                         end
  946.                     end
  947.                 else
  948.                     if ucmd:GetMouseX() < 0 then
  949.                         ucmd:SetSideMove(-1000000)
  950.                     end
  951.                     if ucmd:GetMouseX() > 0 then
  952.                         ucmd:SetSideMove(1000000)
  953.                     end
  954.                 end
  955.             end
  956.             if SmegHack.Options["Bhop_EdgeJump"] then
  957.                 if LocalPlayer():IsOnGround() then
  958.                     local WalkAngle
  959.                     if LocalPlayer():GetVelocity():Length() != 0 then
  960.                         WalkAngle = Angle( 0, LocalPlayer():GetVelocity():Angle().y, 0 )
  961.                     else
  962.                         WalkAngle = Angle( 0, LocalPlayer():EyeAngles().y, 0 )
  963.                     end
  964.                     local FinPos = LocalPlayer():EyePos() + (WalkAngle:Forward()*(SmegHack.Options["Bhop_EdgeJump_Distance"]-50))
  965.                     FinPos.z = LocalPlayer():GetPos().z-5
  966.                     local GroundDetect = {
  967.                             start = LocalPlayer():GetShootPos(),
  968.                             endpos = FinPos,
  969.                             filter = LocalPlayer(),
  970.                             mask = MASK_PLAYERSOLID
  971.                         }
  972.                     if util.TraceLine(GroundDetect).Fraction == 1 then
  973.                         ucmd:SetButtons( ucmd:GetButtons() + IN_JUMP )
  974.                     end
  975.                 end
  976.                 //LocalPlayer():SetEyeAngles(Angle( 0,LocalPlayer():GetVelocity():Angle().y,LocalPlayer():GetVelocity():Angle().z )) <-Just for safe keeping
  977.             end
  978.             if SmegHack.Options["Bhop_Sideways"] then
  979.                 if ucmd:KeyDown(IN_MOVELEFT) && !TapS then
  980.                     if ucmd:KeyDown(IN_MOVERIGHT) then ForwardMove = 0 elseif ForwardMove == 0 then ForwardMove = -1000000 end
  981.                     ucmd:SetSideMove(SideMove)
  982.                     ucmd:SetForwardMove(ForwardMove)
  983.                 end
  984.                 if ucmd:KeyDown(IN_MOVERIGHT) && !TapS then
  985.                     if ucmd:KeyDown(IN_MOVELEFT) then ForwardMove = 0 elseif ForwardMove == 0 then ForwardMove = 1000000 end
  986.                     ucmd:SetSideMove(SideMove)
  987.                     ucmd:SetForwardMove(ForwardMove)
  988.                 end
  989.                 if !ucmd:KeyDown(IN_MOVELEFT) && !ucmd:KeyDown(IN_MOVERIGHT) && !TapS then ForwardMove = 0 end
  990.  
  991.                 if ucmd:KeyDown(IN_FORWARD) && !TapS then
  992.                     if ucmd:KeyDown(IN_BACK) then SideMove = 0 elseif SideMove == 0 then SideMove = -1000000 end
  993.                     ucmd:SetSideMove(SideMove)
  994.                     ucmd:SetForwardMove(ForwardMove)
  995.                 end
  996.                 if ucmd:KeyDown(IN_BACK) && LocalPlayer():IsOnGround() && !TapS then
  997.                     if ucmd:KeyDown(IN_FORWARD) then SideMove = 0 elseif SideMove == 0 then SideMove = 1000000 end
  998.                     ucmd:SetSideMove(SideMove)
  999.                     ucmd:SetForwardMove(ForwardMove)
  1000.                 elseif ucmd:KeyDown(IN_BACK) && !LocalPlayer():IsOnGround() && !TapS then
  1001.                     ForwardMove = 1000000
  1002.                     ucmd:SetViewAngles(ucmd:GetViewAngles()-Angle(0,90,0))
  1003.                     ucmd:SetForwardMove(ForwardMove)
  1004.                     TapS = true
  1005.                 end
  1006.                 if !ucmd:KeyDown(IN_FORWARD) && !ucmd:KeyDown(IN_BACK) && !TapS then SideMove = 0 end
  1007.                 if !LocalPlayer():IsOnGround() && ucmd:KeyDown(IN_BACK) && TapS then
  1008.                     ucmd:SetForwardMove(1000000)
  1009.                 elseif ( !ucmd:KeyDown(IN_BACK) || LocalPlayer():IsOnGround() ) && TapS then
  1010.                     ucmd:SetViewAngles(ucmd:GetViewAngles()+Angle(0,90,0))
  1011.                     TapS = false
  1012.                 end
  1013.             elseif SmegHack.Options["Bhop_WOnly"] then
  1014.                 if ucmd:KeyDown(IN_MOVELEFT) && !WLeft then
  1015.                     if WRight then
  1016.                         ucmd:SetViewAngles(ucmd:GetViewAngles()+Angle(0,180,0))
  1017.                     elseif WForward then
  1018.                         ucmd:SetViewAngles(ucmd:GetViewAngles()+Angle(0,90,0))
  1019.                     elseif WBack then
  1020.                         ucmd:SetViewAngles(ucmd:GetViewAngles()-Angle(0,90,0))
  1021.                     end
  1022.                     WLeft = true
  1023.                     WRight, WForward, WBack = false, false, false
  1024.                 elseif ucmd:KeyDown(IN_MOVERIGHT) && !WRight then
  1025.                     if WLeft then
  1026.                         ucmd:SetViewAngles(ucmd:GetViewAngles()+Angle(0,180,0))
  1027.                     elseif WForward then
  1028.                         ucmd:SetViewAngles(ucmd:GetViewAngles()-Angle(0,90,0))
  1029.                     elseif WBack then
  1030.                         ucmd:SetViewAngles(ucmd:GetViewAngles()+Angle(0,90,0))
  1031.                     end
  1032.                     WRight = true
  1033.                     WLeft, WForward, WBack = false, false, false
  1034.                 elseif ucmd:KeyDown(IN_FORWARD) && !WForward then
  1035.                     if WRight then
  1036.                         ucmd:SetViewAngles(ucmd:GetViewAngles()+Angle(0,90,0))
  1037.                     elseif WLeft then
  1038.                         ucmd:SetViewAngles(ucmd:GetViewAngles()-Angle(0,90,0))
  1039.                     elseif WBack then
  1040.                         ucmd:SetViewAngles(ucmd:GetViewAngles()+Angle(0,180,0))
  1041.                     end
  1042.                     WForward = true
  1043.                     WLeft, WRight, WBack = false, false, false
  1044.                 elseif ucmd:KeyDown(IN_BACK) && !WBack then
  1045.                     if WRight then
  1046.                         ucmd:SetViewAngles(ucmd:GetViewAngles()-Angle(0,90,0))
  1047.                     elseif WForward then
  1048.                         ucmd:SetViewAngles(ucmd:GetViewAngles()+Angle(0,180,0))
  1049.                     elseif WLeft then
  1050.                         ucmd:SetViewAngles(ucmd:GetViewAngles()+Angle(0,90,0))
  1051.                     end
  1052.                     WBack = true
  1053.                     WLeft, WRight, WForward = false, false, false
  1054.                 end
  1055.                 if !ucmd:KeyDown(IN_MOVELEFT) && !ucmd:KeyDown(IN_MOVERIGHT) && !ucmd:KeyDown(IN_FORWARD) && !ucmd:KeyDown(IN_BACK) then WActive = false else WActive = true end
  1056.                 if WActive then
  1057.                     ucmd:SetForwardMove(1000000)
  1058.                     ucmd:SetSideMove(0)
  1059.                 end
  1060.             end
  1061.         end
  1062.     end)
  1063.  
  1064.     AddHook( "Cams", "CalcView", RandomString(), function( ply, Pos, Ang, FOV )
  1065.         if SmegHack.Options["Cams_Toggle"] && GetConVarNumber("SmegHack_Panic") == 0 then
  1066.             local CamData = {}
  1067.             if SmegHack.Options["Cams_CSNoclip"] then
  1068.                 local Speed = SmegHack.Options["Cams_CSNoclip_Speed"]/5
  1069.                 local MouseAngs = Angle( NoclipY, NoclipX, 0 )
  1070.                 if LocalPlayer():KeyDown(IN_SPEED) then
  1071.                     Speed = Speed * 5
  1072.                 end
  1073.                 if LocalPlayer():KeyDown(IN_FORWARD) then
  1074.                     NoclipPos = NoclipPos+(MouseAngs:Forward()*Speed)
  1075.                 end
  1076.                 if LocalPlayer():KeyDown(IN_BACK) then
  1077.                     NoclipPos = NoclipPos-(MouseAngs:Forward()*Speed)
  1078.                 end
  1079.                 if LocalPlayer():KeyDown(IN_MOVELEFT) then
  1080.                     NoclipPos = NoclipPos-(MouseAngs:Right()*Speed)
  1081.                 end
  1082.                 if LocalPlayer():KeyDown(IN_MOVERIGHT) then
  1083.                     NoclipPos = NoclipPos+(MouseAngs:Right()*Speed)
  1084.                 end
  1085.                 if NoclipJump then
  1086.                     NoclipPos = NoclipPos+Vector(0,0,Speed)
  1087.                 end
  1088.                 if NoclipDuck then
  1089.                     NoclipPos = NoclipPos-Vector(0,0,Speed)
  1090.                 end
  1091.                 CamData.origin = NoclipPos
  1092.                 CamData.angles = MouseAngs
  1093.                 CamData.fov = FOV
  1094.                 CamData.drawviewer = true
  1095.             elseif SmegHack.Options["Cams_ThirdPerson"] then
  1096.                 CamData.origin = Pos-(Ang:Forward()*(SmegHack.Options["Cams_ThirdPerson_Zoom"]*10))
  1097.                 CamData.angles = Ang
  1098.                 CamData.fov = FOV
  1099.                 CamData.drawviewer = true
  1100.             end
  1101.             return CamData
  1102.         end
  1103.     end)
  1104.     AddHook( "Bhop", "CreateMove", RandomString(), function(ucmd)
  1105.         if SmegHack.Options["Cams_Toggle"] && SmegHack.Options["Cams_CSNoclip"] && GetConVarNumber("SmegHack_Panic") == 0 then
  1106.             if NoclipOn == false then
  1107.                 NoclipPos, NoclipAngles = LocalPlayer():EyePos(), ucmd:GetViewAngles()
  1108.                 NoclipY, NoclipX = ucmd:GetViewAngles().x, ucmd:GetViewAngles().y
  1109.                 NoclipOn = true
  1110.             end
  1111.             ucmd:ClearMovement()
  1112.             if ucmd:KeyDown(IN_JUMP) then
  1113.                 ucmd:RemoveKey(IN_JUMP)
  1114.                 NoclipJump = true
  1115.             elseif NoclipJump then
  1116.                 NoclipJump = false
  1117.             end
  1118.             if ucmd:KeyDown(IN_DUCK) then
  1119.                 ucmd:RemoveKey(IN_DUCK)
  1120.                 NoclipDuck = true
  1121.             elseif NoclipDuck then
  1122.                 NoclipDuck = false
  1123.             end
  1124.             NoclipX = NoclipX-(ucmd:GetMouseX()/50)
  1125.             if NoclipY+(ucmd:GetMouseY()/50) > 89 then NoclipY = 89 elseif NoclipY+(ucmd:GetMouseY()/50) < -89 then NoclipY = -89 else NoclipY = NoclipY+(ucmd:GetMouseY()/50) end
  1126.             ucmd:SetViewAngles(NoclipAngles)
  1127.         elseif NoclipOn == true then
  1128.             NoclipOn = false
  1129.         end
  1130.     end)
  1131.     if Display then
  1132.         AddHook( "Loaded", "HUDPaint", RandomString(), function()
  1133.             draw.SimpleTextOutlined( "Smeg Hack Loaded Successfully!", "Menu_Title", ScrW()/2, 50, Color(0,150,150), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color(0,0,0) )
  1134.             timer.Simple( 3, function()
  1135.                 RemoveHook("Loaded")
  1136.             end)
  1137.         end)
  1138.     end
  1139. end
  1140.  
  1141. //Bones
  1142. SmegHack.Bones = {
  1143. "ValveBiped.Bip01_Head1",
  1144. "ValveBiped.Bip01_Neck1",
  1145. "ValveBiped.Bip01_Spine4",
  1146. "ValveBiped.Bip01_Spine2",
  1147. "ValveBiped.Bip01_Spine1",
  1148. "ValveBiped.Bip01_Spine",
  1149. "ValveBiped.Bip01_Pelvis",
  1150. "ValveBiped.Bip01_R_UpperArm",
  1151. "ValveBiped.Bip01_R_Forearm",
  1152. "ValveBiped.Bip01_R_Hand",
  1153. "ValveBiped.Bip01_L_UpperArm",
  1154. "ValveBiped.Bip01_L_Forearm",
  1155. "ValveBiped.Bip01_L_Hand",
  1156. "ValveBiped.Bip01_R_Thigh",
  1157. "ValveBiped.Bip01_R_Calf",
  1158. "ValveBiped.Bip01_R_Foot",
  1159. "ValveBiped.Bip01_R_Toe0",
  1160. "ValveBiped.Bip01_L_Thigh",
  1161. "ValveBiped.Bip01_L_Calf",
  1162. "ValveBiped.Bip01_L_Foot",
  1163. "ValveBiped.Bip01_L_Toe0"
  1164. }
  1165.  
  1166. //Key Binds
  1167. SmegHack.KeyBinds = {
  1168. [0] = "NONE",
  1169. [1] = "0",
  1170. [2] = "1",
  1171. [3] = "2",
  1172. [4] = "3",
  1173. [5] = "4",
  1174. [6] = "5",
  1175. [7] = "6",
  1176. [8] = "7",
  1177. [9] = "8",
  1178. [10] = "9",
  1179. [11] = "A",
  1180. [12] = "B",
  1181. [13] = "C",
  1182. [14] = "D",
  1183. [15] = "E",
  1184. [16] = "F",
  1185. [17] = "G",
  1186. [18] = "H",
  1187. [19] = "I",
  1188. [20] = "J",
  1189. [21] = "K",
  1190. [22] = "L",
  1191. [23] = "M",
  1192. [24] = "N",
  1193. [25] = "O",
  1194. [26] = "P",
  1195. [27] = "Q",
  1196. [28] = "R",
  1197. [29] = "S",
  1198. [30] = "T",
  1199. [31] = "U",
  1200. [32] = "V",
  1201. [33] = "W",
  1202. [34] = "X",
  1203. [35] = "Y",
  1204. [36] = "Z",
  1205. [37] = "PAD_0",
  1206. [38] = "PAD_1",
  1207. [39] = "PAD_2",
  1208. [40] = "PAD_3",
  1209. [41] = "PAD_4",
  1210. [42] = "PAD_5",
  1211. [43] = "PAD_6",
  1212. [44] = "PAD_7",
  1213. [45] = "PAD_8",
  1214. [46] = "PAD_9",
  1215. [47] = "PAD_DIVIDE",
  1216. [48] = "PAD_MULTIPLY",
  1217. [49] = "PAD_MINUS",
  1218. [50] = "PAD_PLUS",
  1219. [51] = "PAD_ENTER",
  1220. [52] = "PAD_DECIMAL",
  1221. [53] = "LBRACKET",
  1222. [54] = "RBRACKET",
  1223. [55] = "SEMICOLON",
  1224. [56] = "APOSTROPHE",
  1225. [57] = "BACKQUOTE",
  1226. [58] = "COMMA",
  1227. [59] = "PERIOD",
  1228. [60] = "SLASH",
  1229. [61] = "BACKSLASH",
  1230. [62] = "MINUS",
  1231. [63] = "EQUAL",
  1232. [64] = "ENTER",
  1233. [65] = "SPACE",
  1234. [66] = "BACKSPACE",
  1235. [67] = "TAB",
  1236. [68] = "CAPSLOCK",
  1237. [69] = "NUMLOCK",
  1238. [70] = "ESCAPE",
  1239. [71] = "SCROLLLOCK",
  1240. [72] = "INSERT",
  1241. [73] = "DELETE",
  1242. [74] = "HOME",
  1243. [75] = "END",
  1244. [76] = "PAGEUP",
  1245. [77] = "PAGEDOWN",
  1246. [78] = "BREAK",
  1247. [79] = "LSHIFT",
  1248. [80] = "RSHIFT",
  1249. [81] = "LALT",
  1250. [82] = "RALT",
  1251. [83] = "LCONTROL",
  1252. [84] = "RCONTROL",
  1253. [85] = "LWIN",
  1254. [86] = "RWIN",
  1255. [87] = "APP",
  1256. [88] = "UP",
  1257. [89] = "LEFT",
  1258. [90] = "DOWN",
  1259. [91] = "RIGHT",
  1260. [92] = "F1",
  1261. [93] = "F2",
  1262. [94] = "F3",
  1263. [95] = "F4",
  1264. [96] = "F5",
  1265. [97] = "F6",
  1266. [98] = "F7",
  1267. [99] = "F8",
  1268. [100] = "F9",
  1269. [101] = "F10",
  1270. [102] = "F11",
  1271. [103] = "F12",
  1272. //[104] = "CAPSLOCKTOGGLE",   These three screw up the binding process, probably wont bother working out how to fix it
  1273. //[105] = "NUMLOCKTOGGLE",
  1274. //[106] = "SCROLLLOCKTOGGLE",
  1275.  
  1276. //Xbox Controller Binds - These are untested as I don't own an xbox controller, so they might not work
  1277. [114] = "XBUTTON_A",
  1278. [115] = "XBUTTON_B",
  1279. [116] = "XBUTTON_X",
  1280. [117] = "XBUTTON_Y",
  1281. [118] = "XBUTTON_LEFT_SHOULDER",
  1282. [119] = "XBUTTON_RIGHT_SHOULDER",
  1283. [120] = "XBUTTON_BACK",
  1284. [121] = "XBUTTON_START",
  1285. [122] = "XBUTTON_STICK1",
  1286. [123] = "XBUTTON_STICK2",
  1287. [146] = "XBUTTON_UP",
  1288. [147] = "XBUTTON_RIGHT",
  1289. [148] = "XBUTTON_DOWN",
  1290. [149] = "XBUTTON_LEFT",
  1291. [150] = "XSTICK1_RIGHT",
  1292. [151] = "XSTICK1_LEFT",
  1293. [152] = "XSTICK1_DOWN",
  1294. [153] = "XSTICK1_UP",
  1295. [154] = "XBUTTON_LTRIGGER",
  1296. [155] = "XBUTTON_RTRIGGER",
  1297. [156] = "XSTICK2_RIGHT",
  1298. [157] = "XSTICK2_LEFT",
  1299. [158] = "XSTICK2_DOWN",
  1300. [159] = "XSTICK2_UP"
  1301. }
  1302.  
  1303. //Mouse Binds (Needs to be separate otherwise it doesn't work)
  1304. SmegHack.MouseBinds = {
  1305. [107] = "MOUSE_LEFT",
  1306. [108] = "MOUSE_RIGHT",
  1307. [109] = "MOUSE_MIDDLE",
  1308. [110] = "MOUSE_4",
  1309. [111] = "MOUSE_5",
  1310. [112] = "MOUSE_WHEEL_UP",
  1311. [113] = "MOUSE_WHEEL_DOWN"
  1312. }
  1313.  
  1314. //Aimbot
  1315. function Aimbot( FinAngle )
  1316.     if SmegHack.Options["Aimbot_SmoothAim"] then
  1317.         SmoothAngles( FinAngle, SmegHack.Options["Aimbot_SmoothAim_Value"] )
  1318.     else
  1319.         LocalPlayer():SetEyeAngles(FinAngle)
  1320.     end
  1321. end
  1322.  
  1323. function SmoothAngles( FinAngle, SmoothValue )
  1324.     local SmoothValue = 10-(10*(SmoothValue/1000))
  1325.     local CloseToAngle = false
  1326.     local SmoothDirectionX = 1
  1327.     local SmoothDirectionY = 1
  1328.     local CurAngle = LocalPlayer():EyeAngles()
  1329.     if FinAngle.x > 89 then FinAngle.x = FinAngle.x - 360 end
  1330.     if CurAngle == FinAngle then
  1331.         SmoothDirectionX = 1
  1332.     elseif CurAngle.y < 0 && FinAngle.y < 0 then
  1333.         CloseToAngle = true
  1334.         if CurAngle.y > FinAngle.y then
  1335.             SmoothDirectionX = 2
  1336.         elseif CurAngle.y < FinAngle.y then
  1337.             SmoothDirectionX = 3
  1338.         end
  1339.     elseif CurAngle.y >= 0 && FinAngle.y >= 0 then
  1340.         CloseToAngle = true
  1341.         if CurAngle.y > FinAngle.y then
  1342.             SmoothDirectionX = 2
  1343.         elseif CurAngle.y < FinAngle.y then
  1344.             SmoothDirectionX = 3
  1345.         end
  1346.     elseif CurAngle.y >= 0 && FinAngle.y < 0 then
  1347.         local FlipAngle = CurAngle-(Angle(0,180,0))
  1348.         if FlipAngle.y > FinAngle.y then
  1349.             SmoothDirectionX = 3
  1350.         elseif FlipAngle.y < FinAngle.y then
  1351.             SmoothDirectionX = 2
  1352.         end
  1353.     elseif CurAngle.y < 0 && FinAngle.y >= 0 then
  1354.         local FlipAngle = CurAngle+(Angle(0,180,0))
  1355.         if FlipAngle.y < FinAngle.y then
  1356.             SmoothDirectionX = 2   
  1357.         elseif FlipAngle.y > FinAngle.y then
  1358.             SmoothDirectionX = 3
  1359.         end
  1360.     end
  1361.     if FinAngle.x < CurAngle.x then
  1362.         SmoothDirectionY = 2
  1363.     elseif FinAngle.x > CurAngle.x then
  1364.         SmoothDirectionY = 3
  1365.     end
  1366.     local X, Y = false, false
  1367.     if SmoothDirectionX == 2 then
  1368.         if CurAngle.y-SmoothValue < FinAngle.y && CloseToAngle then
  1369.             LocalPlayer():SetEyeAngles(Angle(CurAngle.x,FinAngle.y,CurAngle.z))
  1370.             Y = true
  1371.         else
  1372.             LocalPlayer():SetEyeAngles(Angle(CurAngle.x,CurAngle.y-SmoothValue,CurAngle.z))
  1373.         end
  1374.     elseif SmoothDirectionX == 3 then
  1375.         if CurAngle.y+SmoothValue > FinAngle.y && CloseToAngle then
  1376.             LocalPlayer():SetEyeAngles(Angle(CurAngle.x,FinAngle.y,CurAngle.z))
  1377.             Y = true
  1378.         else
  1379.             LocalPlayer():SetEyeAngles(Angle(CurAngle.x,CurAngle.y+SmoothValue,CurAngle.z))
  1380.         end
  1381.     end
  1382.     if SmoothDirectionY == 2 then
  1383.         //up
  1384.         if CurAngle.x-SmoothValue < FinAngle.x then
  1385.             LocalPlayer():SetEyeAngles(Angle(FinAngle.x,LocalPlayer():EyeAngles().y,LocalPlayer():EyeAngles().z))
  1386.             X = true
  1387.         else
  1388.             LocalPlayer():SetEyeAngles(Angle(CurAngle.x-SmoothValue,LocalPlayer():EyeAngles().y,LocalPlayer():EyeAngles().z))
  1389.         end
  1390.     elseif SmoothDirectionY == 3 then
  1391.         //down
  1392.         if CurAngle.x+SmoothValue > FinAngle.x then
  1393.             LocalPlayer():SetEyeAngles(Angle(FinAngle.x,LocalPlayer():EyeAngles().y,LocalPlayer():EyeAngles().z))
  1394.             X = true
  1395.         else
  1396.             LocalPlayer():SetEyeAngles(Angle(CurAngle.x+SmoothValue,LocalPlayer():EyeAngles().y,LocalPlayer():EyeAngles().z))
  1397.         end
  1398.     end
  1399.     if SmegHack.Options["Aimbot_AutoShoot"] && X && Y then
  1400.         LocalPlayer():ConCommand("+attack")
  1401.         timer.Simple( 0.1, function() LocalPlayer():ConCommand("-attack") end )
  1402.     end
  1403. end
  1404.  
  1405. //ESP Functions
  1406. function ESPGetPos( Ent )
  1407.     if Ent:IsValid() then
  1408.         local Points = {
  1409.             Vector( Ent:OBBMaxs().x, Ent:OBBMaxs().y, Ent:OBBMaxs().z ),
  1410.             Vector( Ent:OBBMaxs().x, Ent:OBBMaxs().y, Ent:OBBMins().z ),
  1411.             Vector( Ent:OBBMaxs().x, Ent:OBBMins().y, Ent:OBBMins().z ),
  1412.             Vector( Ent:OBBMaxs().x, Ent:OBBMins().y, Ent:OBBMaxs().z ),
  1413.             Vector( Ent:OBBMins().x, Ent:OBBMins().y, Ent:OBBMins().z ),
  1414.             Vector( Ent:OBBMins().x, Ent:OBBMins().y, Ent:OBBMaxs().z ),
  1415.             Vector( Ent:OBBMins().x, Ent:OBBMaxs().y, Ent:OBBMins().z ),
  1416.             Vector( Ent:OBBMins().x, Ent:OBBMaxs().y, Ent:OBBMaxs().z )
  1417.         }
  1418.         local MaxX, MaxY, MinX, MinY
  1419.         local V1, V2, V3, V4, V5, V6, V7, V8
  1420.         for k, v in pairs( Points ) do
  1421.             local ScreenPos = Ent:LocalToWorld( v ):ToScreen()
  1422.             if MaxX != nil then
  1423.                 MaxX, MaxY, MinX, MinY = math.max( MaxX, ScreenPos.x ), math.max( MaxY, ScreenPos.y), math.min( MinX, ScreenPos.x ), math.min( MinY, ScreenPos.y)
  1424.             else
  1425.                 MaxX, MaxY, MinX, MinY = ScreenPos.x, ScreenPos.y, ScreenPos.x, ScreenPos.y
  1426.             end
  1427.  
  1428.             if V1 == nil then
  1429.                 V1 = ScreenPos
  1430.             elseif V2 == nil then
  1431.                 V2 = ScreenPos
  1432.             elseif V3 == nil then
  1433.                 V3 = ScreenPos
  1434.             elseif V4 == nil then
  1435.                 V4 = ScreenPos
  1436.             elseif V5 == nil then
  1437.                 V5 = ScreenPos
  1438.             elseif V6 == nil then
  1439.                 V6 = ScreenPos
  1440.             elseif V7 == nil then
  1441.                 V7 = ScreenPos
  1442.             elseif V8 == nil then
  1443.                 V8 = ScreenPos
  1444.             end
  1445.         end
  1446.         return MaxX, MaxY, MinX, MinY, V1, V2, V3, V4, V5, V6, V7, V8
  1447.     end
  1448. end
  1449.  
  1450. //Menu Items
  1451. function AddMenuTab( Parent, Text, Tab, PosX, PosY, TabID )
  1452.     local AddMenuTab = vgui.Create( "DButton", Parent )
  1453.     AddMenuTab:SetText( Text )
  1454.     AddMenuTab:SetTextColor( Color(255,255,255) )
  1455.     AddMenuTab:SetPos( PosX, PosY )
  1456.     function AddMenuTab:Paint() end
  1457.     AddMenuTab.DoClick = function()
  1458.         ChangeTab( Tab, TabID )
  1459.     end
  1460.     if TabID == 12 then
  1461.         AddMenuTab:SetSize( 48, 30 )
  1462.     else
  1463.         AddMenuTab:SetSize( 49, 30 )
  1464.     end
  1465. end
  1466.  
  1467. function AddLabel( Parent, Text, PosX, PosY, CloseOn )
  1468.     local AddLabel = vgui.Create("DLabel", Parent)
  1469.     AddLabel:SetText( Text )
  1470.     AddLabel:SetPos( PosX, PosY )
  1471.     AddLabel:SetColor(Color(255,255,255,255))
  1472.     AddLabel:SizeToContents()
  1473.     if CloseOn != nil then
  1474.         AddLabel.Think = function()
  1475.             if CloseOn == "Admins" then
  1476.                 if AdminsListBool then
  1477.                     AddLabel:Remove()
  1478.                 end
  1479.             elseif CloseOn == "Spectators" then
  1480.                 if SpecsListBool then
  1481.                     AddLabel:Remove()
  1482.                 end
  1483.             end
  1484.         end
  1485.     end
  1486.     return AddLabel:GetSize()
  1487. end
  1488.  
  1489. function AddMainMenuButton( Parent, Text, PosX, PosY, DoClick )
  1490.     local AddMainMenuButton = vgui.Create( "DButton", Parent )
  1491.     AddMainMenuButton:SetText( Text )
  1492.     AddMainMenuButton:SetTextColor( Color(255,255,255) )
  1493.     AddMainMenuButton:SetSize( 100, 30 )
  1494.     AddMainMenuButton:SetPos( PosX, PosY )
  1495.     function AddMainMenuButton:Paint( w, h )
  1496.         draw.RoundedBox( 0, 0, 0, w, h, Color(150,150,150,255) )
  1497.        
  1498.         surface.SetDrawColor( Color(0,0,0,255) )
  1499.         surface.DrawOutlinedRect( 0, 0, w, h )
  1500.     end
  1501.     AddMainMenuButton.DoClick = DoClick
  1502. end
  1503.  
  1504. function AddGenericButton( Parent, Text, SizeX, SizeY, PosX, PosY, DoClick )
  1505.     local AddGenericButton = vgui.Create( "DButton", Parent )
  1506.     AddGenericButton:SetText( Text )
  1507.     AddGenericButton:SetTextColor( Color(255,255,255) )
  1508.     AddGenericButton:SetSize( SizeX, SizeY )
  1509.     AddGenericButton:SetPos( PosX, PosY )
  1510.     function AddGenericButton:Paint( w, h )
  1511.         draw.RoundedBox( 0, 0, 0, w, h, Color(150,150,150,255) )
  1512.        
  1513.         surface.SetDrawColor( Color(0,0,0,255) )
  1514.         surface.DrawOutlinedRect( 0, 0, w, h )
  1515.     end
  1516.     AddGenericButton.DoClick = DoClick
  1517. end
  1518.  
  1519. function AddKeyBind( Parent, PosX, PosY, Var )
  1520.     local KeyBind = vgui.Create( "DButton", Parent )
  1521.     if SmegHack.Options["Aimbot_AimOnKey_Key"] >= 107 && SmegHack.Options["Aimbot_AimOnKey_Key"] <= 113 then
  1522.         KeyBind:SetText( SmegHack.MouseBinds[SmegHack.Options["Aimbot_AimOnKey_Key"]])
  1523.     else
  1524.         KeyBind:SetText( SmegHack.KeyBinds[SmegHack.Options["Aimbot_AimOnKey_Key"]])
  1525.     end
  1526.     KeyBind:SetTextColor( Color(255,255,255,255) )
  1527.     KeyBind:SetSize( 100, 15 )
  1528.     KeyBind:SetPos( PosX, PosY )
  1529.     KeyBind:SetTooltip( "Click button then press any key to change bind" )
  1530.     KeyBind.Paint = function()
  1531.         draw.RoundedBox( 0, 1, 1, 99, 14, Color(150,150,150,255) )
  1532.         surface.SetDrawColor( Color(0,0,0) )
  1533.         surface.DrawOutlinedRect( 0, 0, 100, 15 )
  1534.     end
  1535.     KeyBind.DoClick = function()
  1536.         KeyBind:SetText("...")
  1537.         local NoClickMenu = vgui.Create( "DFrame" )
  1538.         NoClickMenu:SetTitle("")
  1539.         NoClickMenu:ShowCloseButton(false)
  1540.         NoClickMenu:SetDraggable(false)
  1541.         NoClickMenu:SetSize(ScrW(), ScrH())
  1542.         NoClickMenu:Center()
  1543.         NoClickMenu:MakePopup()
  1544.         function NoClickMenu:Paint( w, h )
  1545.             draw.RoundedBox( 0, 0, 0, w, h, Color(0,0,0,150) )
  1546.             draw.SimpleTextOutlined( "Press Any Key", "Menu_Title", w/2, h/2, Color(255,255,255),TEXT_ALIGN_CENTER,TEXT_ALIGN_CENTER,1,Color(0,0,0))
  1547.             draw.SimpleTextOutlined( "Press ESC to cancel", "Menu_Title", w/2, h/2+30, Color(255,255,255),TEXT_ALIGN_CENTER,TEXT_ALIGN_CENTER,1,Color(0,0,0))
  1548.             draw.SimpleTextOutlined( "Hold ESC to clear bind", "Menu_Title", w/2, h/2+60, Color(255,255,255),TEXT_ALIGN_CENTER,TEXT_ALIGN_CENTER,1,Color(0,0,0))
  1549.         end
  1550.         local ESCStuff, ESCNum = false, 0
  1551.         KeyBind.Think = function()
  1552.             if !ESCStuff then
  1553.                 for i = 107, 113 do
  1554.                     if input.IsMouseDown(i) then
  1555.                         SmegHack.Options[Var] = i
  1556.                         KeyBind:SetText(SmegHack.MouseBinds[i])
  1557.                         NoClickMenu:Close()
  1558.                         KeyBind.Think = nil
  1559.                     end
  1560.                 end
  1561.                 for i = 0, 159 do
  1562.                     if input.IsKeyDown(i) then
  1563.                         if i == 70 then
  1564.                             LocalPlayer():ConCommand("cancelselect")
  1565.                             ESCStuff = true
  1566.                         else
  1567.                             SmegHack.Options[Var] = i
  1568.                             KeyBind:SetText(SmegHack.KeyBinds[i])
  1569.                             NoClickMenu:Close()
  1570.                             KeyBind.Think = nil
  1571.                         end
  1572.                     end
  1573.                 end
  1574.             else
  1575.                 if input.IsKeyDown(70) then
  1576.                     if ESCNum >= 200 then
  1577.                         SmegHack.Options[Var] = 0
  1578.                         KeyBind:SetText(SmegHack.KeyBinds[0])
  1579.                         NoClickMenu:Close()
  1580.                         KeyBind.Think = nil
  1581.                     else ESCNum = ESCNum + 1 end
  1582.                 else
  1583.                     KeyBind:SetText(SmegHack.KeyBinds[SmegHack.Options[Var]])
  1584.                     NoClickMenu:Close()
  1585.                     KeyBind.Think = nil
  1586.                 end
  1587.             end
  1588.         end
  1589.     end
  1590. end
  1591.  
  1592. function AddCheckBox( Parent, Text, PosX, PosY, ToolTip, Var, ExtraFunc )
  1593.     local AddCheckBox = vgui.Create( "DCheckBoxLabel", Parent )
  1594.     AddCheckBox:SetText( Text )
  1595.     AddCheckBox:SetPos( PosX, PosY )
  1596.     AddCheckBox:SetTooltip( ToolTip )
  1597.     AddCheckBox:SetTextColor( Color(255,255,255,255) )
  1598.     AddCheckBox:SizeToContents()
  1599.     AddCheckBox:SetChecked( SmegHack.Options[Var] )
  1600.     AddCheckBox.OnChange = function()
  1601.         SmegHack.Options[Var] = AddCheckBox:GetChecked()
  1602.         if ExtraFunc != nil then
  1603.             local IsChecked = AddCheckBox:GetChecked()
  1604.             ExtraFunc()
  1605.         end
  1606.     end
  1607. end
  1608.  
  1609. function AddBoneButton( Parent, PosX, PosY, Bone )
  1610.     local AddBoneButton = vgui.Create( "DButton", Parent )
  1611.     if table.HasValue( SmegHack.BoneOrder, Bone ) then
  1612.         for k, v in pairs(SmegHack.BoneOrder) do
  1613.             if v == Bone then
  1614.                 AddBoneButton:SetText(tostring(k))
  1615.             end
  1616.         end
  1617.     else
  1618.         AddBoneButton:SetText("-")
  1619.     end
  1620.     AddBoneButton:SetTextColor( Color(255,255,255,255) )
  1621.     AddBoneButton:SetSize( 16, 16 )
  1622.     AddBoneButton:SetPos( PosX-8, PosY-8 )
  1623.     AddBoneButton:SetTooltip( "Select bones in the order you want to aim at them" )
  1624.     function AddBoneButton:Paint( w, h )
  1625.         draw.RoundedBox( 0, 0, 0, w, h, Color(150,150,150,255) )
  1626.        
  1627.         surface.SetDrawColor( Color(0,0,0,255) )
  1628.         surface.DrawOutlinedRect( 0, 0, w, h )
  1629.     end
  1630.     AddBoneButton.DoRightClick = function()
  1631.         local BoneNum
  1632.         if table.HasValue( SmegHack.BoneOrder, Bone ) then
  1633.             for k, v in pairs( SmegHack.BoneOrder ) do
  1634.                 if v == Bone then BoneNum = k end
  1635.             end
  1636.         else BoneNum = 0 end
  1637.  
  1638.         if BoneNum == 0 then
  1639.             table.insert( SmegHack.BoneOrder, Bone )
  1640.         elseif BoneNum == 1 then
  1641.             table.remove( SmegHack.BoneOrder, BoneNum )
  1642.         else
  1643.             table.remove( SmegHack.BoneOrder, BoneNum )
  1644.             table.insert( SmegHack.BoneOrder, BoneNum-1, Bone )
  1645.         end
  1646.         UpdateBoneThink = true
  1647.     end
  1648.     AddBoneButton.DoClick = function()
  1649.         local BoneNum
  1650.         if table.HasValue( SmegHack.BoneOrder, Bone ) then
  1651.             for k, v in pairs( SmegHack.BoneOrder ) do
  1652.                 if v == Bone then BoneNum = k end
  1653.             end
  1654.         else BoneNum = 0 end
  1655.  
  1656.         if BoneNum == 0 then
  1657.             table.insert( SmegHack.BoneOrder, 1, Bone )
  1658.         elseif BoneNum == 21 then
  1659.             table.remove( SmegHack.BoneOrder, BoneNum )
  1660.         else
  1661.             if BoneNum != table.Count( SmegHack.BoneOrder ) then
  1662.                 table.remove( SmegHack.BoneOrder, BoneNum )
  1663.                 table.insert( SmegHack.BoneOrder, BoneNum+1, Bone )
  1664.             else
  1665.                 table.remove( SmegHack.BoneOrder, BoneNum )
  1666.             end
  1667.         end
  1668.         UpdateBoneThink = true
  1669.     end
  1670.     AddBoneButton.Think = function()
  1671.         if UpdateBoneThink then
  1672.             if UpdateBoneThinkNum != 21 then
  1673.                 local BoneNum
  1674.                 if table.HasValue( SmegHack.BoneOrder, Bone ) then
  1675.                     for k, v in pairs( SmegHack.BoneOrder ) do
  1676.                         if v == Bone then BoneNum = k end
  1677.                     end
  1678.                 else BoneNum = 0 end
  1679.                 if BoneNum != 0 then
  1680.                     AddBoneButton:SetText(tostring(BoneNum))
  1681.                 else
  1682.                     AddBoneButton:SetText("-")
  1683.                 end
  1684.                 UpdateBoneThinkNum = UpdateBoneThinkNum+1
  1685.             end
  1686.             if UpdateBoneThinkNum == 21 then
  1687.                 UpdateBoneThinkNum = 0
  1688.                 UpdateBoneThink = false
  1689.             end
  1690.         end
  1691.     end
  1692. end
  1693.  
  1694. function AddComboBox( Parent, PosX, PosY, SizeX, SizeY, Var, ChoiceTable, ExtraFunc )
  1695.     local AddComboBox = vgui.Create( "DComboBox", Parent )
  1696.     AddComboBox:SetPos( PosX, PosY )
  1697.     AddComboBox:SetSize( SizeX, SizeY )
  1698.     AddComboBox:SetValue(SmegHack.Options[Var])
  1699.     for k, v in pairs( ChoiceTable ) do
  1700.         AddComboBox:AddChoice(v)
  1701.     end
  1702.     AddComboBox.OnSelect = function(Selected)
  1703.         SmegHack.Options[Var] = Selected:GetValue()
  1704.         if ExtraFunc != nil then
  1705.             ExtraFunc()
  1706.         end
  1707.     end
  1708. end
  1709.  
  1710. function AddSlider( Parent, Var, PosX, PosY, Min, Max, Decimals )
  1711.     local AddSlider = vgui.Create( "Slider", Parent )
  1712.     AddSlider:SetSize( 150, 15 )
  1713.     AddSlider:SetPos( PosX, PosY )
  1714.     AddSlider:SetMin( Min )
  1715.     AddSlider:SetMax( Max )
  1716.     AddSlider:SetDecimals( Decimals )
  1717.     AddSlider:SetValue( SmegHack.Options[Var] )
  1718.     AddSlider.OnValueChanged = function( Panel, Value )
  1719.         SmegHack.Options[Var] = math.Round( Value, Decimals )
  1720.     end
  1721.     AddSlider.Paint = function()
  1722.         draw.RoundedBox( 0, 0, 0, 135, 15, Color(255,255,255,255) )
  1723.         surface.SetDrawColor(Color(0,0,0,255))
  1724.         surface.DrawOutlinedRect( 0, 0, 135, 15 )
  1725.         surface.DrawLine( 105, 0, 105, 15 )
  1726.     end
  1727. end
  1728.  
  1729. function AddTextEntry( Parent, Width, PosX, PosY, DefaultText, Var, Save )
  1730.     local AddTextEntry = vgui.Create("DTextEntry", Parent)
  1731.     AddTextEntry:SetWide(Width)
  1732.     AddTextEntry:SetPos(PosX,PosY)
  1733.     if Save != nil && SmegHack.TextEntries[Var] != nil then
  1734.         AddTextEntry:SetText(SmegHack.TextEntries[Var])
  1735.     else
  1736.         AddTextEntry:SetText(DefaultText)
  1737.     end
  1738.     AddTextEntry.OnGetFocus = function()
  1739.         if AddTextEntry:GetText() == DefaultText then
  1740.             AddTextEntry:SetText("")
  1741.         end
  1742.     end
  1743.     AddTextEntry.OnLoseFocus = function()
  1744.         if AddTextEntry:GetText() == "" then
  1745.             AddTextEntry:SetText(DefaultText)
  1746.             SmegHack.TextEntries[Var] = nil
  1747.         else
  1748.             SmegHack.TextEntries[Var] = AddTextEntry:GetText()
  1749.         end
  1750.     end
  1751. end
  1752.  
  1753. function AddDisplayBox( Title, Mode )
  1754.     local DisplayBox = vgui.Create( "DFrame" )
  1755.     DisplayBox:SetTitle("")
  1756.     DisplayBox:ShowCloseButton(false)
  1757.     DisplayBox:SetDraggable(true)
  1758.     DisplayBox:SetSize( 150, 50 )
  1759.     function DisplayBox:Paint( w, h )
  1760.         draw.RoundedBox( 0, 0, 0, w, 24, Color(0,0,0,255) )
  1761.         draw.RoundedBox( 0, 0, 0, w, h, Color(0,10,20,245) )
  1762.         draw.SimpleText( Title, "Menu_Title", w/2, 13, Color(0,100,200), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER )
  1763.     end
  1764.  
  1765.     if Mode == 1 then
  1766.         DisplayBox:SetPos( SmegHack.Options["Misc_AdminBox_PosX"], SmegHack.Options["Misc_AdminBox_PosY"] )
  1767.         local AdminTable = {"Moo"}
  1768.         local Wait = false
  1769.         AddHook( "AdminDisplayBox", "Think", RandomString(), function()
  1770.             if !SmegHack.Options["Misc_AdminBox"] then
  1771.                 DisplayBox:Close()
  1772.                 RemoveHook("AdminDisplayBox")
  1773.             end
  1774.             local PoX, PoY = DisplayBox:GetPos()
  1775.             if  SmegHack.Options["Misc_AdminBox_PosX"] != PoX ||  SmegHack.Options["Misc_AdminBox_PosY"] != PoY then
  1776.                 SmegHack.Options["Misc_AdminBox_PosX"], SmegHack.Options["Misc_AdminBox_PosY"] = PoX, PoY
  1777.             end
  1778.             local TempAdminTable = {}
  1779.             for k, v in pairs(player.GetAll()) do
  1780.                 if v:IsAdmin() || v:IsSuperAdmin() then
  1781.                     table.insert( TempAdminTable, v:Nick() )
  1782.                 end
  1783.             end
  1784.             if table.concat(TempAdminTable) != table.concat(AdminTable) then
  1785.                 if !AdminsListBool && !Wait then
  1786.                     AdminsListBool = true
  1787.                     timer.Simple( 0.1, function() AdminsListBool = false Wait = true end )
  1788.                 elseif Wait then
  1789.                     AdminTable = table.Copy(TempAdminTable)
  1790.                     local TextWidth, Tall = 140, 30
  1791.                     local OldWidth, OldTall = DisplayBox:GetSize()
  1792.                     if AdminTable[1] != nil then
  1793.                         for k, v in pairs(AdminTable) do
  1794.                             local TempTextWidth = AddLabel( DisplayBox, v, 5, Tall, "Admins" )
  1795.                             if TempTextWidth > TextWidth then TextWidth = TempTextWidth end
  1796.                             Tall = Tall + 15
  1797.                         end
  1798.                         DisplayBox:SetSize( TextWidth + 10, Tall+5 )
  1799.                     else
  1800.                         AddLabel( DisplayBox, "No Admins Online", 5, Tall, "Admins" )
  1801.                         DisplayBox:SetSize( 150, 50 )
  1802.                     end
  1803.                     local DifferenceX, DifferenceY = OldWidth - TextWidth+10, OldTall - Tall+5
  1804.                     local Var = "AdminBox" //This used to be a function but it screwed up, so I just added it to the hook and I couldn't be bothered making it look normal incase you are wondering what the point of this is
  1805.                     if DifferenceX < 0 then
  1806.                         DifferenceX = DifferenceX * -1
  1807.                         RightPos = SmegHack.Options["Misc_"..Var.."_PosX"] - DifferenceX
  1808.                     else
  1809.                         RightPos = SmegHack.Options["Misc_"..Var.."_PosX"] + DifferenceX
  1810.                     end
  1811.                     if DifferenceY < 0 then
  1812.                         DifferenceY = DifferenceY * -1
  1813.                         BottomPos = SmegHack.Options["Misc_"..Var.."_PosY"] - DifferenceY
  1814.                     else
  1815.                         BottomPos = SmegHack.Options["Misc_"..Var.."_PosY"] + DifferenceY
  1816.                     end
  1817.  
  1818.                     if SmegHack.Options["Misc_"..Var.."_Mode"] == "Auto" then
  1819.                         local PosX, PosY
  1820.                         if SmegHack.Options["Misc_"..Var.."_PosX"] > ScrW()/2 then PosX = RightPos else PosX = SmegHack.Options["Misc_"..Var.."_PosX"] end
  1821.                         if SmegHack.Options["Misc_"..Var.."_PosY"] > ScrH()/2 then PosY = BottomPos else PosY = SmegHack.Options["Misc_"..Var.."_PosY"] end
  1822.                         DisplayBox:SetPos( PosX, PosY )
  1823.                     elseif SmegHack.Options["Misc_"..Var.."_Mode"] == "Top Right" then
  1824.                         DisplayBox:SetPos( RightPos, SmegHack.Options["Misc_"..Var.."_PosY"] )
  1825.                     elseif SmegHack.Options["Misc_"..Var.."_Mode"] == "Bottom Left" then
  1826.                         DisplayBox:SetPos( SmegHack.Options["Misc_"..Var.."_PosX"], BottomPos )
  1827.                     elseif SmegHack.Options["Misc_"..Var.."_Mode"] == "Bottom Right" then
  1828.                         DisplayBox:SetPos( RightPos, BottomPos )
  1829.                     end
  1830.                     Wait = false
  1831.                 end
  1832.             end
  1833.         end)
  1834.     elseif Mode == 2 then
  1835.         DisplayBox:SetPos( SmegHack.Options["Misc_SpectatorsBox_PosX"], SmegHack.Options["Misc_SpectatorsBox_PosY"] )
  1836.         local SpecsTable = {"Moo"}
  1837.         local Wait = false
  1838.         AddHook( "SpecDisplayBox", "Think", RandomString(), function()
  1839.             if !SmegHack.Options["Misc_SpectatorsBox"] then
  1840.                 DisplayBox:Close()
  1841.                 RemoveHook("SpecDisplayBox")
  1842.             end
  1843.             local PoX, PoY = DisplayBox:GetPos()
  1844.             if  SmegHack.Options["Misc_SpectatorsBox_PosX"] != PoX ||  SmegHack.Options["Misc_SpectatorsBox_PosY"] != PoY then
  1845.                 SmegHack.Options["Misc_SpectatorsBox_PosX"], SmegHack.Options["Misc_SpectatorsBox_PosY"] = PoX, PoY
  1846.             end
  1847.             local TempSpecsTable = {}
  1848.             for k, v in pairs(player.GetAll()) do
  1849.                 if v:GetObserverTarget() == LocalPlayer() then
  1850.                     table.insert( TempSpecsTable, v:Nick() )
  1851.                 end
  1852.             end
  1853.             if table.concat(TempSpecsTable) != table.concat(SpecsTable) then
  1854.                 if !SpecsListBool && !Wait then
  1855.                     SpecsListBool = true
  1856.                     timer.Simple( 0.1, function() SpecsListBool = false Wait = true end )
  1857.                 elseif Wait then
  1858.                     SpecsTable = table.Copy(TempSpecsTable)
  1859.                     local TextWidth, Tall = 140, 30
  1860.                     local OldWidth, OldTall = DisplayBox:GetSize()
  1861.                     if SpecsTable[1] != nil then
  1862.                         for k, v in pairs(SpecsTable) do
  1863.                             local TempTextWidth = AddLabel( DisplayBox, v, 5, Tall, "Spectators" )
  1864.                             if TempTextWidth > TextWidth then TextWidth = TempTextWidth end
  1865.                             Tall = Tall + 15
  1866.                         end
  1867.                         DisplayBox:SetSize( TextWidth + 10, Tall+5 )
  1868.                     else
  1869.                         AddLabel( DisplayBox, "No Spectators", 5, Tall, "Spectators" )
  1870.                         DisplayBox:SetSize( 150, 50 )
  1871.                     end
  1872.                     local DifferenceX, DifferenceY = OldWidth - TextWidth+10, OldTall - Tall+5
  1873.                     local Var = "SpectatorsBox"
  1874.                     if DifferenceX < 0 then
  1875.                         DifferenceX = DifferenceX * -1
  1876.                         RightPos = SmegHack.Options["Misc_"..Var.."_PosX"] - DifferenceX
  1877.                     else
  1878.                         RightPos = SmegHack.Options["Misc_"..Var.."_PosX"] + DifferenceX
  1879.                     end
  1880.                     if DifferenceY < 0 then
  1881.                         DifferenceY = DifferenceY * -1
  1882.                         BottomPos = SmegHack.Options["Misc_"..Var.."_PosY"] - DifferenceY
  1883.                     else
  1884.                         BottomPos = SmegHack.Options["Misc_"..Var.."_PosY"] + DifferenceY
  1885.                     end
  1886.  
  1887.                     if SmegHack.Options["Misc_"..Var.."_Mode"] == "Auto" then
  1888.                         local PosX, PosY
  1889.                         if SmegHack.Options["Misc_"..Var.."_PosX"] > ScrW()/2 then PosX = RightPos else PosX = SmegHack.Options["Misc_"..Var.."_PosX"] end
  1890.                         if SmegHack.Options["Misc_"..Var.."_PosY"] > ScrH()/2 then PosY = BottomPos else PosY = SmegHack.Options["Misc_"..Var.."_PosY"] end
  1891.                         DisplayBox:SetPos( PosX, PosY )
  1892.                     elseif SmegHack.Options["Misc_"..Var.."_Mode"] == "Top Right" then
  1893.                         DisplayBox:SetPos( RightPos, SmegHack.Options["Misc_"..Var.."_PosY"] )
  1894.                     elseif SmegHack.Options["Misc_"..Var.."_Mode"] == "Bottom Left" then
  1895.                         DisplayBox:SetPos( SmegHack.Options["Misc_"..Var.."_PosX"], BottomPos )
  1896.                     elseif SmegHack.Options["Misc_"..Var.."_Mode"] == "Bottom Right" then
  1897.                         DisplayBox:SetPos( RightPos, BottomPos )
  1898.                     end
  1899.                     Wait = false
  1900.                 end
  1901.             end
  1902.         end)
  1903.     end
  1904. end
  1905.  
  1906. function AddSavePage( Parent, Mode )
  1907.     local ManageSaves = vgui.Create("DListView", Parent)
  1908.     ManageSaves:SetPos( 25, 55 )
  1909.     ManageSaves:SetSize( 550, 200 )
  1910.     ManageSaves:SetMultiSelect(false)
  1911.     ManageSaves:AddColumn("Title")
  1912.     ManageSaves:AddColumn("Date Created")
  1913.     function RefreshSaveList(Location, Parent)
  1914.         Parent:Clear()
  1915.         if !file.Exists( "sh/"..Location, "DATA" ) then file.CreateDir( "sh/"..Location ) end
  1916.         if file.Exists( "sh/"..Location, "DATA" ) then
  1917.             local Files, Dirs = file.Find( "sh/"..Location.."/*", "DATA" )
  1918.             for k, v in pairs( Files ) do
  1919.                 local Title = string.StripExtension(v)
  1920.                 local SaveTable = string.Explode( "|", file.Read( "sh/"..Location.."/"..v, "DATA" ) )
  1921.                 local Date = SaveTable[1]
  1922.                 local Time = SaveTable[2]
  1923.                 if Time != nil && Date != nil then
  1924.                     Parent:AddLine(Title, Date.."|"..Time)
  1925.                 else
  1926.                     Parent:AddLine(Title, "This save has been corrupted")
  1927.                 end
  1928.             end
  1929.         end
  1930.     end
  1931.     RefreshSaveList(Mode, ManageSaves)
  1932.    
  1933.     AddTextEntry( Parent, 275, 25, 275, "Input Save Title", Mode )
  1934.     AddGenericButton( Parent, "Refresh Listings", 100, 20, 475, 275, function () RefreshSaveList(Mode, ManageSaves) end )
  1935.     AddGenericButton( Parent, "Delete", 51, 20, 419, 275, function()
  1936.         if ManageSaves:GetSelectedLine() != nil then
  1937.             local SaveTitle = ManageSaves:GetLine(ManageSaves:GetSelectedLine()):GetValue(1)
  1938.             if file.Exists( "sh/"..Mode.."/"..SaveTitle..".txt", "DATA" ) then file.Delete( "sh/"..Mode.."/"..SaveTitle..".txt" ) end
  1939.             RefreshSaveList(Mode, ManageSaves)
  1940.         end
  1941.     end)
  1942.     AddGenericButton( Parent, "Load", 52, 20, 362, 275, function()
  1943.         if ManageSaves:GetSelectedLine() != nil then
  1944.             local SaveTitle = ManageSaves:GetLine(ManageSaves:GetSelectedLine()):GetValue(1)
  1945.             if file.Exists( "sh/"..Mode.."/"..SaveTitle..".txt", "DATA" ) then
  1946.                 local SaveFile = file.Read( "sh/"..Mode.."/"..SaveTitle..".txt" )
  1947.                 local SaveFileTable = string.Explode( "|", SaveFile )
  1948.                 for k, v in pairs( SaveFileTable ) do
  1949.                     if k != 1 && k != 2 then
  1950.                         if ManageSaves:GetLine(ManageSaves:GetSelectedLine()):GetValue(2) != "This save has been corrupted" then
  1951.                             if Mode == "Friends" then
  1952.                                 table.insert( SmegHack.FriendsList, v )
  1953.                             elseif Mode == "Configs" then
  1954.                                 if string.Left( v, 1 ) == "{" then
  1955.                                     SmegHack.BoneOrder = util.JSONToTable( v )
  1956.                                 else
  1957.                                     local CommandTable = string.Explode( " ", v )
  1958.                                     if CommandTable[3] == "true" || CommandTable[3] == "false" then
  1959.                                         SmegHack.Options[CommandTable[1]] = tobool(CommandTable[3])
  1960.                                     elseif isnumber(tonumber(CommandTable[3])) then
  1961.                                         SmegHack.Options[CommandTable[1]] = tonumber(CommandTable[3])
  1962.                                     else
  1963.                                         SmegHack.Options[CommandTable[1]] = tostring(CommandTable[3])
  1964.                                     end
  1965.                                 end
  1966.                             elseif Mode == "Entities" then
  1967.                                 table.insert( SmegHack.EntityESP, v )
  1968.                             end
  1969.                         end
  1970.                     end
  1971.                 end
  1972.                 if ManageSaves:GetLine(ManageSaves:GetSelectedLine()):GetValue(2) != "This save has been corrupted" then
  1973.                     if Mode == "Friends" then
  1974.                         RefreshFriendsList()
  1975.                     elseif Mode == "Configs" then
  1976.                         //RefreshSaveList( Mode, ManageSaves )
  1977.                         CloseMenu()
  1978.                         ReloadSmegHack(false)
  1979.                     elseif Mode == "Entities" then
  1980.                         RefreshEntsList()
  1981.                     end
  1982.                 end
  1983.             end
  1984.         end
  1985.     end)
  1986.     AddGenericButton( Parent, "Save", 52, 20, 305, 275, function()
  1987.         if SmegHack.TextEntries[Mode] != nil then
  1988.             local Files, Dirs = file.Find( "sh/"..Mode.."/*", "DATA" )
  1989.             for k, v in pairs( Files ) do
  1990.                 local Title = string.StripExtension(v)
  1991.                 if Title == SmegHack.TextEntries[Mode] then return end
  1992.             end
  1993.             if !file.Exists( "sh/"..Mode, "DATA" ) then file.CreateDir( "sh/"..Mode ) end
  1994.             if file.Exists( "sh/"..Mode, "DATA" ) then
  1995.                 if tonumber( os.date("%H"), 10 ) < 12 then
  1996.                     local SaveText = os.date("%d/%m/%y | %I:%M AM")
  1997.                     if Mode == "Friends" then
  1998.                         for k, v in pairs( SmegHack.FriendsList ) do
  1999.                             SaveText = SaveText.."|"..v
  2000.                         end
  2001.                         file.Write( "sh/"..Mode.."/"..SmegHack.TextEntries[Mode]..".txt", SaveText)
  2002.                     elseif Mode == "Configs" then
  2003.                         for k, v in pairs( SmegHack.Options ) do
  2004.                             SaveText = SaveText.."|"..k.." = "..tostring(v)
  2005.                         end
  2006.                         SaveText = SaveText.."|"..util.TableToJSON( SmegHack.BoneOrder )
  2007.                         file.Write( "sh/"..Mode.."/"..SmegHack.TextEntries[Mode]..".txt", SaveText)
  2008.                     elseif Mode == "Entities" then
  2009.                         for k, v in pairs( SmegHack.EntityESP ) do
  2010.                             SaveText = SaveText.."|"..v
  2011.                         end
  2012.                         file.Write( "sh/"..Mode.."/"..SmegHack.TextEntries[Mode]..".txt", SaveText)
  2013.                     end
  2014.                 else
  2015.                     local SaveText = os.date("%d/%m/%y | %I:%M PM")
  2016.                     if Mode == "Friends" then
  2017.                         for k, v in pairs( SmegHack.FriendsList ) do
  2018.                             SaveText = SaveText.."|"..v
  2019.                         end
  2020.                         file.Write( "sh/"..Mode.."/"..SmegHack.TextEntries[Mode]..".txt", SaveText)
  2021.                     elseif Mode == "Configs" then
  2022.                         for k, v in pairs( SmegHack.Options ) do
  2023.                             SaveText = SaveText.."|"..k.." = "..tostring(v)
  2024.                         end
  2025.                         SaveText = SaveText.."|"..util.TableToJSON( SmegHack.BoneOrder )
  2026.                         file.Write( "sh/"..Mode.."/"..SmegHack.TextEntries[Mode]..".txt", SaveText)
  2027.                     elseif Mode == "Entities" then
  2028.                         for k, v in pairs( SmegHack.EntityESP ) do
  2029.                             SaveText = SaveText.."|"..v
  2030.                         end
  2031.                         file.Write( "sh/"..Mode.."/"..SmegHack.TextEntries[Mode]..".txt", SaveText)
  2032.                     end
  2033.                 end
  2034.             end
  2035.             RefreshSaveList(Mode, ManageSaves)
  2036.         end
  2037.     end)
  2038.     AddGenericButton( Parent, "Rename", 52, 20, 305, 300, function()
  2039.         if ManageSaves:GetSelectedLine() != nil && SmegHack.TextEntries[Mode] != nil then
  2040.             local SaveTitle = ManageSaves:GetLine(ManageSaves:GetSelectedLine()):GetValue(1)
  2041.             if file.Exists( "sh/"..Mode.."/"..SaveTitle..".txt", "DATA" ) then
  2042.                 local Files, Dirs = file.Find( "sh/"..Mode.."/*", "DATA" )
  2043.                 for k, v in pairs( Files ) do
  2044.                     local Title = string.StripExtension(v)
  2045.                     if Title == SmegHack.TextEntries[Mode] then return end
  2046.                 end
  2047.                 local SaveFileText = file.Read( "sh/"..Mode.."/"..SaveTitle..".txt", "DATA" )
  2048.                 file.Delete( "sh/"..Mode.."/"..SaveTitle..".txt" )
  2049.                 file.Write( "sh/"..Mode.."/"..SmegHack.TextEntries[Mode]..".txt", SaveFileText )
  2050.                 RefreshSaveList(Mode, ManageSaves)
  2051.             end
  2052.         end
  2053.     end)
  2054. end
  2055.  
  2056. function SmegHackMenu()
  2057.     if MenuOpen then
  2058.         CloseMenu()
  2059.         return
  2060.     end
  2061.     MenuOpen = true
  2062.     //Menu Frame
  2063.     local Menu = vgui.Create("DFrame")
  2064.     Menu:SetTitle("")
  2065.     Menu:ShowCloseButton(false)
  2066.     Menu:SetDraggable(true)
  2067.     Menu:SetSize(600, 400)
  2068.     Menu:Center()
  2069.     Menu:MakePopup()
  2070.     function Menu:Paint( w, h )
  2071.         //Title Bar
  2072.         draw.RoundedBox( 0, 0, 0, w, 24, Color(0,0,0,255) )
  2073.         draw.RoundedBox( 0, 0, 0, w, h, Color(0,10,20,245) )
  2074.        
  2075.         draw.SimpleText( "Smeg Hack", "Menu_Title", w/2, 11, Color(0,100,200), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER )
  2076.         draw.SimpleText( "FPS: "..FPSValue, "ESP_Font_Main", 5, 2, Color(0,255,0),TEXT_ALIGN_LEFT, TEXT_ALIGN_BOTTOM )
  2077.         draw.SimpleText( "Ping: "..LocalPlayer():Ping(), "ESP_Font_Main", 65, 2, Color(0,255,0), TEXT_ALIGN_LEFT, TEXT_ALIGN_BOTTOM )
  2078.        
  2079.         //Menu Tabs
  2080.         draw.RoundedBox( 0, 0, 25, w, 30, Color(128,128,128,255) )
  2081.         surface.SetDrawColor( Color(0,0,0) )
  2082.         surface.DrawLine( 0, 24, w, 24 )
  2083.         surface.DrawLine( 0, 55, w, 55 )
  2084.         surface.DrawLine( 0, 24, 0, 55 )
  2085.         surface.DrawLine( 50, 24, 50, 55 )
  2086.         surface.DrawLine( 100, 24, 100, 55 )
  2087.         surface.DrawLine( 150, 24, 150, 55 )
  2088.         surface.DrawLine( 200, 24, 200, 55 )
  2089.         surface.DrawLine( 250, 24, 250, 55 )
  2090.         surface.DrawLine( 300, 24, 300, 55 )
  2091.         surface.DrawLine( 350, 24, 350, 55 )
  2092.         surface.DrawLine( 400, 24, 400, 55 )
  2093.         surface.DrawLine( 450, 24, 450, 55 )
  2094.         surface.DrawLine( 500, 24, 500, 55 )
  2095.         surface.DrawLine( 550, 24, 550, 55 )
  2096.         surface.DrawLine( 599, 24, 599, 55 )
  2097.    end
  2098.    
  2099.     //Tab Frames
  2100.     local Main = vgui.Create("DPanel", Menu)
  2101.     Main:SetPos( 0 , 25 )
  2102.     Main:SetSize( Menu:GetWide(), Menu:GetTall()-25 )
  2103.     Main:SetVisible( false )
  2104.     function Main:Paint()
  2105.         draw.RoundedBox( 0, 1, 0, 49, 30, Color(0,0,255,255) )
  2106.     end
  2107.    
  2108.     local Aimbot = vgui.Create("DPanel", Menu)
  2109.     Aimbot:SetPos( 0 , 25 )
  2110.     Aimbot:SetSize( Menu:GetWide(), Menu:GetTall()-25 )
  2111.     Aimbot:SetVisible( false )
  2112.     function Aimbot:Paint()
  2113.         draw.RoundedBox( 0, 51, 0, 49, 30, Color(0,0,255,255) )
  2114.  
  2115.         surface.SetDrawColor( Color(255,255,255,255) )
  2116.  
  2117.         //Head
  2118.         surface.DrawCircle( 490, 75, 30, {255,255,255,255} )
  2119.  
  2120.         //Spine
  2121.         surface.DrawLine( 490, 105, 490, 255 )
  2122.  
  2123.         //Arms
  2124.         surface.DrawLine( 490, 180, 440, 130 )
  2125.         surface.DrawLine( 490, 180, 540, 130 )
  2126.         //Hands
  2127.         surface.DrawLine( 440, 130, 420, 130 )
  2128.         surface.DrawLine( 540, 130, 560, 130 )
  2129.  
  2130.         //Legs
  2131.         surface.DrawLine( 490, 255, 440, 305 )
  2132.         surface.DrawLine( 490, 255, 540, 305 )
  2133.         //Feet
  2134.         surface.DrawLine( 440, 305, 400, 305 )
  2135.         surface.DrawLine( 540, 305, 580, 305 )
  2136.     end
  2137.    
  2138.     local ESP = vgui.Create("DPanel", Menu)
  2139.     ESP:SetPos( 0 , 25 )
  2140.     ESP:SetSize( Menu:GetWide(), Menu:GetTall()-25 )
  2141.     ESP:SetVisible( false )
  2142.     function ESP:Paint()
  2143.         draw.RoundedBox( 0, 101, 0, 49, 30, Color(0,0,255,255) )
  2144.     end
  2145.    
  2146.     local Ents = vgui.Create("DPanel", Menu)
  2147.     Ents:SetPos( 0 , 25 )
  2148.     Ents:SetSize( Menu:GetWide(), Menu:GetTall()-25 )
  2149.     Ents:SetVisible( false )
  2150.     function Ents:Paint()
  2151.         draw.RoundedBox( 0, 151, 0, 49, 30, Color(0,0,255,255) )
  2152.     end
  2153.    
  2154.     local Misc = vgui.Create("DPanel", Menu)
  2155.     Misc:SetPos( 0 , 25 )
  2156.     Misc:SetSize( Menu:GetWide(), Menu:GetTall()-25 )
  2157.     Misc:SetVisible( false )
  2158.     function Misc:Paint()
  2159.         draw.RoundedBox( 0, 201, 0, 49, 30, Color(0,0,255,255) )
  2160.     end
  2161.    
  2162.     local Friends = vgui.Create("DPanel", Menu)
  2163.     Friends:SetPos( 0 , 25 )
  2164.     Friends:SetSize( Menu:GetWide(), Menu:GetTall()-25 )
  2165.     Friends:SetVisible( false )
  2166.     function Friends:Paint()
  2167.         draw.RoundedBox( 0, 251, 0, 49, 30, Color(0,0,255,255) )
  2168.         draw.SimpleText( "Friends                                                       Enemies", "ESP_Font_Main", 300, 43, Color(0,255,0), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER )
  2169.     end
  2170.    
  2171.     local Cams = vgui.Create("DPanel", Menu)
  2172.     Cams:SetPos( 0 , 25 )
  2173.     Cams:SetSize( Menu:GetWide(), Menu:GetTall()-25 )
  2174.     Cams:SetVisible( false )
  2175.     function Cams:Paint()
  2176.         draw.RoundedBox( 0, 301, 0, 49, 30, Color(0,0,255,255) )
  2177.     end
  2178.    
  2179.     local Bhop = vgui.Create("DPanel", Menu)
  2180.     Bhop:SetPos( 0 , 25 )
  2181.     Bhop:SetSize( Menu:GetWide(), Menu:GetTall()-25 )
  2182.     Bhop:SetVisible( false )
  2183.     function Bhop:Paint()
  2184.         draw.RoundedBox( 0, 351, 0, 49, 30, Color(0,0,255,255) )
  2185.     end
  2186.    
  2187.     local Spam = vgui.Create("DPanel", Menu)
  2188.     Spam:SetPos( 0 , 25 )
  2189.     Spam:SetSize( Menu:GetWide(), Menu:GetTall()-25 )
  2190.     Spam:SetVisible( false )
  2191.     function Spam:Paint()
  2192.         draw.RoundedBox( 0, 401, 0, 49, 30, Color(0,0,255,255) )
  2193.     end
  2194.    
  2195.     local Test10 = vgui.Create("DPanel", Menu)
  2196.     Test10:SetPos( 0 , 25 )
  2197.     Test10:SetSize( Menu:GetWide(), Menu:GetTall()-25 )
  2198.     Test10:SetVisible( false )
  2199.     function Test10:Paint()
  2200.         draw.RoundedBox( 0, 451, 0, 49, 30, Color(0,0,255,255) )
  2201.     end
  2202.    
  2203.     local Test11 = vgui.Create("DPanel", Menu)
  2204.     Test11:SetPos( 0 , 25 )
  2205.     Test11:SetSize( Menu:GetWide(), Menu:GetTall()-25 )
  2206.     Test11:SetVisible( false )
  2207.     function Test11:Paint()
  2208.         draw.RoundedBox( 0, 501, 0, 49, 30, Color(0,0,255,255) )
  2209.     end
  2210.    
  2211.     local Config = vgui.Create("DPanel", Menu)
  2212.     Config:SetPos( 0 , 25 )
  2213.     Config:SetSize( Menu:GetWide(), Menu:GetTall()-25 )
  2214.     Config:SetVisible( false )
  2215.     function Config:Paint()
  2216.         draw.RoundedBox( 0, 551, 0, 48, 30, Color(0,0,255,255) )
  2217.         draw.SimpleText( "Configuration save manager", "ESP_Font_Main", 300, 43, Color(0,255,0), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER )
  2218.     end
  2219.    
  2220.     local FriendSaves = vgui.Create("DPanel", Menu)
  2221.     FriendSaves:SetPos( 0 , 25 )
  2222.     FriendSaves:SetSize( Menu:GetWide(), Menu:GetTall()-25 )
  2223.     FriendSaves:SetVisible( false )
  2224.     function FriendSaves:Paint()
  2225.         draw.RoundedBox( 0, 251, 0, 49, 30, Color(0,0,255,255) )
  2226.         draw.SimpleText( "Friends list save manager", "ESP_Font_Main", 300, 43, Color(0,255,0), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER )
  2227.     end
  2228.    
  2229.     local EntitySaves = vgui.Create("DPanel", Menu)
  2230.     EntitySaves:SetPos( 0 , 25 )
  2231.     EntitySaves:SetSize( Menu:GetWide(), Menu:GetTall()-25 )
  2232.     EntitySaves:SetVisible( false )
  2233.     function EntitySaves:Paint()
  2234.         draw.RoundedBox( 0, 151, 0, 49, 30, Color(0,0,255,255) )
  2235.         draw.SimpleText( "Entity ESP save manager", "ESP_Font_Main", 300, 43, Color(0,255,0), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER )
  2236.     end
  2237.  
  2238.     local CustomCrosshair = vgui.Create("DPanel", Menu)
  2239.     CustomCrosshair:SetPos( 0 , 25 )
  2240.     CustomCrosshair:SetSize( Menu:GetWide(), Menu:GetTall()-25 )
  2241.     CustomCrosshair:SetVisible( false )
  2242.     function CustomCrosshair:Paint()
  2243.         draw.RoundedBox( 0, 101, 0, 49, 30, Color(0,0,255,255) )
  2244.         draw.SimpleText( "Custom Crosshair", "ESP_Font_Main", 300, 43, Color(0,255,0), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER )
  2245.     end
  2246.    
  2247.     //Close Button     
  2248.     local CloseButton = vgui.Create("DButton", Menu)
  2249.     CloseButton:SetSize(24, 24)
  2250.     CloseButton:SetPos(Menu:GetWide()-24, 0)
  2251.     CloseButton:SetText("X")
  2252.     CloseButton:SetColor(Color(255,255,255))
  2253.     function CloseButton:Paint( w, h )
  2254.         draw.RoundedBox( 0, 0, 0, w, h, Color(0,30,100,200) )
  2255.     end
  2256.     CloseButton.DoClick = function() CloseMenu() end
  2257.    
  2258.     //Panic Button
  2259.     local PanicButton = vgui.Create("DButton", Menu)
  2260.     PanicButton:SetSize(40, 24)
  2261.     PanicButton:SetPos(Menu:GetWide()-64, 0)
  2262.     if GetConVarNumber("SmegHack_Panic") == 1 then
  2263.         PanicButton:SetText("Enable")
  2264.         PanicButton:SetColor(Color(50,200,0,255))
  2265.     else
  2266.         PanicButton:SetText("Disable")
  2267.         PanicButton:SetColor(Color(255,0,0,255))
  2268.     end
  2269.     function PanicButton:Paint( w, h )
  2270.         draw.RoundedBox( 0, 0, 0, w, h, Color(150,150,150,255) )
  2271.     end
  2272.     PanicButton.DoClick = function()
  2273.         if GetConVarNumber("SmegHack_Panic") == 1 then
  2274.             RunConsoleCommand("SmegHack_Panic", 0)
  2275.             PanicButton:SetText("Disable")
  2276.             PanicButton:SetColor(Color(255,0,0,255))
  2277.         else
  2278.             RunConsoleCommand("SmegHack_Panic", 1)
  2279.             PanicButton:SetText("Enable")
  2280.             PanicButton:SetColor(Color(50,200,0,255))
  2281.         end
  2282.     end
  2283.        
  2284.     //Menu Tabs
  2285.     AddMenuTab( Menu, "Main", Main, 1, 25, 1 )
  2286.     AddMenuTab( Menu, "Aimbot", Aimbot, 51, 25, 2 )
  2287.     AddMenuTab( Menu, "ESP", ESP, 101, 25, 3 )
  2288.     AddMenuTab( Menu, "Ents", Ents, 151, 25, 4 )
  2289.     AddMenuTab( Menu, "Misc", Misc, 201, 25, 5 )
  2290.     AddMenuTab( Menu, "Friends", Friends, 251, 25, 6 )
  2291.     AddMenuTab( Menu, "Cams", Cams, 301, 25, 7 )
  2292.     AddMenuTab( Menu, "Bhop", Bhop, 351, 25, 8 )
  2293.     AddMenuTab( Menu, "Spam", Spam, 401, 25, 9 )
  2294.     AddMenuTab( Menu, "Test10", Test10, 451, 25, 10 )
  2295.     AddMenuTab( Menu, "Test11", Test11, 501, 25, 11 )
  2296.     AddMenuTab( Menu, "Config", Config, 551, 25, 12 )
  2297.    
  2298.     function ChangeTab ( Tab, TabID )
  2299.         Main:SetVisible(false)
  2300.         Aimbot:SetVisible(false)
  2301.         ESP:SetVisible(false)
  2302.         Ents:SetVisible(false)
  2303.         Misc:SetVisible(false)
  2304.         Friends:SetVisible(false)
  2305.         Cams:SetVisible(false)
  2306.         Bhop:SetVisible(false)
  2307.         Spam:SetVisible(false)
  2308.         Test10:SetVisible(false)
  2309.         Test11:SetVisible(false)
  2310.         Config:SetVisible(false)
  2311.         FriendSaves:SetVisible(false)
  2312.         EntitySaves:SetVisible(false)
  2313.         CustomCrosshair:SetVisible(false)
  2314.        
  2315.         Tab:SetVisible(true)
  2316.         SmegHack.ActiveTab = TabID
  2317.     end
  2318.    
  2319.     //Main Tab
  2320.     AddMainMenuButton( Main, "Unload Hack", 100, 60, function()
  2321.         CloseMenu()
  2322.         UnloadSmegHack(true)
  2323.     end)
  2324.     AddMainMenuButton( Main, "Reload Hack", 250, 60, function()
  2325.         CloseMenu()
  2326.         ReloadSmegHack(true)
  2327.     end)
  2328.     AddMainMenuButton( Main, "Clear Saved Files", 400, 60, function()
  2329.         if file.Exists( "sh", "DATA" ) then
  2330.             local Files, Dirs = file.Find( "sh/*", "DATA" )
  2331.             for k, v in pairs( Files ) do
  2332.                 file.Delete( "sh/"..v )
  2333.             end
  2334.             for k, v in pairs( Dirs ) do
  2335.                 local Files, Dirs = file.Find( "sh/"..v.."/*", "DATA" )
  2336.                 local Dir = v
  2337.                 for k, v in pairs( Files ) do
  2338.                     file.Delete( "sh/"..Dir.."/"..v )
  2339.                 end
  2340.             end
  2341.         end
  2342.     end)
  2343.    
  2344.     //Aimbot Tab
  2345.     AddCheckBox( Aimbot, "Aimbot", 15, 45, "Enables/Disables Aimbot", "Aimbot_Toggle" )
  2346.     AddCheckBox( Aimbot, "LOS Check", 15, 65, "Only aims at visible players (players within your line of sight)", "Aimbot_LOSCheck" )
  2347.     AddCheckBox( Aimbot, "Auto Wall", 15, 85, "Aim at people behind walls that can be shot through", "Aimbot_AutoWall")
  2348.     AddCheckBox( Aimbot, "Auto Shoot", 100, 85, "Automatically shoot when the aimbot is locked onto someone", "Aimbot_AutoShoot")
  2349.  
  2350.     AddCheckBox( Aimbot, "Aim On Key", 15, 105, "Aimbot only active when selected key is held down", "Aimbot_AimOnKey" )
  2351.     AddKeyBind( Aimbot, 100, 105, "Aimbot_AimOnKey_Key" )
  2352.     AddLabel( Aimbot, "Aim Priority:", 40, 125 )
  2353.     AddComboBox( Aimbot, 100, 125, 100, 15, "Aimbot_AimPriority", {"Distance", "Crosshair"} )
  2354.     AddCheckBox( Aimbot, "Smooth Aim", 15, 145, "Aims at other players slowly (looks more legit)", "Aimbot_SmoothAim")
  2355.     AddSlider( Aimbot, "Aimbot_SmoothAim_Value", 100, 145, 0, 1000, 0 )
  2356.     AddCheckBox( Aimbot, "FOV", 15, 165, "Only aim at players within the selected field of view", "Aimbot_FOV")
  2357.     AddSlider( Aimbot, "Aimbot_FOV_Value", 100, 165, 0, 360, 0 )
  2358.     AddCheckBox( Aimbot, "Stick To Target", 15, 185, "Will stay aiming at the one target as long as they fall within the selected criteria above", "Aimbot_StickToTarget" )
  2359.     AddCheckBox( Aimbot, "Bone Aim", 15, 205, "Aims only at selected bone", "Aimbot_BoneAim" )
  2360.  
  2361.     AddCheckBox( Aimbot, "Team", 15, 245, "Aim at/ignore players on your team", "Aimbot_AimTeam" )
  2362.     AddCheckBox( Aimbot, "Opponents", 15, 265, "Aim at/ignore players on the other team", "Aimbot_AimOpponents" )
  2363.     AddCheckBox( Aimbot, "Friends", 15, 285, "Aim at/ignore players on your friends list", "Aimbot_AimFriends" )
  2364.     AddCheckBox( Aimbot, "Enemies", 15, 305, "Aim at/ignore players on your enemies list", "Aimbot_AimEnemies" )
  2365.     AddCheckBox( Aimbot, "NPCs", 15, 325, "Aim at/ignore NPCs", "Aimbot_AimNPCs" )
  2366.     AddCheckBox( Aimbot, "Spectators", 15, 345, "Aim at/ignore players who are in spectator mode", "Aimbot_AimSpectators" )
  2367.  
  2368.     AddComboBox( Aimbot, 100, 245, 70, 15, "Aimbot_AimTeamV", {"Aim", "Ignore"} )
  2369.     AddComboBox( Aimbot, 100, 265, 70, 15, "Aimbot_AimOpponentsV", {"Aim", "Ignore"} )
  2370.     AddComboBox( Aimbot, 100, 285, 70, 15, "Aimbot_AimFriendsV", {"Aim", "Ignore"} )
  2371.     AddComboBox( Aimbot, 100, 305, 70, 15, "Aimbot_AimEnemiesV", {"Aim", "Ignore"} )
  2372.     AddComboBox( Aimbot, 100, 325, 70, 15, "Aimbot_AimNPCsV", {"Aim", "Ignore"} )
  2373.     AddComboBox( Aimbot, 100, 345, 70, 15, "Aimbot_AimSpectatorsV", {"Aim", "Ignore"} )
  2374.  
  2375.     //AddLabel( Parent, Text, PosX, PosY, CloseOn )
  2376.     AddLabel( Aimbot, "Offset X:", 200, 325 )
  2377.     AddLabel( Aimbot, "Offset Y:", 200, 345 )
  2378.     AddSlider( Aimbot, "Aimbot_OffsetX", 250, 320, -100, 100, 0 )
  2379.     AddSlider( Aimbot, "Aimbot_OffsetY", 250, 340, -100, 100, 0 )
  2380.    
  2381.     AddBoneButton( Aimbot, 490, 75, "ValveBiped.Bip01_Head1" )
  2382.     AddBoneButton( Aimbot, 490, 120, "ValveBiped.Bip01_Neck1" )
  2383.     AddBoneButton( Aimbot, 490, 150, "ValveBiped.Bip01_Spine4" )
  2384.     AddBoneButton( Aimbot, 490, 175, "ValveBiped.Bip01_Spine2" )
  2385.     AddBoneButton( Aimbot, 490, 200, "ValveBiped.Bip01_Spine1" )
  2386.     AddBoneButton( Aimbot, 490, 225, "ValveBiped.Bip01_Spine" )
  2387.     AddBoneButton( Aimbot, 490, 255, "ValveBiped.Bip01_Pelvis" )
  2388.     AddBoneButton( Aimbot, 470, 160, "ValveBiped.Bip01_R_UpperArm" )
  2389.     AddBoneButton( Aimbot, 450, 140, "ValveBiped.Bip01_R_Forearm" )
  2390.     AddBoneButton( Aimbot, 430, 130, "ValveBiped.Bip01_R_Hand" )
  2391.     AddBoneButton( Aimbot, 510, 165, "ValveBiped.Bip01_L_UpperArm" )
  2392.     AddBoneButton( Aimbot, 530, 140, "ValveBiped.Bip01_L_Forearm" )
  2393.     AddBoneButton( Aimbot, 550, 130, "ValveBiped.Bip01_L_Hand" )
  2394.     AddBoneButton( Aimbot, 470, 275, "ValveBiped.Bip01_R_Thigh" )
  2395.     AddBoneButton( Aimbot, 450, 295, "ValveBiped.Bip01_R_Calf" )
  2396.     AddBoneButton( Aimbot, 430, 305, "ValveBiped.Bip01_R_Foot" )
  2397.     AddBoneButton( Aimbot, 410, 305, "ValveBiped.Bip01_R_Toe0" )
  2398.     AddBoneButton( Aimbot, 510, 275, "ValveBiped.Bip01_L_Thigh" )
  2399.     AddBoneButton( Aimbot, 530, 295, "ValveBiped.Bip01_L_Calf" )
  2400.     AddBoneButton( Aimbot, 550, 305, "ValveBiped.Bip01_L_Foot" )
  2401.     AddBoneButton( Aimbot, 570, 305, "ValveBiped.Bip01_L_Toe0" )
  2402.  
  2403.     AddGenericButton( Aimbot, "Fill", 85, 30, 400, 325, function()
  2404.         for k, v in pairs(SmegHack.Bones) do
  2405.             if !table.HasValue( SmegHack.BoneOrder, v ) then
  2406.                 table.insert( SmegHack.BoneOrder, v )
  2407.             end
  2408.         end
  2409.         UpdateBoneThink = true
  2410.     end)
  2411.     AddGenericButton( Aimbot, "Clear", 85, 30, 495, 325, function()
  2412.         table.Empty( SmegHack.BoneOrder )
  2413.         UpdateBoneThink = true
  2414.     end)
  2415.    
  2416.  
  2417.     //ESP Tab
  2418.     AddCheckBox( ESP, "ESP", 15, 45, "Enables/Disables ESP", "ESP_Toggle" )
  2419.     AddCheckBox( ESP, "Team", 15, 65, "Draw/Ignore ESP for players on your team", "ESP_ShowTeam" )
  2420.     AddCheckBox( ESP, "Opponents", 15, 85, "Draw/Ignore ESP for players not on your team", "ESP_ShowOpponents" )
  2421.     AddCheckBox( ESP, "Friends", 15, 105, "Draw/Ignore ESP for players on your friends list", "ESP_ShowFriends" )
  2422.     AddCheckBox( ESP, "Enemies", 15, 125, "Draw/Ignore ESP for players on your enemies list", "ESP_ShowEnemies" )
  2423.     AddCheckBox( ESP, "NPCs", 15, 145, "Draw/Ignore ESP for NPCs", "ESP_ShowNPCs" )
  2424.     AddCheckBox( ESP, "Spectators", 15, 165, "Draw/Ignore ESP for spectators", "ESP_ShowSpectators" )
  2425.  
  2426.     AddComboBox( ESP, 100, 65, 70, 15, "ESP_ShowTeamV", {"Show", "Ignore"} )
  2427.     AddComboBox( ESP, 100, 85, 70, 15, "ESP_ShowOpponentsV", {"Show", "Ignore"} )
  2428.     AddComboBox( ESP, 100, 105, 70, 15, "ESP_ShowFriendsV", {"Show", "Ignore"} )
  2429.     AddComboBox( ESP, 100, 125, 70, 15, "ESP_ShowEnemiesV", {"Show", "Ignore"} )
  2430.     AddComboBox( ESP, 100, 145, 70, 15, "ESP_ShowNPCsV", {"Show", "Ignore"} )
  2431.     AddComboBox( ESP, 100, 165, 70, 15, "ESP_ShowSpectatorsV", {"Show", "Ignore"} )
  2432.  
  2433.     AddCheckBox( ESP, "Boundary Boxes", 15, 190, "Display a box around players", "ESP_BoundaryBoxes" )
  2434.     AddComboBox( ESP, 120, 190, 35, 15, "ESP_BoundaryBoxes_Mode", { "2D", "3D" } )
  2435.     AddCheckBox( ESP, "Name Tags", 15, 210, "Display player names", "ESP_NameTags" )
  2436.     AddCheckBox( ESP, "Weapon", 15, 230, "Display equipped weapon of players", "ESP_Weapon" )
  2437.     AddCheckBox( ESP, "Distance", 15, 250, "Display distance between you and other players", "ESP_Distance" )
  2438.     AddCheckBox( ESP, "Health", 15, 270, "Display health of players", "ESP_Health" )
  2439.     AddCheckBox( ESP, "Skeleton", 15, 290, "Draws the skeleton of players", "ESP_Skeleton" )
  2440.     AddCheckBox( ESP, "Crosshair", 15, 310, "Draws crosshair on screen", "ESP_Crosshair" )
  2441.     AddGenericButton( ESP, "Customize", 80, 15, 90, 310, function() ChangeTab(CustomCrosshair,15) end )
  2442.  
  2443.     AddCheckBox( ESP, "Entity ESP", 185, 65, "Draw ESP for selected entities", "ESP_Entity_Toggle" )
  2444.     AddCheckBox( ESP, "Name Tags", 185, 85, "Draw ESP for selected entities", "ESP_Entities_NameTags" )
  2445.     AddCheckBox( ESP, "Boundary Boxes", 185, 105, "Draw ESP for selected entities", "ESP_Entities_BoundaryBoxes" )
  2446.     AddComboBox( ESP, 290, 105, 40, 15, "ESP_Entities_BoundaryBoxes_Mode", { "2D", "3D" } )
  2447.  
  2448.     //Crosshair Custimization
  2449.     AddGenericButton( CustomCrosshair, "<-- Finished   ", 100, 20, 25, 335, function () ChangeTab( ESP, 3 ) end )
  2450.     AddLabel( CustomCrosshair, "Size:", 15, 60 )
  2451.     AddLabel( CustomCrosshair, "Mode:", 15, 80)
  2452.     AddSlider( CustomCrosshair, "ESP_Crosshair_Size", 50, 60, 1, ScrW()/2, 0 )
  2453.     AddComboBox( CustomCrosshair, 50, 80, 105, 15, "ESP_Crosshair_Mode", { "Team", "Custom" } )
  2454.  
  2455.     local Mixer = vgui.Create( "DColorMixer", CustomCrosshair )
  2456.     Mixer:SetSize( 250, 160 )
  2457.     Mixer:SetPos( 335, 60 )
  2458.     Mixer:SetPalette( false )
  2459.     Mixer:SetAlphaBar( true )
  2460.     Mixer:SetWangs( true )
  2461.     if SmegHack.Options["ESP_Crosshair_Mode"] == "Team" then
  2462.         Mixer:SetColor( team.GetColor(LocalPlayer():Team()) )
  2463.     else
  2464.         Mixer:SetColor( Color(SmegHack.Options["ESP_Crosshair_Color_R"], SmegHack.Options["ESP_Crosshair_Color_G"], SmegHack.Options["ESP_Crosshair_Color_B"], SmegHack.Options["ESP_Crosshair_Color_A"]) )
  2465.     end
  2466.     Mixer.Think = function()
  2467.         if SmegHack.Options["ESP_Crosshair_Mode"] == "Custom" then
  2468.             SmegHack.Options["ESP_Crosshair_Color_R"] = Mixer:GetColor().r
  2469.             SmegHack.Options["ESP_Crosshair_Color_G"] = Mixer:GetColor().g
  2470.             SmegHack.Options["ESP_Crosshair_Color_B"] = Mixer:GetColor().b
  2471.         end
  2472.         SmegHack.Options["ESP_Crosshair_Color_A"] = Mixer:GetColor().a
  2473.     end
  2474.  
  2475.     //Ents Tab
  2476.     local ESPOffEntsList = vgui.Create("DListView", Ents)
  2477.     ESPOffEntsList:SetPos( 25, 55 )
  2478.     ESPOffEntsList:SetSize( 225, 295 )
  2479.     ESPOffEntsList:SetMultiSelect(false)
  2480.     ESPOffEntsList:AddColumn("Off ESP")
  2481.    
  2482.     local ESPOnEntsList = vgui.Create("DListView", Ents)
  2483.     ESPOnEntsList:SetPos( 350, 55 )
  2484.     ESPOnEntsList:SetSize( 225, 295 )
  2485.     ESPOnEntsList:SetMultiSelect(false)
  2486.     ESPOnEntsList:AddColumn("On ESP")
  2487.    
  2488.     function RefreshEntsList()
  2489.         ESPOnEntsList:Clear()
  2490.         ESPOffEntsList:Clear()
  2491.         for k, v in pairs( SmegHack.EntityESP ) do
  2492.             ESPOnEntsList:AddLine(v)
  2493.         end
  2494.         for k, v in pairs( ents.GetAll() ) do
  2495.             local Name = v:GetClass()
  2496.             local Copy = false
  2497.             if Name != "player" then
  2498.                 if !table.HasValue( SmegHack.EntityESP, Name ) then
  2499.                     for k, v in pairs (ESPOffEntsList:GetLines() ) do
  2500.                         if v:GetValue(1) == Name then Copy = true end
  2501.                     end
  2502.                     if Copy == false then ESPOffEntsList:AddLine(Name) end
  2503.                 end
  2504.             end
  2505.         end
  2506.     end
  2507.     RefreshEntsList()
  2508.    
  2509.     AddGenericButton( Ents, "Refresh", 80, 30, 260, 55, function() RefreshEntsList() end )
  2510.     AddGenericButton( Ents, "------->", 80, 30, 260, 167.5, function()
  2511.         if ESPOffEntsList:GetSelectedLine() != nil then
  2512.             table.insert( SmegHack.EntityESP, ESPOffEntsList:GetLine(ESPOffEntsList:GetSelectedLine()):GetValue(1) )
  2513.         end
  2514.         RefreshEntsList()
  2515.     end)
  2516.     AddGenericButton( Ents, "<-------", 80, 30, 260, 207.5, function()
  2517.         if ESPOnEntsList:GetSelectedLine() != nil then
  2518.             for k, v in pairs( SmegHack.EntityESP ) do
  2519.                 if v == ESPOnEntsList:GetLine(ESPOnEntsList:GetSelectedLine()):GetValue(1) then
  2520.                     table.remove( SmegHack.EntityESP, k )
  2521.                 end
  2522.             end
  2523.         end
  2524.         RefreshEntsList()
  2525.     end)
  2526.     AddGenericButton( Ents, "Add All", 80, 30, 260, 95, function()
  2527.         for k, v in pairs( ESPOffEntsList:GetLines() ) do
  2528.             table.insert( SmegHack.EntityESP, v:GetValue(1) )
  2529.         end
  2530.         RefreshEntsList()
  2531.     end)
  2532.     AddGenericButton( Ents, "Clear Ents", 80, 30, 260, 280, function() table.Empty( SmegHack.EntityESP ) RefreshEntsList() end )
  2533.     AddGenericButton( Ents, "Manage Saves", 80, 30, 260, 320, function() ChangeTab(EntitySaves, 14) end )
  2534.    
  2535.     //Entity Saves Manager
  2536.     AddSavePage( EntitySaves, "Entities" )
  2537.     AddGenericButton( EntitySaves, "<-- Finished   ", 100, 20, 25, 335, function () ChangeTab( Ents, 4 ) end )
  2538.  
  2539.     //Misc Tab
  2540.     AddCheckBox( Misc, "Clock Speed Manipulator", 15, 45, "Speed hack", "Misc_Clock", function()
  2541.         if SmegHack.Options["Misc_Clock"] then
  2542.             TimeScaleChange = true
  2543.         else
  2544.             LocalPlayer():ConCommand("incrementvar sv_cheats "..NormSvCheats.." "..NormSvCheats.." "..NormSvCheats)
  2545.             LocalPlayer():ConCommand("incrementvar host_timescale "..NormHostTimeScale.." "..NormHostTimeScale.." "..NormHostTimeScale)
  2546.         end
  2547.     end)
  2548.     AddSlider( Misc, "Misc_Clock_Speed", 160, 45, 0, 10, 0 )
  2549.     AddComboBox( Misc, 300, 45, 50, 15, "Misc_Clock_Mode", {"Fast", "Slow"}, function() TimeScaleChange = true end )
  2550.  
  2551.     AddCheckBox( Misc, "Admin Box", 15, 65, "Display all admins in a box", "Misc_AdminBox", function()
  2552.         if SmegHack.Options["Misc_AdminBox"] then
  2553.             AddDisplayBox( "Admins", 1 )
  2554.         end
  2555.     end)
  2556.     AddComboBox( Misc, 120, 65, 90, 15, "Misc_AdminBox_Mode", {"Auto", "Top Left", "Top Right", "Bottom Left", "Bottom Right"} )
  2557.     AddCheckBox( Misc, "Spectators Box", 15, 85, "Display all people spectating you in a box", "Misc_SpectatorsBox", function()
  2558.         if SmegHack.Options["Misc_SpectatorsBox"] then
  2559.             AddDisplayBox( "Spectators", 2 )
  2560.         end
  2561.     end)
  2562.     AddComboBox( Misc, 120, 85, 90, 15, "Misc_SpectatorsBox_Mode", {"Auto", "Top Left", "Top Right", "Bottom Left", "Bottom Right"} )
  2563.    
  2564.     //Friends Tab
  2565.     local FriendsList = vgui.Create("DListView", Friends)
  2566.     FriendsList:SetPos( 25, 55 )
  2567.     FriendsList:SetSize( 275, 200 )
  2568.     FriendsList:SetMultiSelect(false)
  2569.     FriendsList:AddColumn("Player Name")
  2570.     FriendsList:AddColumn("Steam ID")
  2571.    
  2572.     local EnemiesList = vgui.Create("DListView", Friends)
  2573.     EnemiesList:SetPos( 300, 55 )
  2574.     EnemiesList:SetSize( 275, 200 )
  2575.     EnemiesList:SetMultiSelect(false)
  2576.     EnemiesList:AddColumn("Player Name")
  2577.     EnemiesList:AddColumn("Steam ID")
  2578.    
  2579.     function RefreshFriendsList()
  2580.         FriendsList:Clear()
  2581.         EnemiesList:Clear()
  2582.         for k, v in pairs(player.GetAll()) do
  2583.             if v != LocalPlayer() then
  2584.                 if SmegHack.Options["Friends_SteamFriends"] && v:GetFriendStatus() == "friend" then
  2585.                     if !table.HasValue(SmegHack.FriendsList, v:SteamID()) then table.insert(SmegHack.FriendsList, v:SteamID()) end
  2586.                 end
  2587.                 if SmegHack.Options["Friends_SteamEnemies"] && v:GetFriendStatus() == "friend" then
  2588.                     local PlayerSteamID = v:SteamID()
  2589.                     for k, v in pairs(SmegHack.FriendsList) do
  2590.                         if v == PlayerSteamID then
  2591.                             table.remove(SmegHack.FriendsList, k)
  2592.                         end
  2593.                     end
  2594.                     if table.HasValue(SmegHack.FriendsList, v:SteamID()) then table.remove(SmegHack.FriendsList, v:SteamID()) end
  2595.                 end
  2596.                 if SmegHack.Options["Friends_FriendIsEnemy"] then
  2597.                     if table.HasValue(SmegHack.FriendsList, v:SteamID()) then
  2598.                         EnemiesList:AddLine(v:Nick(), v:SteamID())
  2599.                     else
  2600.                         FriendsList:AddLine(v:Nick(), v:SteamID())
  2601.                     end
  2602.                 else
  2603.                     if table.HasValue(SmegHack.FriendsList, v:SteamID()) then
  2604.                         FriendsList:AddLine(v:Nick(), v:SteamID())
  2605.                     else
  2606.                         EnemiesList:AddLine(v:Nick(), v:SteamID())
  2607.                     end
  2608.                 end
  2609.             end
  2610.         end
  2611.     end
  2612.     RefreshFriendsList()
  2613.    
  2614.     AddMainMenuButton( Friends, "Remove Friend", 112.5, 260, function()
  2615.         local SelectedLine = FriendsList:GetSelectedLine()
  2616.         if SelectedLine != nil then
  2617.             local PlayerNick = FriendsList:GetLine(SelectedLine):GetValue(1)
  2618.             local PlayerSteamID = FriendsList:GetLine(SelectedLine):GetValue(2)
  2619.             if SmegHack.Options["Friends_FriendIsEnemy"] then
  2620.                 table.insert(SmegHack.FriendsList, PlayerSteamID)
  2621.             else
  2622.                 for k, v in pairs(SmegHack.FriendsList) do
  2623.                     if v == PlayerSteamID then
  2624.                         table.remove(SmegHack.FriendsList, k)
  2625.                         break
  2626.                     end
  2627.                 end
  2628.             end
  2629.             RefreshFriendsList()
  2630.         end
  2631.     end)
  2632.    
  2633.     AddMainMenuButton( Friends, "Add Friend", 387.5, 260, function()
  2634.         local SelectedLine = EnemiesList:GetSelectedLine()
  2635.         if SelectedLine != nil then
  2636.             local PlayerNick = EnemiesList:GetLine(SelectedLine):GetValue(1)
  2637.             local PlayerSteamID = EnemiesList:GetLine(SelectedLine):GetValue(2)
  2638.             if SmegHack.Options["Friends_FriendIsEnemy"] then
  2639.                 for k, v in pairs(SmegHack.FriendsList) do
  2640.                     if v == PlayerSteamID then
  2641.                         table.remove(SmegHack.FriendsList, k)
  2642.                         break
  2643.                     end
  2644.                 end
  2645.             else
  2646.                 table.insert(SmegHack.FriendsList, PlayerSteamID)
  2647.             end
  2648.             RefreshFriendsList()
  2649.         end
  2650.     end)
  2651.    
  2652.     AddMainMenuButton( Friends, "Refresh List", (Friends:GetWide()/2)-50, 260, function() RefreshFriendsList() end )
  2653.     AddMainMenuButton( Friends, "Manage Saves", (Friends:GetWide()/2)-50, 300, function() ChangeTab( FriendSaves, 13 ) end )
  2654.     AddMainMenuButton( Friends, "Clear Friends", 387.5, 300, function() table.Empty( SmegHack.FriendsList ) RefreshFriendsList() end )
  2655.     AddCheckBox( Friends, "Friend Is Enemy", 5, 265, "Turns the friends list into the enemies list", "Friends_FriendIsEnemy", function() RefreshFriendsList() end )
  2656.     AddCheckBox( Friends, "Steam Friends", 5, 285, "Make your friends on steam automatically appear on the friends list", "Friends_SteamFriends", function() RefreshFriendsList() end )
  2657.     AddCheckBox( Friends, "Steam Enemies", 5, 305, "Make your friends on steam automatically appear on the enemies list", "Friends_SteamEnemies", function() RefreshFriendsList() end )
  2658.    
  2659.     //Manage Friend Saves
  2660.     AddSavePage( FriendSaves, "Friends" )
  2661.     AddGenericButton( FriendSaves, "<-- Finished   ", 100, 20, 25, 335, function () ChangeTab( Friends, 6 ) end )
  2662.  
  2663.     //Cams Tab
  2664.     AddCheckBox( Cams, "Cams", 15, 45, "Enables/Disables cams hacks", "Cams_Toggle" )
  2665.     AddCheckBox( Cams, "Client Side Noclip", 15, 65, "Fly around the map freely (everyone else on the server wont see you flying)", "Cams_CSNoclip" )
  2666.     AddSlider( Cams, "Cams_CSNoclip_Speed", 125, 65, 0, 100, 0 )
  2667.     AddCheckBox( Cams, "Thirdperson", 15, 85, "An over shoulder view", "Cams_ThirdPerson" )
  2668.     AddSlider( Cams, "Cams_ThirdPerson_Zoom", 125, 85, 0, 100, 0 )
  2669.  
  2670.     //Bhop Tab
  2671.     AddCheckBox( Bhop, "Bhop", 15, 45, "Enables/Disables Bhop hacks", "Bhop_Toggle" )
  2672.     AddCheckBox( Bhop, "Fast Walk", 15, 65, "Makes you walk slightly faster", "Bhop_FastWalk" )
  2673.     AddCheckBox( Bhop, "Auto Hop", 15, 85, "Hold space to bhop", "Bhop_AutoHop" )
  2674.     AddCheckBox( Bhop, "Auto Strafe", 15, 105, "Automatically turns in the air", "Bhop_AutoStrafe")
  2675.     AddCheckBox( Bhop, "Edge Jump", 15, 125, "Jumps just before an edge", "Bhop_EdgeJump")
  2676.     AddSlider( Bhop, "Bhop_EdgeJump_Distance", 100, 125, 0, 100, 0 )
  2677.     AddCheckBox( Bhop, "Sideways", 15, 145, "Turns your camera so you can bhop normally while in Sideways mode", "Bhop_Sideways")
  2678.     AddCheckBox( Bhop, "W-Only", 15, 165, "Turns your camera so you can bhop normally while in W-Only mode", "Bhop_WOnly")
  2679.  
  2680.     //Spam Tab
  2681.     AddCheckBox( Spam, "Spam", 15, 45, "Enables/Disables Chat Spammer", "Spam_Toggle" )
  2682.     AddCheckBox( Spam, "Delay", 15, 65, "Pauses between each spam for x seeconds", "Spam_Delay" )
  2683.     AddSlider( Spam, "Spam_Delay_Value", 80, 65, 0, 10, 2 )
  2684.     AddCheckBox( Spam, "Anti-Anti-Spam", 15, 85, "Adds a random number to the end of your message to help avoid Anti-Spammers", "Spam_AntiAntiSpam" )
  2685.  
  2686.     AddCheckBox( Spam, "Message 1", 15, 265, "Enable spam message #1", "Spam_Message_1" )
  2687.     AddCheckBox( Spam, "Message 2", 15, 285, "Enable spam message #2", "Spam_Message_2" )
  2688.     AddCheckBox( Spam, "Message 3", 15, 305, "Enable spam message #3", "Spam_Message_3" )
  2689.     AddCheckBox( Spam, "Message 4", 15, 325, "Enable spam message #4", "Spam_Message_4" )
  2690.     AddCheckBox( Spam, "Message 5", 15, 345, "Enable spam message #5", "Spam_Message_5" )
  2691.     AddTextEntry( Spam, 485, 100, 262, "", "Spam1", true )
  2692.     AddTextEntry( Spam, 485, 100, 282, "", "Spam2", true )
  2693.     AddTextEntry( Spam, 485, 100, 302, "", "Spam3", true )
  2694.     AddTextEntry( Spam, 485, 100, 322, "", "Spam4", true )
  2695.     AddTextEntry( Spam, 485, 100, 342, "", "Spam5", true )
  2696.    
  2697.     //Config Tab
  2698.     AddSavePage( Config, "Configs" )
  2699.    
  2700.     if SmegHack.ActiveTab == nil then SmegHack.ActiveTab = 1 end
  2701.     if SmegHack.ActiveTab == 1 then ChangeTab( Main, 1 )
  2702.     elseif SmegHack.ActiveTab == 2 then ChangeTab( Aimbot, 2 )
  2703.     elseif SmegHack.ActiveTab == 3 then ChangeTab( ESP, 3 )
  2704.     elseif SmegHack.ActiveTab == 4 then ChangeTab( Ents, 4 )
  2705.     elseif SmegHack.ActiveTab == 5 then ChangeTab( Misc, 5 )
  2706.     elseif SmegHack.ActiveTab == 6 then ChangeTab( Friends, 6 )
  2707.     elseif SmegHack.ActiveTab == 7 then ChangeTab( Cams, 7 )
  2708.     elseif SmegHack.ActiveTab == 8 then ChangeTab( Bhop, 8 )
  2709.     elseif SmegHack.ActiveTab == 9 then ChangeTab( Spam, 9 )
  2710.     elseif SmegHack.ActiveTab == 10 then ChangeTab( Test10, 10 )
  2711.     elseif SmegHack.ActiveTab == 11 then ChangeTab( Test11, 11 )
  2712.     elseif SmegHack.ActiveTab == 12 then ChangeTab( Config, 12 )
  2713.     elseif SmegHack.ActiveTab == 13 then ChangeTab ( FriendSaves, 13 )
  2714.     elseif SmegHack.ActiveTab == 14 then ChangeTab ( EntitySaves, 14 )
  2715.     elseif SmegHack.ActiveTab == 15 then ChangeTab ( CustomCrosshair, 15 ) end
  2716.  
  2717.     function CloseMenu()
  2718.         MenuOpen = false
  2719.         Menu:Close()
  2720.     end
  2721. end
  2722. LoadSmegHack(true)
Add Comment
Please, Sign In to add comment