Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- monitor = peripheral.wrap("top")
- modem = peripheral.wrap("back")
- modem.open(697)
- function Launch()
- print("Which silo would you like to launch? 1-5 or all")
- local input = io.read()
- if 5 >= tonumber(input) >= 1 then
- input = input + 6
- modem.transmit(697,697,input)
- print("Launching missile ", input)
- elseif tostring(input) == "all" then
- modem.transmit(697,697,12)
- print("Launching All Missiles")
- else
- print("Incorrect Input. Rebooting.")
- end
- end
- function Open()
- print("Which door would you like to open? 1-5 or all")
- local input = io.read()
- if 5 >= tonumber(input) >= 1 then
- modem.transmit(697,697,input)
- print("Opening Silo ", input)
- elseif tostring(input) == "all" then
- modem.transmit(697,697,6)
- print("Opening All Silos")
- else
- print("Incorrect Input. Rebooting.")
- end
- end
- Launch()
- Open()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement