MarsP4ste

Redstone--emptySystem

Jun 12th, 2021 (edited)
663
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local com = require("component")
  2. local sides = require("sides")
  3. local list = com.list("redstone")
  4. local rs = nil
  5.  
  6. function getInterface()
  7.   for e in com.list("interface") do
  8.     rs = com.proxy(e)
  9.     break
  10.   end
  11. end
  12.  
  13. function setOutput(state)
  14.   for b in list do
  15.     com.proxy(b).setOutput(sides.down,state)
  16.   end
  17. end
  18.  
  19.  
  20. --program
  21. getInterface()
  22. setOutput(1)
  23. while rs.getItems().n > 0 do
  24.   os.sleep(3)
  25. end
  26. setOutput(0)
RAW Paste Data