Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Lighting = game:GetService("Lighting")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local Event = ReplicatedStorage.TimeChanged
- while wait(1) do
- local Hours = math.floor(Lighting:GetMinutesAfterMidnight() / 60)
- local AM = " AM"
- local Minutes = Lighting:GetMinutesAfterMidnight() - Hours * 60
- if Hours > 12 then
- Hours = Hours - 12
- AM = " PM"
- end
- if Hours == 0 then
- Hours = 12
- end
- if Minutes < 10 then
- Minutes = "0".. Minutes
- end
- local text = Hours..":"..Minutes.. AM
- Event:FireAllClients(text)
- Lighting:SetMinutesAfterMidnight(Lighting:GetMinutesAfterMidnight() + 1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement