Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local count
- if fs.exists("count") == true then
- local a = fs.open("count", "r")
- count = a.readLine()
- a.close()
- mon(count)
- else
- count = 0
- end
- while true do
- if redstone.getInput("back") == true then
- count = count + 1
- local b = fs.open("count", "w")
- b.write(count)
- b.close()
- if count % 6 == 0 then
- redstone.setOutput("left", true)
- sleep(1)
- rs.setOutput("left", false)
- end
- end
- sleep(0)
- end
Advertisement
Add Comment
Please, Sign In to add comment