Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Back = "back"
- local Right = "right"
- local Time = 0
- local Start = false
- while true do
- local Get = redstone.getAnalogInput(Back)
- term.clear()
- term.setCursorPos(25,10)
- print(Time)
- if Get > 0 and Start == false then
- Time = Get * 20 + 1
- Start = true
- term.clear()
- term.setCursorPos(25,10)
- print(Time)
- elseif Start == true then
- term.clear()
- term.setCursorPos(25,10)
- print(Time)
- if Time > 0 then
- Time = Time - 1
- if Time == 0 then
- term.clear()
- term.setCursorPos(25,10)
- print(Time)
- redstone.setOutput(Right, true)
- sleep(1)
- redstone.setOutput(Right, false)
- Start = false
- end
- end
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment