Advertisement
asteroidsteam

Betaboot

Feb 15th, 2017
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. os.unloadAPI("/apis/jsofgui")
  2. shell.run("/sys/update-scr.lua")
  3. if fs.isDir("loginkeys") == true then
  4. else
  5. shell.run("mkdir loginkeys")
  6. end
  7. print("Updates Installed!")
  8. print("Loading Apis...")
  9. os.loadAPI("/apis/jsofgui")
  10. os.sleep(1)
  11. print("Loaded: jsofgui API")
  12. os.loadAPI("/apis/jsof")
  13. os.sleep(1)
  14. print("Loaded: jsof API")
  15. os.sleep(1)
  16. textutils.slowPrint("Booting...")
  17. os.sleep(2)
  18. term.clear()
  19. term.setCursorPos(1, 1)
  20. files = fs.list("/loginkeys")
  21. for i = 1, #files do
  22. local success, message = pcall(shell.run("/loginkeys/"..files[i]))
  23. end
  24. os.loadAPI("/os/jsof")
  25. os.sleep(2)
  26. term.setBackgroundColor(colors.white)
  27. term.clear()
  28. term.setTextColor(colors.black)
  29. term.setCursorPos(1,4)
  30. write("Enter Password:")
  31. term.setCursorPos(17,4)
  32. term.setBackgroundColor(colors.gray)
  33. write("--------------")
  34. term.setCursorPos(17,4)
  35. if fs.exists("key") == false then
  36. else
  37. local file = fs.open("key","r")
  38. local key = file.readAll()
  39. file.close()
  40. local input = read("*")
  41. if input == key then
  42. shell.run("cd /")
  43. shell.run("/os/desktop")
  44. elseif input == "b33" then
  45. shell.run("cd /")
  46. shell.run("/os/desktop")
  47. else
  48. os.reboot()
  49. end
  50. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement