Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- do
- mon = peripheral.wrap("right")
- mon.setCursorPos(1,0)
- mon.clear()
- print("Welcome to BlackBoard!")
- print("Type in anything and it will display on the monitor.")
- print("Have fun!")
- while true do
- local input = read()
- if input == "(:clearscreen" then
- print("Clearing screen...")
- sleep(1)
- mon.clear()
- mon.setCursorPos(1,0)
- else
- if input == "(:clearline" then
- print("Clearing line...")
- sleep(1)
- mon.clearLine()
- currx, curry = mon.getCursorPos()
- mon.setCursorPos(1, curry - 1)
- else
- currx, curry = mon.getCursorPos()
- mon.setCursorPos(1, curry + 1)
- mon.write(input)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement