Advertisement
Guest User

Untitled

a guest
Nov 21st, 2014
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.10 KB | None | 0 0
  1. local ply = LocalPlayer()
  2. function CrateSystem()
  3.     local Form = vgui.Create( "DFrame" )
  4.     local Butt = vgui.Create("DButton")
  5.         Form:SetPos( ScrW()/2 - 400, ScrH()/2 - 200)
  6.         Form:SetSize( 800, 400 )
  7.         Form:SetTitle("")
  8.         Form:SetVisible( true )
  9.         Form:SetDraggable( true )
  10.         Form:ShowCloseButton( false )
  11.         Form:MakePopup()
  12.         function Form:Paint( w, h )
  13.             draw.RoundedBox( 0, 0, 0, w, h, Color(127, 140, 141))
  14.             draw.RoundedBox( 0, 0, 0, w, h-360, Color(41, 128, 185))
  15.             draw.RoundedBox( 0, 35, 70, w-70, h-100, Color(41, 128, 185))
  16.             draw.SimpleText( "Crate System", "CloseCaption_Bold", 325, 5, Color( 255, 255, 255), 0, 0)
  17.         end
  18.        
  19.         Butt:SetParent ( Form )
  20.         Butt:SetPos( 775,5)
  21.         Butt:SetText("")
  22.         Butt:SetSize( 20, 30)
  23.         Butt.DoClick = function()
  24.             if Form:IsVisible() == true then
  25.             Form:SetVisible(false)
  26.             end
  27.         end
  28.         function Butt:Paint( w, h )
  29.             draw.SimpleText( "X", "DermaLarge", 0, 0, Color( 255, 255, 255), 0, 0)
  30.         end
  31. end
  32. concommand.Add ( "open_cratesystem", CrateSystem)
  33.  
  34. hook.Add("ShowSpare2", "f4shit", function( ply )
  35. ply:ConCommand("open_cratesystem")
  36. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement