Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local frame
- hook.Add("KeyPress", "HoboMenuOpen", function(ply, key)
- if ply:KeyDown(IN_SPEED) and key == IN_USE and (not frame or not fram:IsVisible()) then
- frame = vgui.Create("DFrame")
- frame:SetTitle("Hobo Menu")
- frame:SetSize(300, 300)
- frame:Center()
- frame:MakePopup()
- frame:SetVisible(true)
- frame:SetDraggable(false)
- frame:ShowCloseButton(false)
- frame.Paint = function(self, w, h )
- draw.RoundedBox(20, 0, 0, w, h, Color(61, 45, 39, 120) )
- end
- local button = vgui.Create("DButton", frame)
- button:SetText("Close")
- button:SetPos(100, 100)
- button:SetSize(10, 30)
- button.DoClick = function()
- frame:Close()
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement