Guest User

Untitled

a guest
May 24th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.57 KB | None | 0 0
  1. include( 'shared.lua' )
  2. include("cl_hud.lua")
  3.  
  4. local function Initialize()
  5.  
  6. local Ready = vgui.Create( "DFrame" )
  7. Ready:SetPos( 625, 450 )
  8. Ready:SetSize( 175, 250 )
  9. Ready:SetTitle( "Are you ready to build?" )
  10. Ready:SetVisible( true )
  11. Ready:SetDraggable( true )
  12. Ready:ShowCloseButton( false )
  13. Ready:SetMouseInputEnabled(true)
  14. Ready:MakePopup()
  15.  
  16.  
  17. local HellYeah = vgui.Create( "DButton", Ready )
  18. HellYeah:SetPos( 20, 25 )
  19. HellYeah:SetSize( 140, 40 )
  20. HellYeah:SetText( "Hell Yeah!" )
  21. HellYeah.DoClick = function() Ready:Close()
  22. RunConsoleCommand( "sb_agree" )
  23.  
  24. end
  25.     end
  26.  
  27.    
  28. local function Agreement()
  29.  
  30. local Rules = vgui.Create( "DFrame" )
  31. Rules:SetSize(850,800)
  32. Rules:SetPos( 300,50)
  33. Rules:SetTitle( "Rules Confimation" )
  34. Rules:SetVisible( true )
  35. Rules:SetDraggable( true )
  36. Rules:ShowCloseButton( false )
  37. Rules:SetMouseInputEnabled(true)
  38. Rules:MakePopup()
  39.  
  40. local RulesIMG = vgui.Create( "DImageButton", Rules )
  41. RulesIMG:SetPos( 400, 500 )
  42. RulesIMG:SetImage( "Rules/HSH.vtf" )
  43. RulesIMG:SizeToContents()
  44.  
  45. local SubmitButton = vgui.Create( "DButton", Rules )
  46. SubmitButton:SetPos( 450, 700 )
  47. SubmitButton:SetSize( 140, 40 )
  48. SubmitButton:SetText( "I Agree ( 10 Seconds )" )
  49. SubmitButton:SetDisabled(true);
  50.  
  51.  
  52.  
  53.   timer.Simple(1, function ( ) SubmitButton:SetText("I Agree ( 9 Seconds )"); end);
  54.      timer.Simple(2, function ( ) SubmitButton:SetText("I Agree ( 8 Seconds )"); end);
  55.      timer.Simple(3, function ( ) SubmitButton:SetText("I Agree ( 7 Seconds )"); end);
  56.      timer.Simple(4, function ( ) SubmitButton:SetText("I Agree ( 6 Seconds )"); end);
  57.      timer.Simple(5, function ( ) SubmitButton:SetText("I Agree ( 5 Seconds )"); end);
  58.      timer.Simple(6, function ( ) SubmitButton:SetText("I Agree ( 4 Seconds )"); end);
  59.      timer.Simple(7, function ( ) SubmitButton:SetText("I Agree ( 3 Seconds )"); end);
  60.      timer.Simple(8, function ( ) SubmitButton:SetText("I Agree ( 2 Seconds )"); end);
  61.      timer.Simple(9, function ( ) SubmitButton:SetText("I Agree ( 1 Seconds )"); end);
  62.      timer.Simple(10, function ( ) SubmitButton:SetText("I Agree"); SubmitButton:SetDisabled(false); LOADED_RULES = true; end);
  63.    
  64.     function SubmitButton:DoClick ( )
  65.         if (LOADED_RULES) then
  66.             Rules:Remove();
  67.        
  68.        
  69.        
  70.         end
  71.     end
  72.  
  73. local Disagree = vgui.Create( "DButton", Rules )
  74. Disagree:SetPos( 250, 700 )
  75. Disagree:SetSize( 140, 40 )
  76. Disagree:SetText( "I Disagree" )
  77. Disagree:SetDisabled(false);
  78. Disagree.DoClick = function( ) Rules:Close()
  79. RunConsoleCommand( "disconnect" )
  80.  
  81. end
  82.  
  83.  
  84.  
  85. end
  86.    
  87.        
  88.    
  89.        
  90.    
  91.        
  92.    
  93. concommand.Add( "sb_agree", Agreement )
  94. concommand.Add( "sb_start", Initialize )
Add Comment
Please, Sign In to add comment