Advertisement
Xonoa

rsExtend

Jun 29th, 2021
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. local observer = "left"
  2. local rsSwitch = "right"
  3. local xEndstop = "back"
  4. local yEndstop = "bottom"
  5. local rsOut = "top"
  6.  
  7. local out = 0
  8.  
  9.  
  10. while true do
  11. os.pullEvent("redstone")
  12.  
  13. if rs.getInput(xEndstop) then out=3
  14. elseif rs.getInput(yEndstop) then out=4
  15. elseif rs.getInput(observer) then out=1
  16. elseif rs.getInput(rsSwitch) then out=2
  17. else out=0
  18. end
  19.  
  20. rs.setAnalogOutput(rsOut, out)
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement