Advertisement
yamanohera155233

Untitled

Jun 22nd, 2016
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. game.Players.PlayerAdded:connect(function(nP) -- connect event to anonymous function
  2. nP.CharacterAdded:connect(function(nC) -- connect event to anonymous function
  3. sg = Instance.new("ScreenGui", nP.PlayerGui) -- create the screengui
  4. sg.Name = "Welcome" -- set its name
  5. fr = Instance.new("Frame", sg) -- create the frame inside the ScreenGui
  6. fr.Size = UDim2.new(0, 150, 0, 30) -- set its size
  7. fr.Position = UDim2.new(0, 0, 0.5, -15) -- center the frame
  8. fr.Style = "RobloxRound"
  9. tb = Instance.new("TextButton", fr) -- create a textbutton, put it in frame
  10. tb.Size = UDim2.new(1, 0, 1, 0)
  11. tb.Style = "RobloxButtonDefault"
  12. tb.TextColor3 = Color3.new(1, 1, 1)
  13. nv = Instance.new("NumberValue", tb)
  14. nv.Value = 100
  15.  
  16. while true do
  17. nv.Value = nv.Value - 1
  18. wait(1)
  19. tb.Text = "Number: " .. nv.Value
  20. end
  21. end)
  22. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement