Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local inputSide = "back"
- local outputSide = "front"
- local isGetting = false
- while true do
- while true do
- sleep(0)
- local event = os.pullEvent()
- if event == "redstone" then
- print("Redstone action detected.")
- break
- end
- end
- if rs.getInput(inputSide) == true and isGetting == false then
- print("Outputing.")
- isGetting = true
- rs.setOutput(outputSide, true)
- sleep(0.5)
- rs.setOutput(outputSide, false)
- elseif isGetting == true and rs.getInput(inputSide) == false then
- print("Original pulse gone.")
- isGetting = false
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement