itssnowing

Untitled

Jul 22nd, 2021
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. --Setup and variables
  2. owner = "Bipedsnowman"
  3. redProxy = peripheral.find("redstoneIntegrator")
  4. rainside="left"
  5. clearside="right"
  6. thunderside="back"
  7.  
  8.  
  9.  
  10. --Functions
  11. function repeatMe()
  12. while true do
  13. event, username, message = os.pullEvent("chat")
  14. print(username .. " just wrote " .. message)
  15. if username == owner and message == rain then
  16. callRain()
  17. end
  18. end
  19. end
  20.  
  21. function callRain()
  22. redProxy.setOutput(rainside, true)
  23. sleep(0.1)
  24. redProxy.setOutput(rainside, false)
  25. end
  26.  
  27. function callClear()
  28. redProxy.setOutput(clearside, true)
  29. sleep(0.1)
  30. redProxy.setOutput(clearside, false)
  31. end
  32.  
  33. function callThunder()
  34. redProxy.setOutput(thunderside, true)
  35. sleep(0.1)
  36. redProxy.setOutput(thunderside, false)
  37. end
  38.  
  39. --Program body
  40. if redProxy then
  41. print ("redstone proxy conected")
  42. end
  43. repeatMe()
Advertisement
Add Comment
Please, Sign In to add comment