Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local gate = peripheral.wrap("back")
- local gateData = gate.get()
- local state = 0
- while true do
- if gateData["Inventory Empty"] then
- redstone.setOutput("top", true)
- if state ~= 1 then print("deactivating Bio-Reactor") end
- state = 1
- elseif gateData["Inventory Full"] then
- redstone.setOutput("top", false)
- if state ~= 2 then print("activating Bio-Reactor") end
- state = 2
- end
- sleep(5)
- end
Advertisement
Add Comment
Please, Sign In to add comment