Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game:GetService("Players").LocalPlayer
- local gui = Instance.new("ScreenGui")
- local textLabel = Instance.new("TextLabel")
- local frame = Instance.new("Frame")
- gui.Name = "TimeDisplay"
- frame.Name = "Background"
- frame.Parent = gui
- frame.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- frame.Position = UDim2.new(0.5, 0, 0, 0)
- frame.Size = UDim2.new(0, 150, 0, 30)
- frame.AnchorPoint = Vector2.new(0.5, 0)
- textLabel.Name = "Time"
- textLabel.Parent = frame
- textLabel.Text = tostring(os.date("%X"))
- textLabel.Position = UDim2.new(0.5, 0, 0.5, 0)
- textLabel.Size = UDim2.new(0, 100, 0, 50)
- textLabel.TextScaled = true
- textLabel.TextWrapped = true
- textLabel.TextColor3 = Color3.new(1, 1, 1)
- textLabel.BackgroundTransparency = 1
- textLabel.AnchorPoint = Vector2.new(0.5, 0.5)
- gui.Parent = player:WaitForChild("PlayerGui")
- while true do
- wait(1)
- textLabel.Text = tostring(os.date("%X"))
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement