AddCSLuaFile("fixes.lua"); function PCallError( ... ) local errored, rA, rB, rC, rD, rE, rF, rG, rH = pcall( ... ) if ( !errored ) then ErrorNoHalt( rA ) return false, rA end return true, rA, rB, rC, rD, rE, rF, rG, rH end function GetWorldEntity() return game.GetWorld(); end function MaxPlayers() return game.MaxPlayers(); end function ValidEntity(ent) return IsValid(ent); end function timer.IsTimer(str) return timer.Exists(str); end local Entity = FindMetaTable("Entity"); local SetColor = Entity.SetColor; function Entity:SetColor(r, g, b, a) if type(r) == "table" then return SetColor(self, r); else return SetColor(self, Color(r or 255, g or 255, b or 255, a or 255)); end end function WorldSound(...) sound.Play(...); end print("loading") F = {}; _F = {}; _F.pGetAll = player.GetAll _F.eGetAll = ents.GetAll _F.HookAdd = hook.Add _F.Concommands = {} local _G = table.Copy( _G ) local player = table.Copy( player ) local RunConsoleCommand = _G.RunConsoleCommand local font = surface; local LocalPlayer = LocalPlayer local ValidEntity = ValidEntity local Me = LocalPlayer function _F.AddConsoleCommand( name, func, afunc, help ) AddConsoleCommand( name, help ) _F.Concommands[name] = { func = func, afunc = afunc, help = help } end function F:AddConcommand( concomm, func ) _F.AddConsoleCommand( concomm, func ) end surface.CreateFont("hpfont", {font="TabLarge", size=12, outline = true, antialias = true, shadow = true, weight=500}) surface.CreateFont("DefaultFixedOutline", {font="TabLarge", size=15, underline = false, outline = true, antialias = true, weight=700}) _F.ESPEnts = { pot = "Weed", ent_pot = "Pot", shroom = "Mushrooms", money_printer = "Printer", moneyprinter = "Printer", spawned_money = "Money", gunlab = "Gun lab", druglab = "Drug lab", beer_still = "Beer Still", drug_lab = "Drug Lab" } local ESPDist = CreateClientConVar("esp_espdist", 2000, true, false) _F.Variables = { esp_enabled = true, disp_spents = true, disp_ents = true, esp_showwep = false, } local function GetPos( ent ) return ent:GetPos(); end local function GetClass( ent ) return ent:GetClass(); end local function Alive( ply ) return ply:Health() >= 1; end local function ToScreen( vector ) return vector:ToScreen(); end local NoLookingAtWeapons = {"weapon_physgun", "weapon_physcannon", "gmod_Famera", "keys", "pocket"} function _F.IsCloseEnough( ent ) local dist = ent:GetPos():Distance( Me():GetPos() ) if( dist <= ESPDist:GetInt() and ent:GetPos() != Vector( 0, 0, 0 ) ) then return true end return false end F:AddConcommand("print_admins", function() for k,v in pairs(player.GetAll()) do if v:IsAdmin() then print("[cHack] " .. v:Name() .. " [" .. v:SteamID() .. "] = Admin") elseif v:IsSuperAdmin() then print("[cHack] " .. v:Name() .. " [" .. v:SteamID() .. "] = Super Admin") end end end) _F.HookAdd("HUDPaint", "ESP", function() local lp = LocalPlayer(); if( _F.Variables.esp_enabled ) then for i = 1, #_F.pGetAll() do local ply = player.GetAll()[i]; if( Alive(ply) && v != Me() && _F.IsCloseEnough( ply ) and ply:Team() != TEAM_SPECTATOR ) then if( Alive( ply ) and ply ~= lp and ValidEntity( ply ) ) then local pos = ToScreen(GetPos( ply ) + Vector(0, 0, 80)); font.SetFont("DefaultFixedOutline"); font.SetTextColor( team.GetColor( ply:Team() ) ); font.SetTextPos(pos.x - 10, pos.y); font.DrawText( ply:Nick() ); draw.DrawText("H:" .. ply:Health(), "hpfont", pos.x, pos.y +20, Color(255, 255, 255, 255)); if( _F.Variables.esp_showwep ) then if(ply:GetActiveWeapon():IsValid()) then draw.DrawText("W:" .. ply:GetActiveWeapon():GetClass(), "DefaultFixedOutline", pos.x, pos.y +34, Color(255, 255, 255, 255)) end end end end end end if( _F.Variables.disp_spents ) then for _, b in pairs( _F.eGetAll() ) do for c, d in pairs( _F.ESPEnts ) do if( ValidEntity( b ) and string.find(c, GetClass( b ) ) ) then local pos = ToScreen(GetPos( b ) + Vector(0, 0, 50)); font.SetFont("DefaultFixedOutline"); font.SetTextColor(Color(0, 255, 0, 255)); font.SetTextPos(pos.x - 10, pos.y); font.DrawText( d ); end end if( _F.Variables.disp_ents ) then if( ValidEntity( b ) && GetClass(b) == "" ) then local pos = ToScreen(GetPos( b ) + Vector(0, 0, 50)); font.SetFont("DefaultFixedOutline"); font.SetTextColor(Color(0, 255, 0, 255)); font.SetTextPos(pos.x - 10, pos.y); font.DrawText( GetClass( b ) ); end end end end end) local matBlurScreen = Material( "pp/blurscreen" ) local function drawBlur(panel) panel.Paint = function(self) surface.SetDrawColor( 50, 50, 50, 255 ) surface.DrawOutlinedRect( 0, 0, self:GetWide(), self:GetTall() ) surface.SetMaterial( matBlurScreen ) surface.SetDrawColor( 255, 255, 255, 255 ) local x1, y1 = self:LocalToScreen( 1, 1 ) local x2, y2 = self:LocalToScreen( self:GetWide() - 1, self:GetTall() - 1 ) x1 = x1 + 5 y1 = y1 + 5 x2 = x2 - 5 y2 = y2 - 5 matBlurScreen:SetFloat( "$blur", 5 ) render.UpdateScreenEffectTexture() surface.DrawPoly( { { x = 1, y = 1, u = x1/ScrW(), v = y1/ScrH() }, { x = self:GetWide() - 1, y = 1, u = x2/ScrW(), v = y1/ScrH() }, { x = self:GetWide() - 1, y = self:GetTall() - 1, u = x2/ScrW(), v = y2/ScrH() }, { x = 1, y = self:GetTall() - 1, u = x1/ScrW(), v = y2/ScrH() } } ) surface.SetDrawColor( 136, 167 , 191 , 150 ) surface.DrawRect( 2, 1, self:GetWide() - 2, self:GetTall() - 2 ) end end function F:GetESPSheet(x,y) local panel = vgui.Create("DPanel") panel:SetPos(0,0) panel:SetSize(x,y) panel.Paint = function() end panel:SetSkin(derma.GetNamedSkin("Default")) local dpanellistb = vgui.Create("DPanelList") -- Hold the bools dpanellistb:SetParent(panel) dpanellistb:SetPos(10, 5) dpanellistb:SetSize(180,y-40) dpanellistb:EnableVerticalScrollbar(true) dpanellistb:EnableHorizontal(false) dpanellistb:SetSpacing(5) dpanellistb:SetSkin(derma.GetNamedSkin("Default")) dpanellistb.Paint = function() end local dpanellisti = vgui.Create("DPanelList") dpanellisti:SetParent(panel) dpanellisti:SetPos(195, 180) dpanellisti:SetSize(x-166,y-195) dpanellisti:EnableVerticalScrollbar(true) dpanellisti:EnableHorizontal(true) dpanellisti:SetSpacing(5) dpanellisti:SetSkin(derma.GetNamedSkin("Default")) dpanellisti.Paint = function() end return panel end function F:OpenMenu() if not F.Menu then F.Menu = vgui.Create("DFrame") F.Menu:SetSize(590,410) F.Menu:SetTitle("Menu") F.Menu:Center() F.Menu:MakePopup() F.Menu.Close = function() F.Menu:SetVisible(false) end F.Menu:SetSkin(derma.GetNamedSkin("Default")) drawBlur(F.Menu) local mf_w, mf_h = F.Menu:GetWide(),F.Menu:GetTall(); local dpsheet1 = vgui.Create("DPropertySheet") dpsheet1:SetParent(F.Menu) dpsheet1:SetPos(1,22) dpsheet1:SetSize(mf_w-2,mf_h-23) dpsheet1:SetSkin(derma.GetNamedSkin("Default")) //local sheet_aimbot = F:GetAimbotSheet(mf_w-2,mf_h-23) //sheet_aimbot:SetSkin(derma.GetNamedSkin("Default")) local sheet_esp = vgui.Create("DPanel") sheet_esp:SetSize(mf_w-2,mf_h-23) sheet_esp:SetSkin(derma.GetNamedSkin("Default")) local sheet = F:GetESPSheet(mf_w-2,mf_h-23) sheet:SetParent(sheet_esp) local x,y = sheet_esp:GetWide(),sheet_esp:GetTall() sheet:SetSize(x,y) dpsheet1:AddSheet( "ESP/Wallhack", sheet_esp, "gui/silkicons/group", false, false, "Change ESP and Wallhack settings here." ) else F.Menu:SetVisible(not(F.Menu:IsVisible())) end end concommand.Add("+f_menu" ,F.OpenMenu) print("done loading")