Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- game.Players.PlayerAdded:connect(function(nP) -- connect event to anonymous function
- nP.CharacterAdded:connect(function(nC) -- connect event to anonymous function
- sg = Instance.new("ScreenGui", nP.PlayerGui) -- create the screengui
- sg.Name = "Welcome" -- set its name
- fr = Instance.new("Frame", sg) -- create the frame inside the ScreenGui
- fr.Size = UDim2.new(0, 150, 0, 30) -- set its size
- fr.Position = UDim2.new(0, 0, 0.5, -15) -- center the frame
- fr.Style = "RobloxRound"
- tb = Instance.new("TextButton", fr) -- create a textbutton, put it in frame
- tb.Size = UDim2.new(1, 0, 1, 0)
- tb.Style = "RobloxButtonDefault"
- tb.TextColor3 = Color3.new(1, 1, 1)
- nv = Instance.new("NumberValue", tb)
- nv.Value = 100
- while true do
- nv.Value = nv.Value - 1
- wait(1)
- tb.Text = "Number: " .. nv.Value
- end
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement