Advertisement
Chaos_Cash

Pixelart Builder Sub

Jul 19th, 2024 (edited)
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. function startup()
  2.  
  3. rednet.open("back")
  4.  
  5.  
  6. rs.setOutput("top",false)
  7. rs.setOutput("right",false)
  8. rs.setOutput("bottom",false)
  9. rs.setOutput("left",false)
  10. end
  11.  
  12.  
  13.  
  14. function main()
  15.  
  16. while true do
  17.  
  18. info1,info2,info3,info4 = os.pullEvent()
  19.  
  20.  
  21. if info1 == "rednet_message" and type(info3) == "table" then
  22.  
  23.  
  24. if info3["action"] == "changeRedstone" then
  25.  
  26. if type(info3["top"]) == "number" then
  27. rs.setAnalogOutput("top",info3["top"])
  28. end
  29.  
  30. if type(info3["right"]) == "number" then
  31. rs.setAnalogOutput("right",info3["right"])
  32. end
  33.  
  34. if type(info3["bottom"]) == "number" then
  35. rs.setAnalogOutput("bottom",info3["bottom"])
  36. end
  37.  
  38. if type(info3["left"]) == "number" then
  39. rs.setAnalogOutput("left",info3["left"])
  40. end
  41.  
  42. end
  43.  
  44.  
  45. end
  46.  
  47. end
  48.  
  49. end
  50.  
  51.  
  52.  
  53.  
  54.  
  55. startup()
  56. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement