Guest User

versamenti

a guest
May 14th, 2018
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.48 KB | None | 0 0
  1. local valore = 0
  2. print("Inserire oggetti")
  3. print("")
  4. redstone.setOutput("top", true)
  5. print("Premere un tasto quando gli oggetti sono stati inseriti")
  6. os.pullEvent("key")
  7. redstone.setOutput("top", false)
  8. if redstone.getInput("left") == false then
  9. print("Nessun oggetto inserito")
  10. exit()
  11. end
  12. while redstone.getInput("left") == true do
  13. redstone.setOutput("back", true)
  14. sleep(0.25)
  15. redstone.setOutput("back", false)
  16. valore = valore+16
  17. sleep(0.25)
  18. print(valore)
  19. end
  20. print(valore)
Advertisement
Add Comment
Please, Sign In to add comment