Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.wrap("top")
- while (true) do
- text = textutils.formatTime(os.time(), true)
- w, h = mon.getSize()
- x = math.max(math.floor((w / 2) - (#text / 2)), 0)
- x = x + 2
- mon.clear()
- mon.setTextScale(1.5)
- mon.setCursorPos(x,2)
- mon.write(text)
- sleep(2)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement