SHARE
TWEET

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

Darvom Jan 12th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top