Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- waitStart = true
- start =false
- stop = false
- local modem = peripheral.wrap("tile_blockcapacitorbank_name_10")
- function Stop()
- while stop do
- redstone.setOutput("left", false)
- if modem.getEnergyStored() == modem.getMaxEnergyStored() then
- print("WaitStart")
- stop = false
- waitStart = true
- commands.exec("setblock 1602 11 -954 air")
- sleep(10)
- WaitStart()
- end
- sleep(5)
- end
- end
- function Start()
- while start do
- redstone.setOutput("left", true)
- if modem.getEnergyStored() == 0 then
- print("stop")
- start = false
- stop = true
- Stop()
- end
- sleep(5)
- end
- end
- function WaitStart()
- while waitStart do
- if redstone.getInput("top") then
- print("start")
- waitStart = false
- start = true
- Start()
- else
- redstone.setOutput("left", false)
- end
- sleep(5)
- end
- end
- redstone.setOutput("bottom", false)
- WaitStart()
Advertisement
Add Comment
Please, Sign In to add comment