Advertisement
IRSpafic

Codinglizard Gmod Hack

Feb 19th, 2013
6,563
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 16.60 KB | None | 0 0
  1. -- Full Download: https://dl.dropbox.com/u/7870266/leaks/GameHacks/Gmod%20Hack%20from%20HF.rar
  2. -- No authentication on package sent, so have fun.
  3. --
  4. -- Start Script
  5. --
  6. --RunConsoleCommand("sv_allowcslua", "0")
  7. local cathack = {Menu = {tabs = {}, b = {}}}
  8. local menu = cathack.Menu
  9.  
  10. cathack.Settings = {
  11.     aimbot          = true;
  12.     aimbot_fov      = 5;
  13.     aimbot_bone     = "ValveBiped.Bip01_Head1";
  14.    
  15.     triggerbot      = true;
  16.    
  17.     esp             = true;
  18.     esp_ply         = true;
  19.     esp_ply_name    = true;
  20.     esp_ply_rank    = true;
  21.     esp_ply_health  = true;
  22.     esp_ply_dist    = true;
  23.     esp_player_dist = 2000;
  24.     esp_ent         = true;
  25.     esp_ent_dist    = 2000;
  26.    
  27.     darkrp_god      = false;
  28.     flashlight_spam = true;
  29.     bunnyhop        = false;
  30. }
  31.  
  32.  
  33.  
  34. cathack.Whitelist = {
  35. }
  36. cathack.Entities = {
  37.     "money_printer";
  38.     "spawned_money";
  39.     "ent_pot_leaf";
  40.     "ent_coca_leaf";
  41.     "topaz_money_printer";
  42.     "sapphire_money_printer";
  43.     "ruby_money_printer";
  44.     "emerald_money_printer";
  45.     "amethyst_money_printer";
  46.     "drug_pot_seeds";
  47.     "perp_di";
  48. }
  49. cathack.Phrases = {
  50.     "Syko is a fucking psycho";
  51.     "Syko will rape you";
  52.     "Roarax is a nigger";
  53.     "dude wtf anticheat cant touch me";
  54.     "$10 for hake";
  55.     "lol i code html";
  56. }
  57.  
  58. cathack.Bones = {
  59.     head = "ValveBiped.Bip01_Head1";
  60.     spine = "ValveBiped.Bip01_Spine";
  61. }
  62.  
  63. surface.CreateFont("Trebuchet19cat", {font="TabLarge", size=13, weight=700})
  64. surface.CreateFont("Trebuchetcat", {font="TabLarge", size=10, weight=700})
  65.  
  66. function cathack.CloneTable( src ) --cbot
  67.     local new = {}
  68.     for k, v in pairs( src ) do
  69.         local newf = rawget(src, k);
  70.         if( type( newf ) == "table" and v ~= src ) then
  71.             new[k] = cathack.CloneTable( v );
  72.         else
  73.             new[k] = newf;
  74.         end
  75.     end
  76.  
  77.     return new;
  78. end
  79.  
  80. cathack.table           = cathack.CloneTable( table );
  81. cathack.hook            = cathack.CloneTable( hook );
  82. cathack.math            = cathack.CloneTable( math );
  83. cathack.surface         = cathack.CloneTable( surface );
  84. cathack.draw            = cathack.CloneTable( draw );
  85.  
  86. local table             = cathack.table;
  87. local hook              = cathack.hook;
  88. local math              = cathack.math;
  89. local surface           = cathack.surface;
  90. local draw              = cathack.draw;
  91.  
  92. function cathack.GetShootPos(ent)
  93.     local eyes = ent:LookupAttachment("eyes");
  94.     if(eyes ~= 0) then
  95.         eyes = ent:GetAttachment(eyes);
  96.         if(eyes and eyes.Pos) then
  97.             return eyes.Pos, eyes.Ang;
  98.         end
  99.     end
  100. end
  101.  
  102. function cathack.GetVisible(ent)
  103.     local pos = LocalPlayer():GetShootPos()
  104.     local ang = LocalPlayer():GetAimVector()
  105.     local trace = {start = LocalPlayer():GetShootPos(), endpos = cathack.GetShootPos(ent), filter = {LocalPlayer(), ent}, mask = 1174421507};
  106.     local tr = util.TraceLine(trace);
  107.     return(tr.Fraction == 1);
  108. end
  109.  
  110. function cathack.Whitelisted(ent)
  111.     if table.HasValue(cathack.Whitelist, ent:SteamID()) then return true
  112.     else return false end
  113. end
  114.  
  115. function cathack.Target(v)
  116.     if v:IsPlayer() then
  117.         if (cathack.GetVisible(v) and (not cathack.Whitelisted(v)) and v:Alive() and (v:Health() > 0) and v:Team() ~= TEAM_SPECTATOR) then
  118.             if (v ~= LocalPlayer() and LocalPlayer():Alive() and LocalPlayer():Team() ~= TEAM_SPECTATOR) then
  119.                 if string.find(gmod.GetGamemode().Name, "Stronghold") then
  120.                     if (v:Team() ~= LocalPlayer():Team()) then
  121.                         return true
  122.                     end
  123.                 else
  124.                     return true
  125.                 end
  126.             end
  127.         end
  128.     end
  129.     return false
  130. end
  131.  
  132. function cathack.ESP(typ, v)
  133.     if typ == "player" then
  134.         if v:Alive() && v:Health() >= 1 && v ~= LocalPlayer() && /*LocalPlayer():Alive() &&*/ LocalPlayer():Team() ~= TEAM_SPECTATOR then
  135.             return true
  136.         else
  137.             return false
  138.         end
  139.     elseif typ == "entity" then
  140.         if IsValid(v) then
  141.             return true
  142.         end
  143.     end
  144. end
  145.  
  146. function cathack.Rank(v)
  147.     if v:IsAdmin() or v:IsSuperAdmin() then
  148.         return "[A] "
  149.     else return "" end
  150. end
  151.  
  152. function cathack.Get(value)
  153.     if not(cathack.Settings[value]) then return end
  154.    
  155.     if cathack.Settings[value] == true then
  156.         return "enabled"
  157.     elseif cathack.Settings[value] == false then
  158.         return "disabled"
  159.     elseif cathack.Settings[value] == "ValveBiped.Bip01_Head1" then
  160.         return "head"
  161.     elseif cathack.Settings[value] == "ValveBiped.Bip01_Spine4" then
  162.         return "spine"
  163.     else
  164.         return cathack.Settings[value]
  165.     end
  166. end
  167.  
  168. function cathack.Set(value, value2)
  169.     if value2 == "enabled" then
  170.         cathack.Settings[value] = true
  171.     elseif value2 == "disabled" then
  172.         cathack.Settings[value] = false
  173.     elseif value2 == "head" then
  174.         cathack.Settings[value] = "ValveBiped.Bip01_Head1"
  175.     elseif value2 == "spine" then
  176.         cathack.Settings[value] = "ValveBiped.Bip01_Spine4"
  177.     else
  178.         cathack.Settings[value] = value2
  179.     end
  180. end
  181.  
  182. function cathack.GetBone()
  183.     local b = cathack.Settings["aimbot_bone"]
  184.     if b == "head" then
  185.         return cathack.Bones["head"]
  186.     elseif b == "spine" then
  187.         return cathack.Bones["spine"]
  188.     end
  189.     return nil
  190. end
  191.  
  192. function cathack.CreateTab(txt, szw, szh, psw, psh, parent, func)
  193.     if(not parent) then return; end
  194.     local panel = vgui.Create("DPanel", menu.frame);
  195.     panel:SetPos(120,25);
  196.     panel:SetSize(375,405);
  197.     if menu.curwin == txt then panel:SetVisible(true) else panel:SetVisible(false) end
  198.     panel.Paint = function()
  199.         local line = "__________________________________________________________________________"
  200.         surface.SetDrawColor( 00, 00, 00, 255 )
  201.         surface.DrawRect( 0, 0, panel:GetWide(), panel:GetTall() )
  202.         surface.CreateFont("shmenufont", {font="coolvetica", size=64, weight=500});
  203.         surface.CreateFont("shmenufont2", {font="coolvetica", size=24, weight=500});
  204.         draw.SimpleText(txt, "shmenufont", 10, 10, Color(255, 00, 00, 235), TEXT_ALIGN_LEFT);
  205.         --draw.SimpleText(line, "MenuLarge", 50, 60, Color(0,0,0,255), TEXT_ALIGN_CENTER)
  206.         if txt == "ESP" then
  207.             draw.SimpleText("Player ESP", "shmenufont2", 5, 100, Color(255,00,00,235), TEXT_ALIGN_LEFT);
  208.             draw.SimpleText("Entity ESP", "shmenufont2", 5, 250, Color(255,00,00,235), TEXT_ALIGN_LEFT);
  209.         end
  210.     end
  211.     local button = vgui.Create("DButton", parent);
  212.     button:SetText(txt);
  213.     button:SetSize(szw, szh);
  214.     button:SetPos(psw, psh);
  215.     button.Paint = function(self) derma.SkinHook("PaintOver", "Button", self) end
  216.     button:SetVisible(true);
  217.     button.DoClick = func or function()
  218.         for k,v in pairs(menu.tabs) do
  219.             if v ~= panel then
  220.                 v:SetVisible(false)
  221.             end
  222.         end
  223.         panel:SetVisible(true)
  224.         menu.curwin = txt
  225.         surface.PlaySound("ambient/levels/canals/drip4.wav");
  226.     end
  227.     return panel, button;
  228. end
  229.  
  230. function cathack.AddFeature(parent, id, typ, text, val, option1, option2, option3, option4, option5)
  231.     if not(parent) or not(typ) then return; end
  232.     local posy = (55+(id*25))
  233.     if typ == "button" then
  234.         if cathack.Settings[val] == nil then return end
  235.         if text ~= nil then
  236.             local label = vgui.Create("DLabel", parent)
  237.             label:SetText(text)
  238.             label:SetPos(5,posy)
  239.             label:SizeToContents(false)
  240.         end
  241.  
  242.         local button = vgui.Create("DButton", parent)
  243.         if cathack.Get(val) == option1 then
  244.             button:SetText(option1)
  245.         else
  246.             button:SetText(option2)
  247.         end
  248.         button:SetSize(80,20)
  249.         if id == 0 then
  250.             button:SetPos(285,45)
  251.         else
  252.             button:SetPos(285,posy)
  253.         end
  254.         button.DoClick = function()
  255.             if button:GetText() == option1 then
  256.                 button:SetText(option2); cathack.Set(val, option2)
  257.             else
  258.                 button:SetText(option1); cathack.Set(val, option1)
  259.             end
  260.         end
  261.         return button, label
  262.     elseif typ == "dbutton" then
  263.         local button = vgui.Create("DButton", parent)
  264.         button:SetPos(option1,option2)
  265.         button:SetSize(option3,option4)
  266.         button:SetText(text)
  267.         button.DoClick = option5
  268.         return button
  269.     elseif typ == "slider" then
  270.         local slider = vgui.Create("DNumSlider", parent)
  271.         slider:SetPos(5, posy-10)
  272.         slider:SetText(text)
  273.         slider:SetMinMax(option1, option2)
  274.         slider:SetWide(372.5)
  275.         slider:SetDecimals( 0 )
  276.         slider:SetValue(cathack.Get(val))
  277.         slider.OnValueChanged = function(panel, value)
  278.             local c = tonumber(value)
  279.             cathack.Set(val, math.Round(c))
  280.         end
  281.         return slider;
  282.     elseif typ == "label" then
  283.         local label = vgui.Create("DLabel", parent)
  284.         label:SetText(text)
  285.         label:SetPos(5,posy)
  286.         label:SizeToContents(false)
  287.     end
  288. end
  289.  
  290. function cathack.DrMenu()
  291.     if(menu.frame) then menu.frame:Remove(); end
  292.    
  293.     menu.frame = vgui.Create("DFrame");
  294.     menu.frame:SetPos(ScrW()/2-184, ScrH()/2-155);
  295.     menu.frame:SetSize(500, 435);
  296.     menu.frame:SetTitle("vHack @ CodingLizzard Beta "..cathack.Phrases[math.random(1, table.Count(cathack.Phrases))]);
  297.     menu.frame:SetVisible(true);
  298.     menu.frame:SetDraggable(true);
  299.     menu.frame:SetSizable(false);
  300.     menu.frame:ShowCloseButton(false);
  301.     menu.frame:SetBackgroundBlur(true)
  302.     menu.frame:MakePopup();
  303.  
  304.     menu.buttons = vgui.Create("DPanel", menu.frame)
  305.     menu.buttons:SetPos(5, 25)
  306.     menu.buttons:SetSize(110,405)
  307.     menu.buttons.Paint = function()
  308.         surface.SetDrawColor(50,50,255,255)
  309.         surface.DrawRect(0, 0, menu.buttons:GetWide(), menu.buttons:GetTall())
  310.     end
  311.  
  312.     menu.tabs.aimbot, menu.b.aimbot =   cathack.CreateTab("Aimbot", 80, 20, 15, 10, menu.buttons)
  313.     menu.tabs.pesp, menu.b.pesp     =   cathack.CreateTab("ESP", 80, 20, 15, 35, menu.buttons)
  314.     menu.tabs.wh, menu.b.wh         =   cathack.CreateTab("Wallhack", 80, 20, 15, 60, menu.buttons)
  315.     menu.tabs.misc, menu.b.misc     =   cathack.CreateTab("Misc", 80, 20, 15, 85, menu.buttons)
  316.    
  317.     local mta = menu.tabs.aimbot
  318.     local mtp = menu.tabs.pesp
  319.     local mtw = menu.tabs.wh
  320.     local mtm = menu.tabs.misc
  321.     -- aimbot tab
  322.     cathack.AddFeature(mta, 1, "button", "Aimbot", "aimbot", "enabled", "disabled")
  323.     cathack.AddFeature(mta, 2, "button", "Aim-bone", "aimbot_bone", "head", "spine")
  324.     cathack.AddFeature(mta, 3, "slider", "Aim FOV", "aimbot_fov", 1, 180)
  325.     cathack.AddFeature(mta, 4, "button", "Triggerbot", "triggerbot", "enabled", "disabled")
  326.    
  327.     -- esp tab
  328.     cathack.AddFeature(mtp, 0, "button", nil, "esp", "enabled", "disabled")
  329.    
  330.     cathack.AddFeature(mtp, 2, "button", "Enabled", "esp_player", "enabled", "disabled")
  331.     cathack.AddFeature(mtp, 3, "button", "Show Name", "esp_ply_name", "enabled", "disabled")
  332.     cathack.AddFeature(mtp, 4, "button", "Show Rank", "esp_ply_rank", "enabled", "disabled")
  333.     cathack.AddFeature(mtp, 5, "button", "Show Health", "esp_ply_health", "enabled", "disabled")
  334.     cathack.AddFeature(mtp, 6, "button", "Show Distance", "esp_ply_dist", "enabled", "disabled")
  335.     cathack.AddFeature(mtp, 7, "slider", "Distance", "esp_player_dist", 0, 16000)
  336.     cathack.AddFeature(mtp, 9, "button", "Enabled", "esp_ent", "enabled", "disabled")
  337.     cathack.AddFeature(mtp, 10, "slider", "Distance", "esp_ent_dist", 0, 16000)
  338.    
  339.     -- misc tab
  340.     cathack.AddFeature(mtm, 1, "button", "Flashlight Spam", "flashlight_spam", "enabled", "disabled")
  341.     cathack.AddFeature(mtm, 2, "button", "DarkRP God Exploit", "darkrp_god", "enabled", "disabled")
  342.     cathack.AddFeature(mtm, 3, "button", "Bunnyhop", "bunnyhop", "enabled", "disabled")
  343. end
  344.  
  345. hook.Add("Think", "catMENU", function()
  346.     if(input.IsKeyDown(KEY_TAB) && input.IsKeyDown(KEY_Q) && !menu.frame)then
  347.         cathack.DrMenu()
  348.     elseif(menu.frame && input.IsKeyDown(KEY_ESCAPE))then
  349.         menu.frame:Remove(); menu.frame = nil
  350.         cathack.Menu = {}
  351.     end
  352. end)
  353.  
  354. hook.Add("Think", "catBOT", function()
  355.     -- triggerbot
  356.     if(cathack.Settings["triggerbot"] && input.IsKeyDown(KEY_B)) then
  357.         local pos = LocalPlayer():GetShootPos()
  358.         local ang = LocalPlayer():GetAimVector()
  359.         local tracedata = {}
  360.         tracedata.start = pos
  361.         tracedata.endpos = pos+(ang*9999999999999)
  362.         local trace = util.TraceLine(tracedata)
  363.         if(trace.HitNonWorld) then
  364.             target = trace.Entity
  365.             if(target:IsPlayer() and (not cathack.Whitelisted(target))) then
  366.                 RunConsoleCommand("+attack")
  367.                 timer.Simple(0.000000000000000000001, function() RunConsoleCommand("-attack") end)
  368.             end
  369.         end
  370.     end
  371.     -- aimbot [ need bone changing support ]
  372.     if(cathack.Settings["aimbot"] && input.IsKeyDown(KEY_B)) /*or cathack.Settings["alert"]*/ then
  373.         for k,v in pairs(player.GetAll()) do
  374.             /*if cathack.Settings["aimbot"] && input.IsKeyDown(KEY_B) then*/
  375.             local bone = cathack.Settings["aimbot_bone"];
  376.                 if cathack.Target(v) then
  377.                     local head = v:LookupBone(bone)
  378.                     local fov = cathack.Settings["aimbot_fov"]
  379.                     if fov == 0 then
  380.                         local headpos,targetheadang = v:GetBonePosition(head)
  381.                         LocalPlayer():SetEyeAngles((headpos - LocalPlayer():GetShootPos()):Angle())
  382.                     else
  383.                         local lpang = LocalPlayer():GetAngles();
  384.                         local ang = (v:GetPos() - LocalPlayer():GetPos()):Angle();
  385.                         local ady = math.abs(math.NormalizeAngle(lpang.y - ang.y))
  386.                         local adp = math.abs(math.NormalizeAngle(lpang.p - ang.p ))
  387.                         if not(ady > fov or adp > fov) then
  388.                             local headpos,targetheadang = v:GetBonePosition(head)
  389.                             if headpos != nil and targetheadang != nil then
  390.                             LocalPlayer():SetEyeAngles((headpos - LocalPlayer():GetShootPos()):Angle())
  391.                             end
  392.                         end
  393.                     end
  394.                 end
  395.                
  396.             --end
  397.             /*if cathack.Settings["alert"] then
  398.                 local d = cathack.Settings["alert_dist"]
  399.                 if v ~= LocalPlayer() and (v:GetPos():Distance(LocalPlayer():GetPos()) < d) then
  400.                    
  401.                 end
  402.             end*/
  403.         end
  404.     end
  405.     if cathack.Settings["flashlight_spam"] and input.IsKeyDown(KEY_O) then
  406.         RunConsoleCommand("impulse", "100")
  407.     end
  408.    
  409.     if cathack.Settings["darkrp_god"] and LocalPlayer():Health() < 100 and LocalPlayer():Alive() then
  410.         RunConsoleCommand("say", "/buyhealth")
  411.     end
  412.    
  413.     if cathack.Settings["bunnyhop"] and input.IsKeyDown(KEY_SPACE) then
  414.         if(LocalPlayer():OnGround())then
  415.             LocalPlayer():ConCommand("+jump")
  416.             timer.Simple(0.01, function()
  417.                 LocalPlayer():ConCommand("-jump")
  418.             end)
  419.         end
  420.     end
  421. end)
  422.  
  423.  
  424.  
  425.  
  426. hook.Add("HUDPaint", "catHUD", function()
  427.     if cathack.Settings["esp"] then
  428.         for k,v in pairs(ents.GetAll()) do
  429.             if cathack.Settings["esp_ply"] && v:IsPlayer() then
  430.                 if(cathack.ESP("player", v) and v:GetPos():Distance(LocalPlayer():GetPos()) < (cathack.Settings["esp_player_dist"]))then
  431.                     local ESP = (v:EyePos()):ToScreen()
  432.                     local name,health,rank,col,distance = "","","","",""
  433.                     local outcol = Color(0,0,0,255)
  434.                     local white = Color(255,255,255,255)
  435.                     local outcol2 = outcol
  436.                     if cathack.Settings["esp_ply_name"] then
  437.                         if v.GetRPName then name = v:GetRPName()
  438.                         else name = v:Nick() end
  439.                     end
  440.                     if v:Nick() ~= name then rank = " "..v:Nick() end
  441.                     if cathack.Settings["esp_ply_rank"] then
  442.                         if v:IsSuperAdmin() then
  443.                             rank = "[Super Admin]"..rank
  444.                         elseif v:IsAdmin() then
  445.                             rank = "[Admin]"..rank
  446.                         elseif v:IsUserGroup("moderator") or v:IsUserGroup("mod") then
  447.                             rank = "[Moderator]"..rank
  448.                         elseif v:IsUserGroup("vip") or v:IsUserGroup("donator") then
  449.                             rank = "[Donator]"..rank
  450.                         end
  451.                     end
  452.                     if cathack.Settings["esp_ply_health"] then
  453.                         health = v:Health().."H - "..v:Armor().."A"
  454.                     end
  455.                     if cathack.Settings["esp_ply_dist"] then
  456.                         distance = v:GetPos():Distance(LocalPlayer():GetPos())
  457.                         distance = math.Round(distance).." m"
  458.                     end
  459.                     col = team.GetColor(v:Team())
  460.                     if(col.r <= 50 and col.g <= 50 and col.b <= 50) then
  461.                         outcol2 = Color(200,200,200,255)
  462.                     end
  463.                     if col.a <= 50 then
  464.                         col = Color(col.r,col.g,col.b, 255)
  465.                     end
  466.                     draw.SimpleTextOutlined(rank, "Trebuchetcat", ESP.x, ESP.y -46, col, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, outcol2)
  467.                     draw.SimpleTextOutlined(name, "Trebuchet19cat", ESP.x, ESP.y - 34, col, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, outcol2)
  468.                     draw.SimpleTextOutlined(health, "Trebuchetcat", ESP.x, ESP.y -22, white, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, outcol)
  469.                     draw.SimpleTextOutlined(distance, "Trebuchetcat", ESP.x, ESP.y - 10, white, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, outcol)
  470.                 end
  471.             end
  472.             if (cathack.Settings["esp_ent"] and cathack.ESP("entity", v) and (v:GetPos():Distance(LocalPlayer():GetPos()) < cathack.Settings["esp_ent_dist"]))then
  473.                 for k,e in pairs(cathack.Entities) do
  474.                     if e == v:GetClass() then
  475.                         local ESP = (v:EyePos()):ToScreen()
  476.                         draw.SimpleTextOutlined(v:GetClass(), "Trebuchet19cat", ESP.x, ESP.y - 46, Color(255,0,0,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color(0,0,0,255))
  477.                     end
  478.                 end
  479.             end
  480.         end
  481.     end
  482. end)
  483.  
  484.  
  485.  
  486. concommand.Add("defcon", function()
  487.     local z = {"player"}
  488.     local t = {}
  489.     for k,v in pairs(ents.GetAll()) do
  490.         if not table.HasValue(t, v:GetClass()) then
  491.             table.insert(t, v:GetClass())
  492.         end
  493.     end
  494.     for e,x in pairs(t) do
  495.         if !table.HasValue(z, x) then
  496.             print(x)
  497.         end
  498.     end
  499. end)
  500.  
  501. concommand.Add("cathack", function()
  502.     local darkrpvar = true
  503.     print("Player Cash Amounts")
  504.     for k,v in pairs(player.GetAll()) do
  505.         if not(v.DarkRPVars and v.DarkRPVars.money)and(darkrpvar == true) then
  506.             darkrpvar = false
  507.         end
  508.         if v ~= LocalPlayer() then
  509.             print("    "..v:Nick().." : "..tostring(v.DarkRPVars.money))
  510.         end
  511.     end
  512.     if darkrpvar == false then
  513.         print("    Unable to get player cash amounts.")
  514.     end
  515. end)
  516.  
  517. concommand.Add("catapult", function()
  518.     PrintTable(player.GetAll()[3]:GetTable())
  519. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement