Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- doorOpen = false
- while true do
- term.clear()
- term.setCursorPos(1,1)
- print("1) toggle hanger door")
- -- print("2) close hanger door")
- print("2) launch rocket")
- command = read()
- if command == "1" then
- if doorOpen then
- print("closing hanger door..")
- rs.set
- print("opening hanger door...")
- sleep(2)
- i = 0
- while i < 5 do
- rs.setOutput("left", true)
- sleep(0.5)
- rs.setOutput("left", false)
- sleep(1.5)
- i = i + 1
- end
- -- elseif command == "2" then
- -- print("closing hanger door...")
- -- sleep(2)
- -- i = 0
- -- while i < 5 do
- -- rs.setOutput("right", true)
- -- sleep(0.5)
- -- rs.setOutput("right", false)
- -- sleep(1.5)
- -- i = i + 1
- -- end
- elseif command == "3" then
- print("launching rocket...")
- sleep(2)
- rs.setOutput("bottom", true)
- sleep(30)
- rs.setOutput("bottom", false)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement