Advertisement
shiroxxblank

receive

Jun 29th, 2022
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. rednet.open('right')
  2. output = true
  3. redstone.setOutput("left", output)
  4. while true do
  5. local id,msg,dist=rednet.receive()
  6. print('the message ' .. msg .. ' was received from ' .. id)
  7. if id == 6 and msg == "home" then
  8. if output then
  9. output = false
  10. else
  11. output = true
  12. end
  13. redstone.setOutput("left", output)
  14. end
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement