Advertisement
Guest User

startup

a guest
Mar 26th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.18 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2. term.clear()
  3. os.sleep(0.5)
  4. term.setCursorPos(1,1)
  5. term.setTextColor(colors.red)
  6. print("COMPUTER PRIVATO")
  7. os.sleep(0.5)
  8. term.setTextColor(colors.green)
  9. textutils.slowPrint("Autentificarsi per accedervi:")
  10. usernameFra = " "
  11. passwordFra = " "
  12. usernameTom = " "
  13. passwordTom = " "
  14. term.setCursorPos(1,4)
  15. term.setTextColor(colors.white)
  16. write("Username: ")
  17. user = read()
  18. term.setCursorPos(1,5)
  19. write("Password: ")
  20. pass = read("*")
  21. term.setCursorPos(1,8)
  22. textutils.slowPrint("Sto Verificando i tuoi dati...")
  23. os.sleep(2)
  24. gatto = true
  25.  
  26. while gatto do
  27.  
  28.  if (user == usernameFra and pass == passwordFra) or
  29.     (user == usernameTom and pass == passwordTom) then
  30.     term.setCursorPos(1,9)
  31.     term.setTextColor(colors.green)
  32.     textutils.slowPrint("Login effettuato con successo!")
  33.     sleep(3)
  34.     term.clear()
  35.     term.setCursorPos(1,1)
  36.     term.setTextColor(colors.yellow)
  37.     textutils.slowPrint("CraftOS 1.7")
  38.     gatto = false
  39.    else
  40.     term.setCursorPos(1,9)
  41.     term.setTextColor(colors.red)
  42.     textutils.slowPrint("Username o Password errati. Riprovare.")
  43.     os.sleep(2)
  44.     os.reboot()  
  45.    end
  46. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement