Advertisement
Guest User

menu thing ok hi facepunch

a guest
Nov 24th, 2014
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.27 KB | None | 0 0
  1. local function menu()
  2.  
  3.     local base = vgui.Create( "DFrame" )
  4.     base:SetSize( 360, 355 )
  5.     base:SetTitle( "Super cool derma" )
  6.     base:SetVisible( true )
  7.     base:SetDraggable( true )
  8.     base:ShowCloseButton( true )
  9.     base:MakePopup()
  10.     base:Center()
  11.  
  12.     function base:Paint( w, h )
  13.         draw.RoundedBox( 0, 1, 1, w-2, h-2, Color( 65, 65, 65, 200 ) )
  14.         surface.SetDrawColor( 6, 150, 150, 255 )
  15.         surface.DrawOutlinedRect( 1, 1, w-2, h-2 )
  16.  
  17.         surface.SetDrawColor( 255, 255, 255, 255 )
  18.         surface.DrawOutlinedRect( 100, 35, w-108, h-43 )
  19.     end
  20.  
  21.     local GodCheck
  22.     local GodCheck2
  23.  
  24.     local Button1 = vgui.Create( "DColorButton", base )
  25.     Button1:SetPos( 8, 35 )
  26.     Button1:SetSize( 85, 24 )
  27.     Button1:Paint( 20, 30 )
  28.     Button1:SetText( "         Button1" )
  29.     Button1:SetColor( Color( 6, 110, 160 ) )
  30.         function Button1:DoClick()
  31.             local GodCheck = vgui.Create( "DCheckBoxLabel", base )
  32.             GodCheck:SetPos( 110, 43 ) -- +20 each checkbox for good spacing
  33.             GodCheck:SetText( "God Mode" )
  34.             GodCheck:SetConVar( "sbox_godmode" )
  35.             GodCheck:SizeToContents()
  36.             GodCheck2:Remove()
  37.         end
  38.  
  39.     local Button2 = vgui.Create( "DColorButton", base )
  40.     Button2:SetPos( 8, 75 )
  41.     Button2:SetSize( 85, 24 )
  42.     Button2:Paint( 20, 30 )
  43.     Button2:SetText( "         Button2" )
  44.     Button2:SetColor( Color( 6, 110, 160 ) )
  45.         function Button2:DoClick()
  46.             local GodCheck2 = vgui.Create( "DCheckBoxLabel", base )
  47.             GodCheck2:SetPos( 110, 63 )
  48.             GodCheck2:SetText( "Cow Worship" )
  49.             GodCheck2:SetConVar( "sbox_godmode" )
  50.             GodCheck2:SizeToContents()
  51.             GodCheck:Remove()
  52.         end
  53.  
  54.     local Button3 = vgui.Create( "DColorButton", base )
  55.     Button3:SetPos( 8, 115 )
  56.     Button3:SetSize( 85, 24 )
  57.     Button3:Paint( 20, 30 )
  58.     Button3:SetText( "        Button3" )
  59.     Button3:SetColor( Color( 6, 110, 160 ) )
  60.  
  61.     local Button4 = vgui.Create( "DColorButton", base )
  62.     Button4:SetPos( 8, 155 )
  63.     Button4:SetSize( 85, 24 )
  64.     Button4:Paint( 20, 30 )
  65.     Button4:SetText( "        Button4" )
  66.     Button4:SetColor( Color( 6, 110, 160 ) )
  67.  
  68. end
  69.  
  70. concommand.Add( "openmenu", menu )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement