Advertisement
Darvom

Darvom's Software (Lua) - Porta con Password (ComputerCraft)

Jan 12th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. print("Software Porta con Password - Realizzato da Darvom\n\nScegli un'Opzione!\n\n1 - Apri la Porta\n2 - Chiudi la Porta\n")
  2. case=read()
  3. if case == "1" then
  4.   print("Inserisci la Password\n")
  5.   password = read('*')
  6.   if password == "UnPollo" then
  7.      print("\nPassword Corretta, Accesso Accordato\n")
  8.      redstone.setOutput("bottom", true)
  9.      sleep(1)
  10.      redstone.setOutput("bottom", false)
  11.      sleep(1)
  12.   else
  13.     print("\nPassword Errata, Accesso Negato\n")
  14.     sleep(2)
  15.   end
  16. elseif case == "2" then
  17.   print("\nChiusura Porta in Corso...\n")
  18.   redstone.setOutput("back", true)
  19.   sleep(1)
  20.   redstone.setOutput("back", false)
  21.   sleep(1)
  22. else
  23.   print("\nInserisci Numero Valido\nInserisci un valore valido: 0 o 1\n")
  24.   sleep(2)
  25. end
  26. os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement