Advertisement
Guest User

startup

a guest
Sep 21st, 2016
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.84 KB | None | 0 0
  1. Username = "geiker"
  2. Password = "Prova"
  3. Debug = "Debug"
  4.  
  5. term.setCursorPos(1,1)
  6. write("AREA AD ACCESSO LIMITATO")
  7. term.setCursorPos(1,2)
  8. write("Autenticarsi per proseguire")
  9. term.setCursorPos(1,4)
  10. write("Username: ")
  11. user = read()
  12. term.setCursorPos(1,5)
  13. write("Password: ")
  14. pass = read("*")
  15.  
  16. lol = true
  17.  
  18. while lol do
  19.  
  20.   if Username == user and Password == pass then
  21.     term.clear()
  22.     term.setCursorPos(1,1)
  23.     write("Bentornato")
  24.     rs.setOutput("left", true)
  25.     os.sleep(4)
  26.     rs.setOutput("left", false)
  27.     os.reboot()
  28.   elseif Username == user and Debug == pass then
  29.     term.clear()
  30.     term.setCursorPos(1,1)
  31.     write("Modalita Debug attivata")
  32.     lol = false
  33.   else
  34.     term.clear()
  35.     term.setCursorPos(1,1)
  36.     write("Username o Password errati, riprovare")
  37.     os.sleep(2)
  38.     os.reboot()
  39.    end
  40.  
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement