Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p = peripheral.wrap("left")
- modem = peripheral.wrap("top")
- function tardis()
- if p.isInFlight() == true then
- redstone.setOutput("back",false)
- redstone.setOutput("right",true)
- sleep(0.4)
- redstone.setOutput("right",false)
- sleep(0.8)
- else
- redstone.setOutput("back",true)
- redstone.setOutput("right",false)
- end
- modem.open(2)
- local event, modemSide, senderChannel, replyChannel, message, senderDistance = os.pullEvent("modem_message")
- if message == "door" then
- redstone.setOutput("bottom",true)
- sleep(0.1)
- redstone.setOutput("bottom",false)
- modem.transmit(3, 2, "Technical room opened/closed")
- end
- end
- while true do
- tardis()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement