Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sg = peripheral.find("stargate")
- while true do
- term.clear()
- term.setCursorPos(1,1)
- iris = sg.irisState()
- print("Iris is currently " ..iris)
- if iris == "Offline" then
- print("Connect Iris.")
- else
- print("Press enter to change")
- event, key = os.pullEvent("key")
- if key == keys.enter then
- if iris == "Closed" then
- sg.openIris()
- elseif iris == "Open" then
- sg.closeIris()
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment