Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Realtime clock that will appear at the top of your screen in 12 hour format, with a rainbow colour border
- local player = game:GetService("Players").LocalPlayer
- local function makeGui()
- 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, 50)
- frame.AnchorPoint = Vector2.new(0.5, 0)
- textLabel.Name = "Time"
- textLabel.Parent = frame
- textLabel.Text = tostring(os.date("%I:%M:%S %p"))
- 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")
- local hue = 0
- while true do
- wait(0.01)
- hue = hue + 0.01
- if hue >= 1 then
- hue = 0
- end
- frame.BorderColor3 = Color3.fromHSV(hue, 1, 1)
- textLabel.Text = tostring(os.date("%I:%M:%S %p"))
- end
- end
- while true do
- if not player:FindFirstChild("PlayerGui"):FindFirstChild("TimeDisplay") then
- makeGui()
- end
- wait(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement