Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Contatore Liquidi by CFG
- -- Prodcut Key: 111020DICAS
- lato = "back"
- valore = 8
- timer = 1
- function read()
- local handle = fs.open("log", "r")
- if handle then
- text = handle.readLine()
- handle.close()
- end
- return tonumber(text)
- end
- function write(numero)
- local handler = fs.open("log", "w")
- handler.write(numero)
- handler.close()
- end
- numero = read()
- while true do
- if redstone.getInput(lato) then
- term.clear()
- numero = numero + valore
- write(numero)
- print(numero)
- end
- os.sleep(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement