Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bullets = {}
- if fs.exists("signs") then
- file = fs.open("signs", "r")
- bullets = textutils.unserialize(file.readAll())
- file.close()
- else
- print("There are no bulletins to display!")
- shell.run("hub")
- end
- function display()
- mon = peripheral.wrap("right")
- while true do
- i = 1
- for name, data in pairs(bullets) do
- mon.setCursorPos(1,i)
- i = i+1
- mon.setTextScale(tonumber(data["fontsize"]))
- for i, v in ipairs(data["message"]) do
- print(i, v)
- mon.write(v)
- mon.setCursorPos(1, i+1)
- sleep(1)
- end
- end
- end
- end
- function checkfortouch()
- e = os.pullEvent("monitor_touch")
- return e
- end
- parallel.waitForAny(display, checkfortouch)
- shell.run("hub")
Advertisement
Add Comment
Please, Sign In to add comment