Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local m = peripheral.wrap("monitor_24")
- local m2 = peripheral.wrap("monitor_25")
- m.clear()
- m.setCursorPos(1,1)
- local function writeCentered( text )
- local x, y = term.getSize()
- local centerYPos = y / 2
- local centerXStartingPos = ( x - string.len(text) ) / 2
- term.setCursorPos( centerXStartingPos, centerYPos )
- m2.setCursorPos( centerXStartingPos, centerYPos )
- write( text )
- m2.write(text)
- end
- term.redirect(m)
- term.setBackgroundColor(colors.cyan)
- term.clear()
- m2.setBackgroundColor(colors.cyan)
- m2.clear()
- while true do
- f = fs.open("show", "r")
- local data = {}
- for line in f.readLine do
- writeCentered(line)
- sleep(8)
- term.clear()
- m2.clear()
- sleep(4)
- end
- f.close()
- end
Advertisement
Add Comment
Please, Sign In to add comment