Advertisement
Cardwell

Spawner

Apr 3rd, 2021 (edited)
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. --Spawner
  2. rednet.open("left")
  3. local mottafra = 8
  4. local output = "right"
  5. while true do
  6. id, msg = rednet.receive()
  7. print("")
  8. print("Fra "..id)
  9. print(msg)
  10.  
  11. if id == mottafra and msg == "spawneron" then
  12. print("Spawner er på!")
  13. rs.setOutput(output, true)
  14. end
  15.  
  16. if id == mottafra and msg == "spawneroff" then
  17. print("Spawner er av!")
  18. rs.setOutput(output, false)
  19. end
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement