Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local controller = peripheral.find('arController')
- while true do
- controller.clear()
- local time = math.floor(os.time())
- local timeSuffix
- if os.time() < 12 then
- timeSuffix = "am"
- else
- timeSuffix = "pm"
- end
- local endTime
- local endTimeNum = math.floor(60*(os.time() % 1))
- if endTimeNum < 10 then
- endTime = "0" .. tostring(endTimeNum)
- else
- endTime = tostring(endTimeNum)
- end
- controller.drawItemIcon("minecraft:clock", 4, 4)
- controller.drawString(tostring(time % 12) .. ":" .. endTime .. timeSuffix, 20, 8, 16777215)
- os.sleep(0.25)
- end
Advertisement
Add Comment
Please, Sign In to add comment