Code:
surface.CreateFont("PaX_ButtonFont", {
font = "Trebuchet",
size = 21,
})
local pVars = {
Aimbot = {
Enabled = false,
},
}
local function DrawText(txt, font, x, y, col, left)
draw.SimpleText(txt, font, x, y, col, left and TEXT_ALIGN_LEFT or TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
end
local function FillRGBA(x, y, wid, height, col)
surface.SetDrawColor(col)
surface.DrawRect(x, y, wid, height)
end
local function CreateButton(txt, type, val, x, y, frame, tbl)
local twid = surface.GetTextSize(txt)
local btn = vgui.Create("DButton", frame)
btn:SetSize(twid + 25, 20)
btn:SetPos(x, y)
btn:SetText("")
btn.Paint = function(self, wid, height)
FillRGBA(0, 0, 20, height, Color(51, 204, 255, 255))
if !tbl[type][val] then
FillRGBA(2, 2, 16, 16, Color(255, 255, 255, 255))
end
DrawText(txt, "PaX_ButtonFont", 25, 10, Color(185, 185, 185), true)
end
btn.DoClick = function()
tbl[type][val] = !tbl[type][val]
end
end
local bool = true
local function gMenu()
local main = vgui.Create("DFrame")
main:SetSize(625, 500)
main:SetTitle("")
main:Center()
main:MakePopup()
main:ShowCloseButton(false)
main.Paint = function(self, wid, height)
FillRGBA(0, 0, wid, 30, Color(51, 204, 255, 255))
DrawText("PaX Menu", "Trebuchet24", wid / 2, 15, Color(255, 255, 255))
FillRGBA(0, 30, wid, height, Color(255, 255, 255, 255))
end
local close = vgui.Create("DButton", main)
close:SetSize(30, 30)
close:SetPos(595, 0)
close:SetText("")
close.Paint = function(self, wid, height)
FillRGBA(0, 0, wid, height, Color(235, 25, 19, 255))
DrawText("x", "Trebuchet24", wid / 2, height / 2, Color(255, 255, 255))
end
close.DoClick = function()
main:Close()
end
CreateButton("Aimbot Enabled", "Aimbot", "Enabled", 12, 40, main, pVars)
end
concommand.Add("gmenu", gMenu)
ok mr. meme