Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- redOn = false
- while true do
- local ev,p1 = os.pullEvent("redstone")
- if ev == "redstone" then
- if rs.testBundledInput("back",colors.red) then
- if not redOn then
- redOn = true
- redStart = os.clock()
- end
- else
- if redOn then
- redOn = false
- timePassed = os.clock() - redStart
- print("Seconds passed: " .. timePassed)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment