Advertisement
Guest User

startup

a guest
Feb 17th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.95 KB | None | 0 0
  1. term.setCursorPos(14,4)
  2. term.setBackgroundColor(colors.white)
  3. term.setTextColor(colors.blue)
  4. term.clear()
  5.  
  6. print("Welcome to MineTek OS 2.0")
  7. print("")
  8. print("            Loading operating system...")
  9. print("")
  10. print("")
  11. textutils.slowPrint("   ---------------------------------------------")
  12. sleep(1)
  13.  
  14. term.clear()
  15. term.setCursorPos(18,4)
  16.  
  17. config = fs.open("minetek_os/config", "r")
  18. username = config.readLine()
  19. password = config.readLine()
  20. config.close()
  21.  
  22. print("MineTek OS 2.0")
  23. print("")
  24. print("   Username :")
  25. print("   Password :")
  26. term.setCursorPos(15,6)
  27. username_try = read()
  28. term.setCursorPos(15,7)
  29. password_try = read("*")
  30.  
  31. if username_try == username and password_try == password then
  32.   term.clear()
  33.   term.setCursorPos(1,1)
  34.   shell.run("minetek_os/main")
  35. else
  36.   term.clear()
  37.   term.setCursorPos(18,4)
  38.   print("MineTek OS 2.0")
  39.   print("")
  40.   print("           Bad username or password !")
  41.   sleep(2)
  42.   os.shutdown()
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement