Advertisement
Cardwell

Vifte

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