Maengorn

Shield Controller

Nov 30th, 2020 (edited)
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. SERVER_PORT = 20
  2.  
  3. local modem = peripheral.wrap("top")
  4. modem.open(SERVER_PORT)
  5.  
  6. local id, message = rednet.receive()
  7.  
  8. if message == "on" then
  9. redstone.setAnalogOutput("back",15)
  10. print("Shield is active!")
  11. end
  12.  
  13. if message == "off" then
  14. redstone.setAnalogOutput("back",0)
  15. print("Shield has been deactivated!")
  16. end
Advertisement
Add Comment
Please, Sign In to add comment