Cardwell

Laser

Apr 3rd, 2021 (edited)
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. --Laser
  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 == "redlaseron" then
  12. print("Laser er på!")
  13. rs.setOutput(output, true)
  14. end
  15.  
  16. if id == mottafra and msg == "redlaseroff" then
  17. print("Laser er av!")
  18. rs.setOutput(output, false)
  19. end
  20. end
Add Comment
Please, Sign In to add comment