Advertisement
colhaydutu

atm9 rocket gate receiver

Jan 26th, 2024 (edited)
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. local modemSide = "back"
  2.  
  3.  
  4. local redstoneOutput1 = "right"
  5. local redstoneOutput2 = "left"
  6.  
  7.  
  8.  
  9. rednet.open(modemSide)
  10.  
  11.  
  12. while true do
  13. redstone.setOutput(redstoneOutput2, true)
  14.  
  15. local senderID, message = rednet.receive()
  16.  
  17. if message == "close" then
  18.  
  19. redstone.setOutput(redstoneOutput1, false)
  20. sleep(1)
  21.  
  22.  
  23. elseif message == "open" then
  24.  
  25. redstone.setOutput(redstoneOutput1, true)
  26. sleep(1)
  27.  
  28. end
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement