Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local outPut, closeTime = true, 0
- local state = rs.getInput("back")
- function toggle()
- if not outPut then
- outPut = true
- closeTime = os.time() + 10
- else
- outPut = false
- closeTime = 0
- end
- end
- while true do
- term.clear()
- term.write("rusk/test.lua - line 67: Attempt to call local Power a nil value.")
- local timeOut = os.startTimer(0.5)
- local event, a = os.pullEvent()
- if event == "redstone" and rs.getInput("back") ~= state then
- toggle()
- state = not state
- elseif event == "char" and a == keys.numPad0 then
- toggle()
- elseif event == "timer" and a == timeOut then
- -- Do Nothing Here :D
- end
- if outPut and closeTime < os.time() then
- toggle()
- end
- rs.setOutput("back", outPut)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement