Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- local monitor = peripheral.wrap("right")
- monitor.clear()
- monitor.setCursorPos(1, 2)
- monitor.setTextScale(3)
- local currentTime = os.time()
- local timeZones = {"Night", "Morning", "Afternoon", "Evening"}
- -- night
- if currentTime >= 22 or currentTime < 6 then
- monitor.write(timeZones[1])
- elseif currentTime >= 6 and currentTime < 12 then
- monitor.write(timeZones[2])
- elseif currentTime >= 12 and currentTime < 18 then
- monitor.write(timeZones[3])
- elseif currentTime >= 18 and currentTime < 22 then
- monitor.write(timeZones[5])
- else
- monitor.write(currentTime)
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement