Advertisement
Guest User

Untitled

a guest
Feb 25th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.78 KB | None | 0 0
  1. local frame
  2. hook.Add("KeyPress", "HoboMenuOpen", function(ply, key)
  3.     if ply:KeyDown(IN_SPEED) and key == IN_USE and (not frame or not fram:IsVisible()) then
  4.         frame = vgui.Create("DFrame")
  5.         frame:SetTitle("Hobo Menu")
  6.         frame:SetSize(300, 300)
  7.         frame:Center()
  8.         frame:MakePopup()
  9.         frame:SetVisible(true)
  10.         frame:SetDraggable(false)
  11.         frame:ShowCloseButton(false)
  12.         frame.Paint = function(self, w, h )
  13.         draw.RoundedBox(20, 0, 0, w, h, Color(61, 45, 39, 120) )
  14.         end
  15.         local button = vgui.Create("DButton", frame)
  16.         button:SetText("Close")
  17.         button:SetPos(100, 100)
  18.         button:SetSize(10, 30)
  19.         button.DoClick = function()
  20.             frame:Close()
  21.         end
  22.  
  23.     end
  24. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement