Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Lighting = game:GetService("Lighting")
- local RunService = game:GetService("RunService")
- local Label = script.Parent
- RunService.PostSimulation:Connect(function()
- local RawTime = Lighting.ClockTime
- local Hours = math.floor(RawTime % 12)
- local Minutes = math.floor((RawTime % 1) * 60)
- local AM_PM = (RawTime >= 12 and RawTime < 24) and "PM" or "AM"
- if Hours == 0 then Hours = 12 end
- Label.Text = string.format("Time: %02d:%02d %s", Hours, Minutes, AM_PM)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement