Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Shave()
- while true do
- rednet.broadcast("Shave")
- os.sleep(5)
- end
- end
- function Interrupt()
- while true do
- event, param = os.pullEvent("key")
- if param == 16 then
- rednet.broadcast("Quit")
- print("Aborted")
- break
- end
- end
- end
- term.clear()
- term.setCursorPos(1,1)
- print("What side is your modem on?")
- local modem = read()
- rednet.open(modem)
- term.clear()
- term.setCursorPos(1,1)
- textutils.slowPrint("Turtle Control Initiated.")
- print ("Press 'Q' to stop program.")
- parallel.waitForAny(Shave, Interrupt)
- rednet.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement