Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local monitorSide = "right"
- local stationName = "Spawn Station"
- local mon = peripheral.wrap(monitorSide)
- local function centerPrint(msg, y)
- local w, h = mon.getSize()
- mon.setCursorPos(math.floor(((w+3)-#msg)/2) + (#msg % 2 == 0 and 1 or 0), y or h/2)
- mon.write(msg)
- end
- while true do
- local time = os.time()
- local formattedTime = textutils.formatTime(time, false)
- mon.clear()
- mon.setTextScale(1.5)
- term.redirect(mon)
- centerPrint(stationName, 1)
- centerPrint("Danger! High Voltage!", 2)
- centerPrint(formattedTime, 3)
- os.sleep(0.05)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement