Advertisement
RedoverPlayer

Tardis Lights

Apr 1st, 2020
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. p = peripheral.wrap("left")
  2. modem = peripheral.wrap("top")
  3.  
  4. function tardis()
  5. if p.isInFlight() == true then
  6. redstone.setOutput("back",false)
  7. redstone.setOutput("right",true)
  8. sleep(0.4)
  9. redstone.setOutput("right",false)
  10. sleep(0.8)
  11. else
  12. redstone.setOutput("back",true)
  13. redstone.setOutput("right",false)
  14. end
  15.  
  16. modem.open(2)
  17. local event, modemSide, senderChannel, replyChannel, message, senderDistance = os.pullEvent("modem_message")
  18. if message == "door" then
  19. redstone.setOutput("bottom",true)
  20. sleep(0.1)
  21. redstone.setOutput("bottom",false)
  22. modem.transmit(3, 2, "Technical room opened/closed")
  23. end
  24. end
  25. while true do
  26. tardis()
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement