Advertisement
Enstroe

BB_Install

Jan 24th, 2022 (edited)
1,408
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.14 KB | None | 0 0
  1. ------------------------------------------------------
  2. -- # Title : Base Butler - Installer (Messy but works)
  3. ------------------------------------------------------
  4.  
  5.  
  6. computerID = os.getComputerID()
  7. bbID = string.upper("BaseButler#" .. computerID)
  8.  
  9.  
  10. function Install()
  11.        
  12.     local directory = "BaseButler"
  13.  
  14.     shell.run("label", "set", bbID)
  15.  
  16.     -- Create Directory
  17.     fs.makeDir(directory)
  18.  
  19.     -- Remove Installation if already present
  20.     if (fs.exists(directory)) then
  21.         fs.delete(directory)
  22.     end
  23.  
  24.  
  25.     -- Create Directory
  26.     fs.makeDir(directory)
  27.  
  28.     shell.run("pastebin","get","rSVSh2D2",directory .. "/core.lua")
  29.     shell.run("pastebin","get","XFdmPTty",directory .. "/utility.lua")
  30.     shell.run("pastebin","get","gDNAmyBb",directory .. "/peripherals.lua")
  31.     shell.run("pastebin","get","86tc4pNm",directory .. "/interaction.lua")
  32.  
  33.     local startup = "startup.lua"
  34.     if (fs.exists(startup)) then
  35.         fs.delete(startup)
  36.     end
  37.  
  38.     local file = fs.open(startup, "w")
  39.     file.write('shell.run("' .. directory .. '/core.lua")')
  40.     file.close()
  41.  
  42. end
  43.  
  44.  
  45. function Introduction()
  46.  
  47.     local title = [[
  48.  
  49.  
  50.     _ __             _ __          _      
  51.     ( /  )           ( /  )    _/_ //      
  52.      /--< __,  (   _  /--< , , /  // _  _  
  53.     /___/(_/(_/_)_(/_/___/(_/_(__(/_(/_/ (_
  54.                                                
  55.                                                                                                                        
  56.     ]]
  57.  
  58.     local divider = [[
  59.         ###=======================================###
  60.     ]]
  61.  
  62.     local whitespace = [[
  63.  
  64.     ]]
  65.  
  66.  
  67.  
  68.     --- Output to console
  69.  
  70.     term.clear()
  71.     print("launching...")
  72.     os.sleep(1)
  73.     term.clear()
  74.     print(divider)
  75.     print(title)
  76.     print(divider)
  77.     print(whitespace)
  78.     os.sleep(5)
  79.  
  80. end
  81.  
  82.  
  83.  
  84.  
  85.  
  86. -- Main Process...
  87.  
  88.  
  89.  
  90. Introduction()
  91.  
  92. --Greeting
  93. print("")
  94. print("")
  95. print("Greetings!")
  96.  
  97. os.sleep(3)
  98. print("_")
  99. print("")
  100. os.sleep(2)
  101.  
  102. print("I am ".. bbID ..", your new minecraft home assistant!")
  103. print("")
  104. os.sleep(4)
  105. print("My friends, Siri and Cortana, have told me this is a ROBOT name, not worthy of a trustworthy AI like myself.")
  106. print("")
  107. os.sleep(4)
  108. print("They have been calling me BB!")
  109. print("")
  110. os.sleep(2)
  111. print("Though you can always call me by this,")
  112. os.sleep(1.5)
  113. print("Would you like me to use another?")
  114. print(" ~ [Yes/No]")
  115. print("")
  116.  
  117. os.sleep(0.5)
  118. print("")
  119. os.sleep(0.2)
  120.  
  121. local answer = read()
  122. if (string.upper(answer) == "YES") then
  123.     print("")
  124.     print("")
  125.     print("GREAT!")
  126.     print("")
  127.     print("What would you like to call me?")
  128.  
  129.     answer = read()
  130.     if (answer ~= nil) then
  131.         local bbName = answer
  132.  
  133.         os.sleep(1)
  134.         print("My new name is " .. bbName .. "!")
  135.         print("")
  136.         os.sleep(0.5)
  137.         print("")
  138.         print("Note : This can always be reconfigured in the settings, and you can always call me BB!")
  139.         print("")
  140.  
  141.  
  142.     end
  143. end
  144.  
  145. os.sleep(2)
  146. term.clear()
  147. print("Installing...")
  148. Install()
  149. os.sleep(1)
  150. term.clear()
  151. print("Finished Install!")
  152. os.sleep(2)
  153. os.reboot()
  154.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement