Advertisement
Guest User

ZanqualInstaller

a guest
Jan 9th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.21 KB | None | 0 0
  1. -- Clear screen
  2. term.setBackgroundColor(colors.black)
  3. term.clear()
  4. term.setCursorPos(1,1)
  5. print("Downloading Zanqual API v0.3\nby DaloDaloDalo/XxCubegamerxX")
  6. sleep(3)
  7. -- If isn't installed
  8. if not fs.exists("/ZanqualScript") then
  9.   -- Pastebin shortcut
  10.   local function pastebin(id,name) return shell.run("pastebin get "..id.." "..name) end
  11.  
  12.   -- Downloaded Files
  13.   pastebin("TGZL0806","ZanqualScript/Zanqual_API_Loader_Startup")
  14.   pastebin("fTYsJbFD","ZanqualScript/Zanqual_API_Loader")
  15.   pastebin("MEgdAJHF","ZanqualScript/Zanqual")
  16.   pastebin("D4tNyMnZ","changelog")
  17.  
  18.   -- Print successfully installed
  19.   print([[
  20.  
  21.   Successfully downloaded Zanqual Script
  22.   Rebooting to install in 5 seconds
  23.   ]])
  24.   sleep(5)
  25.   oldReboot = os.reboot
  26.   oldShutd = os.shutdown
  27.   os.reboot = function()
  28.     if fs.exists("startup") then
  29.       fs.move("startup","startupBackup")
  30.     end
  31.     fs.copy("ZanqualScript/Zanqual_API_Loader_Startup","startup")
  32.     oldReboot()
  33.   end
  34.   os.reboot()
  35. -- If is installed
  36. else
  37.   -- Print already installed
  38.   print([[
  39.  
  40.   Already installed Zanqual Script
  41.   Press any key to exit
  42.   ]])
  43. end
  44.  
  45. -- Waits for any key
  46. os.pullEventRaw("key")
  47. term.clear()
  48. term.setCursorPos(1,1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement