Advertisement
Caliber_

Shitcheat 2.2

Jun 5th, 2017
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 33.27 KB | None | 0 0
  1. --Pressing tab + Q at the same time opens the cheat menu
  2. --The aimbot key is F
  3. local defcon = { Menu = { t = {}; b = {}; c = 0}; Alive = {};}
  4. defcon.Normal           = {
  5.     aimbot                  = true;
  6.     aimbot_fov              = 5;
  7.     aimbot_friendly_fire    = true;
  8.     triggerbot              = true;
  9.    
  10.     esp_player              = true;
  11.     esp_player_dist         = 16000;
  12.     esp_player_showdist     = true;
  13.     esp_player_name         = true;
  14.     esp_player_rank         = true;
  15.     esp_player_health       = true;
  16.     esp_player_armor        = true;
  17.     esp_player_glow         = true;
  18.    
  19.     esp_entity              = true;
  20.     esp_entity_dist         = 16000;
  21.    
  22.     flashlight_spam         = false;
  23.    
  24.     darkrp_money            = false;
  25.     darkrp_god              = false;
  26.    
  27.     ttt_deathnotifs         = true;
  28.     bhop_bhop               = true;
  29.     crosshair               = false;
  30.     velocity                = false;
  31.     chatspam1               = false;
  32.     chatspam2               = false;
  33.     lasereyes               = false;
  34.     freecam_below           = false;
  35.     freecam_below2          = false;
  36.     freecam_below3          = false;
  37.     freecam_above           = false;
  38.     freecam_above2          = false;
  39.     freecam_above3          = false;
  40.     freecam_side            = false;
  41.     freecam_side2           = false;
  42.     freecam_side3           = false;
  43. }
  44. defcon.Settings         = (file.Exists("d_settings.txt", "DATA") and util.JSONToTable(file.Read("d_settings.txt", "DATA"))) or defcon.Normal
  45. defcon.Entities         = (file.Exists("d_entities.txt", "DATA") and util.JSONToTable(file.Read("d_entities.txt", "DATA"))) or {}
  46. defcon.Whitelist        = (file.Exists("d_whitelist.txt", "DATA") and util.JSONToTable(file.Read("d_whitelist.txt", "DATA"))) or {}
  47. defcon.AimKey           = (file.Exists("d_aimkey.txt", "DATA") and tonumber(file.Read("d_aimkey.txt", "DATA"))) or KEY_LALT
  48. --menu display messages
  49. defcon.Phrases          = {
  50.     "niggerniggerniggernigger";
  51.     "bob good is not so good";
  52.     "sheo is a kike";
  53.     "new shitcheat";
  54.     "i hate niggers";
  55.     "suck my dick";
  56.     "donul trump";
  57.     "remove kebab";
  58.     "remember, no russian";
  59.     "Made by the Madbluntz.rs Team";
  60.     "we need to nuke japan again";
  61.     "now with freecam";
  62.     "go fast eat ass";
  63.     "[OOC]Johnny Nutmegg: you fucking suck dick bro";
  64. }
  65. defcon.Keys = {
  66. "KEY_0", "KEY_1", "KEY_2", "KEY_3", "KEY_4", "KEY_5",
  67. "KEY_6", "KEY_7", "KEY_8", "KEY_9", "KEY_A", "KEY_B", "KEY_C",
  68. "KEY_D", "KEY_E", "KEY_F", "KEY_G", "KEY_H", "KEY_I", "KEY_J",
  69. "KEY_K", "KEY_L", "KEY_M", "KEY_N", "KEY_O", "KEY_P", "KEY_Q",
  70. "KEY_R", "KEY_S", "KEY_T", "KEY_U", "KEY_V", "KEY_W", "KEY_X",
  71. "KEY_Y", "KEY_Z", "KEY_PAD_0", "KEY_PAD_1", "KEY_PAD_2", "KEY_PAD_3",
  72. "KEY_PAD_4", "KEY_PAD_5", "KEY_PAD_6", "KEY_PAD_7", "KEY_PAD_8", "KEY_PAD_9",
  73. "KEY_PAD_DIVIDE", "KEY_PAD_MULTIPLY", "KEY_PAD_MINUS", "KEY_PAD_PLUS", "KEY_PAD_ENTER",
  74. "KEY_PAD_DECIMAL", "KEY_LBRACKET", "KEY_RBRACKET", "KEY_SEMICOLON", "KEY_APOSTROPHE",
  75. "KEY_BACKQUOTE", "KEY_COMMA", "KEY_PERIOD", "KEY_SLASH", "KEY_BACKSLASH", "KEY_MINUS",
  76. "KEY_EQUAL", "KEY_ENTER", "KEY_SPACE", "KEY_BACKSPACE", "KEY_TAB", "KEY_CAPSLOCK",
  77. "KEY_NUMLOCK", "KEY_ESCAPE", "KEY_SCROLLLOCK", "KEY_INSERT", "KEY_DELETE", "KEY_HOME",
  78. "KEY_END", "KEY_PAGEUP", "KEY_PAGEDOWN", "KEY_BREAK", "KEY_LSHIFT", "KEY_RSHIFT",
  79. "KEY_LALT", "KEY_RALT", "KEY_LCONTROL", "KEY_RCONTROL", "KEY_LWIN", "KEY_RWIN",
  80. "KEY_APP", "KEY_UP", "KEY_LEFT", "KEY_DOWN", "KEY_RIGHT", "KEY_F1", "KEY_F2",
  81. "KEY_F3", "KEY_F4", "KEY_F5", "KEY_F6", "KEY_F7", "KEY_F8", "KEY_F9",
  82. "KEY_F10", "KEY_F11", "KEY_F12", "KEY_CAPSLOCKTOGGLE", "KEY_NUMLOCKTOGGLE",
  83. "KEY_SCROLLLOCKTOGGLE"
  84. };
  85.  
  86. for k,v in pairs(defcon.Normal) do
  87.     if defcon.Settings[k] == nil then
  88.         defcon.Settings = defcon.Normal
  89.         -- so that if a new key is added to the normal config, the Settings will reset
  90.     end
  91. end
  92.  
  93. -- functions
  94. function defcon.Update(x,y,z, ok)
  95.     if x == "setting" then
  96.         defcon.Settings[y] = z
  97.         if ok == true then
  98.             file.Write("d_settings.txt", util.TableToJSON(defcon.Settings))
  99.         end
  100.     elseif x == "entity" then
  101.         file.Write("d_entities.txt", util.TableToJSON(defcon.Entities))
  102.     elseif x == "friend" then
  103.         file.Write("d_whitelist.txt", util.TableToJSON(defcon.Whitelist))
  104.     end
  105. end
  106. function defcon.ESPCheck(typ, v)
  107.     if typ == "player" then
  108.         if v:Alive() && v:Health() >= 1 && v ~= LocalPlayer() /*&& /*LocalPlayer():Alive() &&*/ /*LocalPlayer():Team() ~= TEAM_SPECTATOR*/ then
  109.             return true
  110.         end
  111.     elseif typ == "entity" then
  112.         if IsValid(v) then
  113.             return true
  114.         end
  115.     end
  116.     return false
  117. end
  118. function defcon.ESPDistance(typ, v)
  119.     if typ == "player" then
  120.         if defcon.Settings["esp_player_dist"] >= 16000 then
  121.             return true
  122.         elseif v:GetPos():Distance(LocalPlayer():GetPos()) < (defcon.Settings["esp_player_dist"]) then
  123.             return true
  124.         end
  125.     elseif typ == "entity" then
  126.         if defcon.Settings["esp_entity_dist"] >= 16000 then
  127.             return true
  128.         elseif v:GetPos():Distance(LocalPlayer():GetPos()) < (defcon.Settings["esp_entity_dist"]) then
  129.             return true
  130.         end
  131.     end
  132.     return false
  133. end
  134. function defcon.GetShootPos(ent)
  135.     local eyes = ent:LookupAttachment("eyes");
  136.     if(eyes ~= 0) then
  137.         eyes = ent:GetAttachment(eyes);
  138.         if(eyes and eyes.Pos) then
  139.             return eyes.Pos, eyes.Ang;
  140.         end
  141.     end
  142. end
  143. function defcon.Visible(ent)
  144.     local pos = LocalPlayer():GetShootPos()
  145.     local ang = LocalPlayer():GetAimVector()
  146.     local trace = {start = LocalPlayer():GetShootPos(), endpos = defcon.GetShootPos(ent), filter = {LocalPlayer(), ent}, mask = 1174421507};
  147.     local tr = util.TraceLine(trace);
  148.     return(tr.Fraction == 1);
  149. end
  150. function defcon.Whitelisted(ent)
  151.     if defcon.Whitelist[ent:SteamID()] then return true
  152.     else return false end
  153. end
  154. function defcon.CanTarget(v)
  155.     if v:IsPlayer() then
  156.         if (defcon.Visible(v) and (not defcon.Whitelisted(v)) and v:Alive() and (v:Health() > 0) and v:Team() ~= TEAM_SPECTATOR) then
  157.             if (v ~= LocalPlayer() and LocalPlayer():Alive() and LocalPlayer():Team() ~= TEAM_SPECTATOR) then
  158.                 if not(defcon.Settings["aimbot_friendly_fire"]) then
  159.                     if (v:Team() ~= LocalPlayer():Team()) then
  160.                         return true
  161.                     end
  162.                 else
  163.                     return true
  164.                 end
  165.             end
  166.         end
  167.     end
  168.     return false
  169. end
  170. function defcon.Ents()
  171.     local t = {}
  172.     for k,v in pairs(ents.GetAll()) do
  173.         if IsValid(v) and not(table.HasValue(t, v:GetClass())) then
  174.             table.insert(t, v:GetClass())
  175.         end
  176.     end
  177.     table.sort(t, function(a,b) return a < b end)
  178.    
  179.     return t
  180. end
  181. -- fonts
  182. surface.CreateFont("deffont", {
  183.     font    =   "impact",
  184.     size    =   64
  185. });
  186. surface.CreateFont("deffontesp1", {
  187.     font="TabLarge",
  188.     size=13,
  189.     weight=700
  190. });
  191. surface.CreateFont("deffontesp2", {
  192.     font="TabLarge",
  193.     size=10,
  194.     weight=700
  195. });
  196. surface.CreateFont("velmet", {
  197.  size = 50,
  198.  weight = 500,
  199.  antialias = true,
  200.  font = "VCR OSD Mono"});
  201.  surface.CreateFont("warnign", {
  202.  size = 18,
  203.  weight = 0,
  204.  antialias = false,
  205.  font = "times new roman"});
  206. -- short vars
  207. local menu              = defcon.Menu
  208. local current           = defcon.Current
  209. local alive             = defcon.Alive
  210. local normal            = defcon.Normal
  211. local settings          = defcon.Settings
  212. local entities          = defcon.Entities
  213. local whitelist         = defcon.Whitelist
  214. local phrases           = defcon.Phrases
  215. local espcheck          = defcon.ESPCheck
  216. local espdistance       = defcon.ESPDistance
  217. -- menu
  218. local function AddTab(txt, tab, func)
  219.     menu.c = menu.c + 1 -- increase the counter for the amount of tabs
  220.     local panel
  221.     if tab and tab == true then
  222.         panel = vgui.Create("DPanel", menu.frame);
  223.         panel:SetPos(120,25);
  224.         panel:SetSize(376,406);
  225.         if menu.Current == txt then
  226.             panel:SetVisible(true)
  227.         else
  228.             panel:SetVisible(false)
  229.         end
  230.         panel.Paint = function()
  231.             surface.SetDrawColor( 10, 10, 10, 255 )
  232.             surface.DrawOutlinedRect( 0, 0, panel:GetWide() - 1, panel:GetTall() - 1)
  233.             draw.SimpleText(string.upper(txt), "deffont", 10, 5, Color(210, 210, 210, 235), TEXT_ALIGN_LEFT);
  234.         end
  235.     end
  236.     local button = vgui.Create("DButton", menu.buttons);
  237.     button:SetText(txt);
  238.     button:SetSize(80, 20);
  239.     button:SetPos(15, -15+(25*menu.c));
  240.     button:SetTextColor(color_white)
  241.     button.Paint = function(self)
  242.         surface.SetDrawColor(100,100,100,220)
  243.         surface.DrawRect(0, 0,self:GetSize())
  244.         surface.SetDrawColor(0,0,0,255)
  245.         surface.DrawOutlinedRect(0,0,self:GetSize())
  246.     end
  247.     button.DoClick = func or (tab and tab == true and function()
  248.         for k,v in pairs(menu.t) do
  249.             if v ~= panel then
  250.                 v:SetVisible(false)
  251.             end
  252.         end
  253.         panel:SetVisible(true)
  254.         menu.Current = txt
  255.         surface.PlaySound("ambient/levels/canals/drip4.wav");
  256.     end)
  257.     return panel, button;
  258. end
  259. --gay shit for menu
  260. local function AddFeature(id, parent, typ, name, setting, o1, o2)
  261.     if not parent then return end
  262.     if typ == "button" then
  263.         local label = vgui.Create("DLabel", parent)
  264.         label:SetText(name)
  265.         label:SetPos(5,(55+(id*25)))
  266.         label:SizeToContents(false)
  267.         local button = vgui.Create("DButton", parent)
  268.         if defcon.Settings[setting] == true then
  269.             button:SetText("enabled")
  270.         else
  271.             button:SetText("disabled")
  272.         end
  273.         button:SetSize(80,20)
  274.         if not id then
  275.             button:SetPos(285,45)
  276.         else
  277.             button:SetPos(285,(55+(id*25)))
  278.         end
  279.         button.DoClick = function()
  280.             if button:GetText() == "enabled" then
  281.                 button:SetText("disabled"); defcon.Update("setting", setting, false, true)
  282.             else
  283.                 button:SetText("enabled"); defcon.Update("setting", setting, true, true)
  284.             end
  285.         end
  286.         button:SetTextColor(color_white)
  287.         button.Paint = function(self)
  288.             surface.SetDrawColor(100,100,100,220)
  289.             surface.DrawRect(0, 0,self:GetSize())
  290.             surface.SetDrawColor(0,0,0,255)
  291.             surface.DrawOutlinedRect(0,0,self:GetSize())
  292.         end
  293.         return button,label
  294.     elseif typ == "slider" then
  295.         local slider = vgui.Create("DNumSlider", parent)
  296.         slider:SetPos(5, (45+(id*25)))
  297.         slider:SetText(name)
  298.         slider:SetMinMax(o1, o2)
  299.         slider:SetWide(372.5)
  300.         slider:SetDecimals( 0 )
  301.         slider:SetFGColor(255,255,255,255)
  302.         slider:SetBGColor(255,255,255,255)
  303.         slider:SetValue(defcon.Settings[setting])
  304.         slider.OnValueChanged = function(panel, value)
  305.             local c = tonumber(value)
  306.             defcon.Update("setting", setting, math.Round(c), true)
  307.         end
  308.         return slider;
  309.     end
  310.  
  311.     if typ == "label" then
  312.         local label = vgui.Create("DLabel", parent)
  313.         label:SetText(name)
  314.         label:SetPos(50,(55+(id*25)))
  315.         label:SizeToContents(false)
  316.         label:SetFont("warnign")
  317.         label.Paint = function(self)
  318.             label:SetTextColor(Color( 255, 190, 24, 255 ))
  319.             end
  320.        
  321.     return label
  322. end
  323.         if typ == "label2" then
  324.         local label = vgui.Create("DLabel", parent)
  325.         label:SetText(name)
  326.         label:SetPos(160,(55+(id*25)))
  327.         label:SizeToContents(false)
  328.         label:SetFont("warnign")
  329.         label.Paint = function(self)
  330.             label:SetTextColor(Color( 255, 190, 24, 255 ))
  331.             end
  332.     return label2
  333. end
  334. end
  335. --menu look
  336. local function AddButton(parent, text, posx, posy, func)
  337.     local button = vgui.Create("DButton", parent)
  338.     button:SetText(text)
  339.     button:SetSize(80,20)
  340.     button:SetPos(posx,posy)
  341.     button:SetTextColor(color_white)
  342.     button.DoClick = func or function() end
  343.     button.Paint = function(self)
  344.         surface.SetDrawColor(100,100,100,220)
  345.         surface.DrawRect(0, 0,self:GetSize())
  346.         surface.SetDrawColor(0,0,0,255)
  347.         surface.DrawOutlinedRect(0,0,self:GetSize())
  348.     end
  349.     return button
  350. end
  351. --menu
  352. local function DrawMenu()
  353.     if(menu.frame) then menu.frame:Remove(); menu.frame = nil; end
  354.    
  355.     menu.c = 0
  356.    
  357.     menu.frame = vgui.Create("DFrame");
  358.     menu.frame:SetPos(ScrW()/2-184, ScrH()/2-155);
  359.     menu.frame:SetSize(500, 435);
  360.     menu.frame:SetTitle("Shitcheat 2.2 :: "..defcon.Phrases[math.random(1, table.Count(defcon.Phrases))]);
  361.     menu.frame.Paint = function()
  362.         surface.SetDrawColor(50,50,50,200)
  363.         surface.DrawRect(0, 0,menu.frame:GetWide(),menu.frame:GetTall())
  364.         surface.SetDrawColor(0,0,0,255)
  365.         surface.DrawOutlinedRect(0,0,menu.frame:GetWide(),menu.frame:GetTall())
  366.     end
  367.     menu.frame:SetVisible(true);
  368.     menu.frame:SetDraggable(true);
  369.     menu.frame:SetSizable(false);
  370.     menu.frame:ShowCloseButton(false);
  371.     menu.frame:SetBackgroundBlur(true)
  372.     menu.frame:MakePopup();
  373.    
  374.     menu.close = vgui.Create("DButton", menu.frame)
  375.     menu.close:SetFont('marlett')
  376.     menu.close:SetText('r')
  377.     menu.close:SetColor(Color(255, 255, 255))
  378.     menu.close:SetSize(15, 15)
  379.     menu.close:SetDrawBackground(false)
  380.     menu.close:SetPos(menu.frame:GetWide() - 20, 5)
  381.     menu.close.DoClick = function()
  382.         menu.frame:Remove(); menu.frame = nil;
  383.     end
  384.  
  385.     menu.buttons = vgui.Create("DPanel",menu.frame)
  386.     menu.buttons:SetPos(5, 25)
  387.     menu.buttons:SetSize(111,406)
  388.     menu.buttons:SetVisible(true)
  389.     menu.buttons.Paint = function()
  390.         surface.SetDrawColor(10,10,10,255)
  391.         surface.DrawOutlinedRect(0,0,110,405)
  392.     end
  393.  
  394.     menu.t.def = vgui.Create("DPanel", menu.frame);
  395.     menu.t.def:SetPos(120,25);
  396.     menu.t.def:SetSize(376,406);
  397.     if menu.Current ~= nil then menu.t.def:SetVisible(false) end
  398.     menu.t.def.Paint = function()
  399.         surface.SetDrawColor( 10, 10, 10, 255 )
  400.         surface.DrawOutlinedRect( 0, 0, menu.t.def:GetWide() - 1, menu.t.def:GetTall() - 1)
  401.     end
  402.    
  403.     menu.t.a, menu.b.a      = AddTab("Aimbot",      true)
  404.     menu.t.p, menu.b.p      = AddTab("Player ESP",  true)
  405.     menu.t.e, menu.b.e      = AddTab("Entity ESP",  true)
  406.     menu.t.m, menu.b.m      = AddTab("Misc.",       true)
  407.     menu.t.f, menu.b.f      = AddTab("Freecam", true)
  408.     --id, parent  , the type, the text , setting
  409.     AddFeature(1, menu.t.a, "button", "Enabled", "aimbot")
  410.     AddFeature(2, menu.t.a, "button", "Triggerbot", "triggerbot")
  411.     AddFeature(3, menu.t.a, "button", "Friendly Fire", "aimbot_friendly_fire")
  412.     AddFeature(4, menu.t.a, "slider", "FOV", "aimbot_fov", 0, 180)
  413.    
  414.     AddFeature(1, menu.t.p, "button", "Enabled", "esp_player")
  415.     AddFeature(2, menu.t.p, "button", "Show Name", "esp_player_name")
  416.     AddFeature(3, menu.t.p, "button", "Show Rank", "esp_player_rank")
  417.     AddFeature(4, menu.t.p, "button", "Show Health", "esp_player_health")
  418.     AddFeature(5, menu.t.p, "button", "Show Armor", "esp_player_armor")
  419.     AddFeature(6, menu.t.p, "button", "Show Distance", "esp_player_showdist")
  420.     AddFeature(7, menu.t.p, "slider", "Draw Distance", "esp_player_dist", 0, 16000)
  421.     AddFeature(8, menu.t.p, "button", "Draw Glow Halo", "esp_player_glow")
  422.     AddFeature(9, menu.t.p, "button", "Laser Eyes", "lasereyes")
  423.    
  424.     AddFeature(1, menu.t.e, "button", "Enabled", "esp_entity")
  425.     AddFeature(2, menu.t.e, "slider", "Draw Distance", "esp_entity_dist", 0, 16000)
  426.    
  427.     AddFeature(1, menu.t.m, "button", "Flashlight Spam [hold leftarrow]", "flashlight_spam")
  428.     AddFeature(2, menu.t.m, "button", "Bunny hopping [hold space]", "bhop_bhop")
  429.     AddFeature(3, menu.t.m, "button", "Client side crosshair", "crosshair")
  430.     AddFeature(4, menu.t.m, "button", "Big velocity meter", "velocity")
  431.     AddFeature(5, menu.t.m, "button", "Chat spammer 1 [random messages, no vc]", "chatspam1")
  432.     AddFeature(6, menu.t.m, "button", "Chat spammer 2 [hl2rp vc messages]", "chatspam2")
  433.    
  434.     AddFeature(1, menu.t.f, "button", "Down, in front of player", "freecam_below")
  435.     AddFeature(2, menu.t.f, "button", "Down, behind player", "freecam_below2")
  436.     AddFeature(3, menu.t.f, "button", "Down, extreme", "freecam_below3")
  437.     AddFeature(4, menu.t.f, "button", "Up, in front of player", "freecam_above2")
  438.     AddFeature(5, menu.t.f, "button", "Up, behind player", "freecam_above")
  439.     AddFeature(6, menu.t.f, "button", "Up, extreme", "freecam_above3")
  440.     AddFeature(7, menu.t.f, "button", "Sideways, in front of player", "freecam_side2")
  441.     AddFeature(8, menu.t.f, "button", "Sideways, behind player", "freecam_side")
  442.     AddFeature(9, menu.t.f, "button", "Sideways, extreme", "freecam_side3")
  443.     AddFeature(10, menu.t.f, "label", "NOTICE: entities may not appear when using                                                      ")
  444.     AddFeature(11, menu.t.f, "label2", "freecam.                                                                                                                              ")
  445.     if string.find(gmod.GetGamemode().Name, "DarkRP") then
  446.         AddFeature(1, menu.t.g, "button", "God-mode Exploit (Costs in-game $$$)", "darkrp_god")
  447.     elseif string.find(gmod.GetGamemode().Name, "Trouble in Terrorist Town") then
  448.         AddFeature(1, menu.t.g, "button", "Display Death Notifications", "ttt_deathnotifs")
  449.     end
  450.     local elist
  451.     local elist2
  452.     local elistc
  453.     local elistc2
  454.     local function makeelist()
  455.         elist = vgui.Create("DComboBox", menu.t.e)
  456.         elist:SetPos(10,menu.t.e:GetTall()-43)
  457.         elist:SetSize(130,20)
  458.         for k,v in pairs(defcon.Ents()) do
  459.             if not(defcon.Entities[v]) then
  460.                 local i = elist:AddChoice(v)
  461.             end
  462.         end
  463.         elist.OnSelect = function(index,value,data)
  464.             print(data)
  465.             elist2 = data
  466.         end
  467.     end
  468.     local function makeelistc()
  469.         elistc = vgui.Create("DComboBox", menu.t.e)
  470.         elistc:SetPos(235, menu.t.e:GetTall()-43)
  471.         elistc:SetSize(130,20)
  472.         for k,v in pairs(defcon.Entities) do
  473.             local i = elistc:AddChoice(v)
  474.         end
  475.         elistc.OnSelect = function(index,value,data)
  476.             elistc2 = data
  477.         end
  478.     end
  479.     makeelist()
  480.     makeelistc()
  481.     AddButton(menu.t.e, "Add Entity", 35, menu.t.e:GetTall()-23, function()
  482.         if(elist2) then
  483.             for k,v in pairs(defcon.Ents()) do
  484.                 if (v == elist2) then
  485.                     print(v)
  486.                     table.insert(defcon.Entities, v)
  487.                     defcon.Update("entity")
  488.                 end
  489.             end
  490.         end
  491.         makeelist()
  492.         makeelistc()
  493.     end)
  494.     AddButton(menu.t.e, "Remove Entity", 260, menu.t.e:GetTall()-23, function()
  495.         if(elistc2) then
  496.             for k,v in pairs(defcon.Entities) do
  497.                 if (v == elistc2) then
  498.                     defcon.Entities[k] = nil;
  499.                     defcon.Update("entity")
  500.                 end
  501.             end
  502.         end
  503.         makeelist()
  504.         makeelistc()
  505.     end)
  506.     local flist
  507.     local flist2
  508.     local flistc
  509.     local flistc2
  510.     local function makeflist()
  511.         flist = vgui.Create("DComboBox", menu.t.a)
  512.         flist:SetPos(10,menu.t.a:GetTall()-43)
  513.         flist:SetSize(130,20)
  514.         for k,v in pairs(player.GetAll()) do
  515.             if v ~= LocalPlayer() then
  516.                 if not(defcon.Whitelist[v:SteamID()]) then
  517.                     local i = flist:AddChoice(v:Nick())
  518.                 end
  519.             end
  520.         end
  521.         flist.OnSelect = function(index,value,data)
  522.             print(data)
  523.             elist2 = data
  524.         end
  525.     end
  526.     local function makeflistc()
  527.         flistc = vgui.Create("DComboBox", menu.t.a)
  528.         flistc:SetPos(235, menu.t.a:GetTall()-43)
  529.         flistc:SetSize(130,20)
  530.         for k,v in pairs(player.GetAll()) do
  531.             if v ~= LocalPlayer() then
  532.                 if defcon.Whitelist[v:SteamID()] then
  533.                     local i = flistc:AddChoice(v:Nick())
  534.                 end
  535.             end
  536.         end
  537.         flistc.OnSelect = function(index,value,data)
  538.             flistc2 = data
  539.         end
  540.     end
  541.     makeflist()
  542.     makeflistc()
  543.     AddButton(menu.t.a, "Add Friend", 35, menu.t.a:GetTall()-23, function()
  544.         if(flist2) then
  545.             for k,v in pairs(player.GetAll()) do
  546.                 if (v:Nick() == flist2) then
  547.                     print(v:Nick())
  548.                     table.insert(defcon.Whitelist, v:SteamID())
  549.                     PrintTable(defcon.Whitelist)
  550.                     defcon.Update("friend")
  551.                 end
  552.             end
  553.         end
  554.         makeflist()
  555.         makeflistc()
  556.     end)
  557.     AddButton(menu.t.a, "Remove Friend", 260, menu.t.a:GetTall()-23, function()
  558.         if(flistc2) then
  559.             for k,v in pairs(defcon.Whitelist) do
  560.                 if (v:SteamID() == flistc2) then
  561.                     defcon.Whitelist[k] = nil;
  562.                     defcon.Update("friend")
  563.                 end
  564.             end
  565.         end
  566.         makeflist()
  567.         makeflistc()
  568.     end)
  569. end
  570. --freecam shit
  571. hook.Add( "ShouldDrawLocalPlayer", "ThirdPersonDrawPlayer", function()
  572.  
  573.     if defcon.Settings["freecam_below"] or defcon.Settings["freecam_below2"] or defcon.Settings["freecam_below3"] or defcon.Settings["freecam_above"] or defcon.Settings["freecam_above2"] or defcon.Settings["freecam_above3"] or defcon.Settings["freecam_side"] or defcon.Settings["freecam_side2"] or defcon.Settings["freecam_side3"] then
  574.  
  575.         return true
  576.  
  577.     end
  578.  
  579. end )
  580. hook.Add( "CalcView", "ThirdPersonView", function( ply, pos, angles, fov )
  581.     if defcon.Settings["freecam_below"] then
  582.         local view = {}
  583.         view.origin = pos - ( angles:Forward() * -200 ) + ( angles:Right() * 0 ) + ( angles:Up() * -150 )
  584.         view.angles = ply:EyeAngles() + Angle( 0, 180, 0 )
  585.         view.fov = fov
  586.         return GAMEMODE:CalcView( ply, view.origin, view.angles, view.fov )
  587.     end
  588.     if defcon.Settings["freecam_below2"] then
  589.         local view = {}
  590.         view.origin = pos - ( angles:Forward() * 200 ) + ( angles:Right() * 0 ) + ( angles:Up() * -150 )
  591.         view.angles = ply:EyeAngles() + Angle( 0, 0, 0 )
  592.         view.fov = fov
  593.         return GAMEMODE:CalcView( ply, view.origin, view.angles, view.fov )
  594.     end
  595.         if defcon.Settings["freecam_below3"] then
  596.         local view = {}
  597.         view.origin = pos - ( angles:Forward() * 200 ) + ( angles:Right() * 0 ) + ( angles:Up() * -650 )
  598.         view.angles = ply:EyeAngles() + Angle( 0, 0, 0 )
  599.         view.fov = fov
  600.         return GAMEMODE:CalcView( ply, view.origin, view.angles, view.fov )
  601.     end
  602.         if defcon.Settings["freecam_above"] then
  603.         local view = {}
  604.         view.origin = pos - ( angles:Forward() * 200 ) + ( angles:Right() * 0 ) + ( angles:Up() * 150 )
  605.         view.angles = ply:EyeAngles() + Angle( 0, 0, 0 )
  606.         view.fov = fov
  607.         return GAMEMODE:CalcView( ply, view.origin, view.angles, view.fov )
  608.     end
  609.         if defcon.Settings["freecam_above2"] then
  610.         local view = {}
  611.         view.origin = pos - ( angles:Forward() * -200 ) + ( angles:Right() * 0 ) + ( angles:Up() * 150 )
  612.         view.angles = ply:EyeAngles() + Angle( 0, 180, 0 )
  613.         view.fov = fov
  614.         return GAMEMODE:CalcView( ply, view.origin, view.angles, view.fov )
  615.     end
  616.         if defcon.Settings["freecam_above3"] then
  617.         local view = {}
  618.         view.origin = pos - ( angles:Forward() * 200 ) + ( angles:Right() * 0 ) + ( angles:Up() * 650 )
  619.         view.angles = ply:EyeAngles() + Angle( 0, 0, 0 )
  620.         view.fov = fov
  621.         return GAMEMODE:CalcView( ply, view.origin, view.angles, view.fov )
  622.     end
  623.         if defcon.Settings["freecam_side"] then
  624.         local view = {}
  625.         view.origin = pos - ( angles:Forward() * 150 ) + ( angles:Right() * 150 ) + ( angles:Up() * 0 )
  626.         view.angles = ply:EyeAngles() + Angle( 0, 0, 0 )
  627.         view.fov = fov
  628.         return GAMEMODE:CalcView( ply, view.origin, view.angles, view.fov )
  629.     end
  630.         if defcon.Settings["freecam_side2"] then
  631.         local view = {}
  632.         view.origin = pos - ( angles:Forward() * -150 ) + ( angles:Right() * -150 ) + ( angles:Up() * 0 )
  633.         view.angles = ply:EyeAngles() + Angle( 0, 180, 0 )
  634.         view.fov = fov
  635.         return GAMEMODE:CalcView( ply, view.origin, view.angles, view.fov )
  636.     end
  637.             if defcon.Settings["freecam_side3"] then
  638.         local view = {}
  639.         view.origin = pos - ( angles:Forward() * 150 ) + ( angles:Right() * 650 ) + ( angles:Up() * 0 )
  640.         view.angles = ply:EyeAngles() + Angle( 0, 0, 0 )
  641.         view.fov = fov
  642.         return GAMEMODE:CalcView( ply, view.origin, view.angles, view.fov )
  643.     end
  644.     end)
  645. --esp and shit
  646. hook.Add("HUDPaint", "catHUD", function()
  647.     if defcon.Settings["esp_player"] or defcon.Settings["esp_entity"] then
  648.         for k,v in pairs(ents.GetAll()) do
  649.             if defcon.Settings["esp_player"] && v:IsPlayer() then
  650.                 if(espcheck("player", v) and espdistance("player", v))then
  651.                     local ESP = (v:EyePos()):ToScreen()
  652.                     local name,health,rank,col,distance = "","","","",""
  653.                     local outcol = Color(0,0,0,255)
  654.                     local white = Color(255,255,255,255)
  655.                     local outcol2 = outcol
  656.                     if defcon.Settings["esp_player_name"] then
  657.                         if v.GetRPName then name = v:GetRPName()
  658.                         else name = v:Nick() end
  659.                     end
  660.                     if v:Nick() ~= name then rank = " "..v:Nick() end
  661.                     if v.SteamName and name ~= v:SteamName() then rank = " "..v:SteamName() end
  662.                     if defcon.Settings["esp_player_rank"] then
  663.                         if v:IsSuperAdmin() then
  664.                             rank = "[Super Admin]"..rank
  665.                         elseif v:IsAdmin() then
  666.                             rank = "[Admin]"..rank
  667.                         elseif v:IsUserGroup("moderator") or v:IsUserGroup("mod") then
  668.                             rank = "[Moderator]"..rank
  669.                         elseif v:IsUserGroup("vip") or v:IsUserGroup("donator") then
  670.                             rank = "[Donator]"..rank
  671.                         end
  672.                     end
  673.                     if defcon.Settings["esp_player_health"] and not(defcon.Settings["esp_player_armor"]) then
  674.                         health = v:Health().."H"
  675.                     elseif defcon.Settings["esp_player_armor"] and not(defcon.Settings["esp_player_health"]) then
  676.                         health = v:Armor().."A"
  677.                     elseif defcon.Settings["esp_player_armor"] and defcon.Settings["esp_player_health"] then
  678.                         health = v:Health().. "H - "..v:Armor().."A"
  679.                     end
  680.                     if defcon.Settings["esp_player_showdist"] then
  681.                         distance = v:GetPos():Distance(LocalPlayer():GetPos())
  682.                         distance = math.Round(distance).." m"
  683.                     end
  684.                     col = team.GetColor(v:Team())
  685.                     if(col.r <= 50 and col.g <= 50 and col.b <= 50) then
  686.                         outcol2 = Color(200,200,200,255)
  687.                     end
  688.                     if col.a <= 50 then
  689.                         col = Color(col.r,col.g,col.b, 255)
  690.                     end
  691.                     draw.SimpleTextOutlined(rank, "deffontesp2", ESP.x, ESP.y -46, col, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, outcol2)
  692.                     draw.SimpleTextOutlined(name, "deffontesp1", ESP.x, ESP.y - 34, col, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, outcol2)
  693.                     if health ~= "" then
  694.                         draw.SimpleTextOutlined(health, "deffontesp2", ESP.x, ESP.y -22, white, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, outcol)
  695.                         draw.SimpleTextOutlined(distance, "deffontesp2", ESP.x, ESP.y - 10, white, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, outcol)
  696.                     else
  697.                         draw.SimpleTextOutlined(distance, "deffontesp2", ESP.x, ESP.y - 22, white, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, outcol)
  698.                     end
  699.                     if defcon.Settings["esp_player_glow"] then
  700.                         halo.Add({v}, col, 2, 2, 1, true, true)
  701.                     end
  702.                 end
  703.             end
  704.             if (defcon.Settings["esp_entity"] and espcheck("entity", v) and espdistance("entity", v))then
  705.                 if table.HasValue(defcon.Entities, v:GetClass()) then
  706.                     local ESP = (v:EyePos()):ToScreen()
  707.                     draw.SimpleTextOutlined(v:GetClass(), "deffontesp1", ESP.x, ESP.y - 46, Color(255,0,0,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color(0,0,0,255))
  708.                 end
  709.             end
  710.         end
  711.     end
  712. end)
  713. hook.Add("Think", "catBOT", function()
  714.     if(input.IsKeyDown(KEY_TAB) && input.IsKeyDown(KEY_Q) && !menu.frame)then
  715.         DrawMenu()
  716.     elseif(menu.frame && input.IsKeyDown(KEY_ESCAPE))then
  717.         menu.frame:Remove();menu.frame = nil
  718.     end
  719.     if defcon.Settings["flashlight_spam"] and input.IsKeyDown(KEY_LEFT) then
  720.         RunConsoleCommand("impulse", "100")
  721.     end
  722.     if(defcon.Settings["triggerbot"] && input.IsMouseDown(MOUSE_4)) then
  723.         local pos = LocalPlayer():GetShootPos()
  724.         local ang = LocalPlayer():GetAimVector()
  725.         local tracedata = {}
  726.         tracedata.start = pos
  727.         tracedata.endpos = pos+(ang*9999999999999)
  728.         local trace = util.TraceLine(tracedata)
  729.         if(trace.HitNonWorld) then
  730.             target = trace.Entity
  731.             if(target:IsPlayer() and defcon.CanTarget(target)) then
  732.                 RunConsoleCommand("+attack")
  733.                 timer.Simple(0.000000000000000000001, function() RunConsoleCommand("-attack") end)
  734.             end
  735.         end
  736.     end
  737.     if(defcon.Settings["aimbot"] && /*input.IsKeyDown(defcon.AimKey)*/ input.IsKeyDown(KEY_F)) then
  738.         for k,v in pairs(player.GetAll()) do
  739.             if defcon.CanTarget(v) then
  740.                 local head = v:LookupBone("ValveBiped.Bip01_Head1")
  741.                 if head ~= nil then
  742.                     local fov = defcon.Settings["aimbot_fov"]
  743.                     if fov == 0 then
  744.                         local headpos,targetheadang = v:GetBonePosition(head)
  745.                         LocalPlayer():SetEyeAngles((headpos - LocalPlayer():GetShootPos()):Angle())
  746.                     else
  747.                         local lpang = LocalPlayer():GetAngles();
  748.                         local ang = (v:GetPos() - LocalPlayer():GetPos()):Angle();
  749.                         local ady = math.abs(math.NormalizeAngle(lpang.y - ang.y))
  750.                         local adp = math.abs(math.NormalizeAngle(lpang.p - ang.p ))
  751.                         if not(ady > fov or adp > fov) then
  752.                             local headpos,targetheadang = v:GetBonePosition(head)
  753.                             if headpos != nil and targetheadang != nil then
  754.                                 LocalPlayer():SetEyeAngles((headpos - LocalPlayer():GetShootPos()):Angle())
  755.                             end
  756.                         end
  757.                     end
  758.                 end
  759.             end
  760.         end
  761.     end
  762.     if defcon.Settings["ttt_deathnotifs"] then
  763.         for k,v in pairs(player.GetAll()) do
  764.             if v:Alive() and not (defcon.Alive[v:UniqueID()] == true) then
  765.                 defcon.Alive[v:UniqueID()] = true
  766.             elseif not v:Alive() and (defcon.Alive[v:UniqueID()] == true) then
  767.                 defcon.Alive[v:UniqueID()] = false
  768.                 notification.AddLegacy(v:Nick().. " has died!", NOTIFY_GENERIC, 5)
  769.             end
  770.         end
  771.     end
  772. end)
  773. --bhop
  774. hook.Add( "CreateMove", "Billard_Bhop", function( ucmd )
  775.     if defcon.Settings["bhop_bhop"] then
  776.         if ucmd:KeyDown( IN_JUMP ) then
  777.             if LocalPlayer():WaterLevel() <= 1 && LocalPlayer():GetMoveType() != MOVETYPE_LADDER && !LocalPlayer():IsOnGround() then
  778.                     ucmd:RemoveKey( IN_JUMP )
  779.             end
  780.         end
  781.     end
  782. end )
  783. --velocity meter
  784. hook.Add("HUDPaint", "Velocity", function()
  785.     for k,v in pairs(player.GetAll()) do
  786.         if defcon.Settings ["velocity"] then
  787.             local showvel = math.floor(LocalPlayer():GetVelocity():Length())
  788.                 draw.RoundedBox(1, ScrW()/2.5, ScrH()/1.07, ScrW()/4.21, ScrH()/26, Color(50, 50, 50, 150))
  789.                 draw.DrawText("velocity: "..showvel, "velmet", ScrW()/2.5, ScrH()/1.08, Color(255, 255, 255, 185))
  790.                 end
  791.             end
  792.     end)
  793. --crosshair
  794. hook.Add( "HUDPaint", "CrossHair", function ( ucmd )
  795.     if defcon.Settings["crosshair"] then
  796.         local h = ScrH() / 2
  797.         local w = ScrW() / 2
  798.         local h1 = ScrH() / 2
  799.         local w1 = ScrW() / 2
  800.        
  801.         surface.SetDrawColor( 0, 255, 255 )
  802.         surface.DrawLine( w + 10, h, w - 10, h )
  803.         surface.DrawLine( w, h + 10, w, h - 10 )
  804.     end
  805.        
  806. end)
  807. --chat spam
  808. local function Spam2()
  809.     if defcon.Settings["chatspam1"] then
  810.          LocalPlayer():ConCommand("say "..table.Random(normalspam).." " )
  811.     end
  812. end
  813. timer.Create("Spammins2", .5,0,Spam2)
  814.  
  815. normalspam = {}
  816. normalspam[1] = "mods = fags"
  817. normalspam[2] = "I hate niggers"
  818. normalspam[3] = "sheo was here"
  819. normalspam[4] = "try finger but hole"
  820. normalspam[5] = "time for crab"
  821. normalspam[6] = "THIS SERVER IS GETTING FUCKING NULLED RN"
  822. normalspam[7] = "whoever made this server is a fucking downie holy shit"
  823. normalspam[8] = "this serv sucks, fuck you guys"
  824. normalspam[9] = "im not hacking wtf?"
  825. normalspam[10] = "Mega.co.nz is famous for it's shitposting on 4chan."
  826. normalspam[11] = "How much memes could a cock suck if 9/11?"
  827. normalspam[12] = "assrape"
  828. normalspam[13] = "AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH"
  829. normalspam[14] = "Sweedish fish are like apples, they taste good as candy, not the actual thing."
  830. normalspam[15] = "you what"
  831. normalspam[16] = "I'll quote your head with a rock!"
  832. normalspam[17] = "fuck me harder daddy"
  833. normalspam[18] = "dickrape is neat"
  834. normalspam[19] = "Shitty memes from a shitty dream."
  835. normalspam[20] = "sheogorath has aids"
  836. normalspam[21] = "fuck niggers"
  837. normalspam[22] = "♫im an alabama nigger and i wanna be free, to hell with the n double a-c-p!♫"
  838. normalspam[23] = "hey whats up guys it's scarce here"
  839. normalspam[24] = "//this is a test of the emergency broadcast system"
  840. normalspam[25] = "erp = b&"
  841. normalspam[26] = "50 percent off all fat farts at the fag store"
  842. normalspam[27] = "dennis the menace"
  843. normalspam[28] = "that's how things came to be, and that can never change, that can never change, no way.  That's how things came to be and that can never change, except when things'll change some day."
  844. normalspam[29] = "shoutout to poopnig420 for providing memes"
  845. normalspam[30] = "shoutout to inboot for providing packets"
  846. normalspam[31] = "geklmin is a grade-a autist."
  847. normalspam[32] = "REMOVE KEBAB remove kebab"
  848. normalspam[33] = "you are worst turk. you are the turk idiot you are the turk smell. return to croatioa. to our croatia cousins you may come our contry. you may live in the zoo….ahahahaha"
  849. normalspam[34] = "hahahahaha idiot turk and bosnian smell so bad..wow i can smell it."
  850. normalspam[35] = "you will get caught. russia+usa+croatia+slovak=kill bosnia…"
  851. normalspam[36] = "you will ww2/ tupac alive in serbia, tupac making album of serbia . fast rap tupac serbia."
  852. normalspam[37] = "2pac aliv and real strong wizard kill all the turk farm aminal with rap magic now we the serba rule ."
  853. normalspam[38] = "ape of the zoo presidant georg bush fukc the great satan and lay egg this egg hatch and bosnia wa;s born."
  854. normalspam[39] = "stupid baby form the eggn give bak our clay we will crush u lik a skull of pig. serbia greattst countrey"
  855. normalspam[40] = "cetnik rascal FUck but fuck asshole turk stink bosnia sqhipere shqipare..turk genocide best day of my life."
  856. normalspam[41] = "http://www.madbluntz.rs offical sponsor of the republika srpska - marijuana fanatics serbia"
  857.  
  858. local function Spam()
  859.     if defcon.Settings["chatspam2"] then
  860.          LocalPlayer():ConCommand("say "..table.Random(hl2rpvcspam).." " )
  861.     end
  862. end
  863. timer.Create("Spammins", .5,0,Spam)
  864.  
  865. hl2rpvcspam = {}
  866. hl2rpvcspam[1] = "noooo"
  867. hl2rpvcspam[2] = "whistle tune"
  868. hl2rpvcspam[3] = "i could eat a horse"
  869. hl2rpvcspam[4] = "combine"
  870. hl2rpvcspam[5] = "zombies"
  871. hl2rpvcspam[6] = "run"
  872. hl2rpvcspam[7] = "over here"
  873. hl2rpvcspam[8] = "hey over here"
  874. hl2rpvcspam[9] = "run for your life"
  875. hl2rpvcspam[10] = "hes dead"
  876. --laser eyes
  877. hook.Add("PostDrawOpaqueRenderables", "lazereyes", function()
  878.     if defcon.Settings["lasereyes"] then
  879.     for k, v in pairs(player.GetAll())do
  880.         local pos, ang = v:GetShootPos();
  881.         render.SetMaterial(Material("sprites/bluelaser1"));
  882.         render.DrawBeam(pos, v:GetEyeTrace().HitPos, 5, 1, 1, team.GetColor(v:Team()));
  883.     end
  884.     end
  885. end)  
  886.  
  887. --everything below is disabled, don't fuck with this unless you know what you're doing.
  888. /*concommand.Add("debug", function()
  889.     local pcash,gname = "", gmod.GetGamemode().Name
  890.     print("Game-mode:\n    "..gname)
  891.     if string.find(gname, "DarkRP") then
  892.         print("Player Cash Amounts")
  893.         for k,v in pairs(player.GetAll()) do
  894.             if not(v.DarkRPVars and v.DarkRPVars.money)and(darkrpvar == true) then
  895.                 darkrpvar = false
  896.             end
  897.             if v ~= LocalPlayer() then
  898.                 pcash = pcash.."    "..v:Nick().." - "..v.DarkRPVars.money.."\n"
  899.             end
  900.         end
  901.         if pcash ~= "" then
  902.             print(pcash)
  903.         end
  904.     end
  905.     if LocalPlayer().GetActiveWeapon and LocalPlayer():GetActiveWeapon() ~= nil and IsValid(LocalPlayer():GetActiveWeapon()) then
  906.         print("Current Weapon")
  907.         print("    "..LocalPlayer():GetActiveWeapon():GetClass())
  908.     end
  909.         local pos = LocalPlayer():GetShootPos()
  910.     local ang = LocalPlayer():GetAimVector()
  911.     local tracedata = {}
  912.     tracedata.start = pos
  913.     tracedata.endpos = pos+(ang*9999999999999)
  914.     local trace = util.TraceLine(tracedata)
  915.     if(trace.HitNonWorld) then
  916.         target = trace.Entity
  917.         print("Entity Info")
  918.         print("    Class: "..target:GetClass())
  919.         print("    Model: "..target:GetModel())
  920.     end
  921. end)*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement