Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function startMonitor()
- monitor = peripheral.wrap("top")
- wm, hm = monitor.getSize()
- end
- startMonitor()
- monitor.clear()
- local cWrite = function(text, row)
- local x2, y2 = monitor.getCursorPos()
- local x, y = monitor.getSize()
- monitor.setCursorPos(math.ceil((x/2) - (text:len() / 2)), row)
- monitor.write(text)
- end
- cWrite("Hello World", 1)
- cWrite("You Suck", 2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement