Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- inputSide = 'bottom'
- outputSide = 'top'
- state = false
- print("Starting t-flip-flop")
- while true do
- os.pullEvent("redstone")
- if redstone.getInput(inputSide) == false then
- os.sleep(1)
- if redstone.getOutput(outputSide) then redstone.setOutput(outputSide, false)
- elseif not redstone.getOutput(outputSide) then redstone.setOutput(outputSide,true) end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement