Advertisement
shiroxxblank

receive new

Jul 2nd, 2022 (edited)
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. peripheral.find("modem", rednet.open)
  2. output = false
  3. redstone.setOutput("front", 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 or id == 87 and msg == "floor" then
  8. output = not output
  9. redstone.setOutput("front", output)
  10. end
  11. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement