Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- modem = peripheral.wrap("bottom")
- while 1 do
- term.clear()
- term.setCursorPos(1,1)
- print("Welcome to VirtualDXS's Mars Base!")
- print("This is a door terminal. Would you like to:")
- print(" O)pen the main door")
- print(" C)lose the main door")
- print(" ")
- while 1 do
- local event, keystroke = os.pullEvent("char")
- if keystroke == "o" then
- modem.transmit(1337,1337,"open")
- print("Opened main door!")
- sleep(3)
- break
- elseif keystroke == "c" then
- modem.transmit("Closed main door!")
- sleep(3)
- break
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement