Mralko99

Porta con password e allarme

Feb 2nd, 2013
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.42 KB | None | 0 0
  1. while true do
  2.  term.clear()
  3.  term.setCursorPos(1, 1)
  4.  print("Immetti la password:")
  5.  input = read("*")
  6.  if input == "password" then
  7.  print ("Accesso garantito. Hai 6 secondi corri.")
  8. redstone.setOutput ("back", true )
  9. sleep(6)
  10. redstone.setOutput ("back", false )
  11.  os.shutdown()
  12. else
  13. print ("Accesso Negato.")
  14. redstone.setOutput ("right", true )
  15. sleep(12)
  16. redstone.setOutput ("right", false )
  17.  os.shutdown()
  18.  end
  19. end
Advertisement
Add Comment
Please, Sign In to add comment