MudkipTheEpic

FakeConsole Installer (all versions)

Dec 17th, 2012
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. local oldPull = os.pullEvent
  2. os.pullEvent = os.pullEventRaw
  3.  
  4.  
  5. detect = shell.getRunningProgram()
  6. if detect ~= "disk/startup" then
  7. print("Run this as a startup disk to continue.")
  8. sleep(2)
  9. os.shutdown()
  10. else
  11. end
  12.  
  13. term.clear()
  14. term.setCursorPos(1,1)
  15.  
  16. print("Hi! Would you like to continue your installation of FakeConsole? Y or N.")
  17.  
  18.  
  19. input = read()
  20. if input == "Y" then
  21. textutils.slowPrint("Updating.....")
  22.  
  23. if fs.exists("fakeconsole") == true then
  24. fs.delete("fakeconsole")
  25. else
  26. end
  27. shell.run("pastebin get rhDb53sD fakeconsole")
  28. elseif input ~= "N" then
  29. print("Invalid answer.")
  30. sleep(2)
  31. os.pullEvent = oldPull
  32. os.reboot()
  33. else
  34. print("Exiting installation... Please remove install disk.")
  35. sleep(2)
  36. os.pullEvent = oldPull
  37. os.shutdown()
  38. end
  39.  
  40. term.clear()
  41. term.setCursorPos(1,1)
  42. print("Would you like to make FakeConsole your startup? Y or N.")
  43. input = read()
  44. if input == "Y" then
  45. if fs.exists("startup") == true then
  46. if fs.exists("oldstartup") ~= true then
  47. shell.run("mkdir oldstartup")
  48. else
  49. end
  50. if fs.exists("oldstartup/startup") == true then
  51. fs.delete("oldstartup/startup")
  52. else
  53. end
  54. shell.run("move startup oldstartup/startup")
  55. else
  56. end
  57. h = fs.open("startup", "w")
  58. h.writeLine("shell.run('fakeconsole')")
  59. h.close()
  60. print("Finished installation. Please remove installation disk.")
  61. sleep(2)
  62. os.shutdown()
  63. elseif input ~= "N" then
  64. print("Invalid answer.")
  65. sleep(2)
  66. os.reboot()
  67.  
  68. os.pullEvent = oldPull
  69. else
  70. print("Finished installation. Please remove installation disk.")
  71. sleep(2)
  72. os.shutdown()
  73. end
Advertisement
Add Comment
Please, Sign In to add comment