Advertisement
Xylem_Gaming

Installer

Nov 4th, 2015
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.00 KB | None | 0 0
  1. running2 = true
  2.  
  3. function get(paste, file)
  4.     resp = http.get("http://pastebin.com/raw.php?i="..paste)
  5.     if resp then
  6.         handler=io.open(file,"w")
  7.         handler:write(resp.readAll())
  8.         handler:close()
  9.     return true -- It worked
  10.     else
  11.     return false -- It failed
  12.     end
  13. end
  14.  
  15. local function testExist(path)
  16.     if fs.exists( path ) then
  17.        print( "File already exists" )
  18.        running2 = false
  19.        return
  20.     end
  21. end
  22.  
  23.  
  24.  
  25. if fs.exists("/launcher") then
  26.     print("Launcher installed already, delete dir")
  27.     print("y or n?")
  28.     running = true
  29.     while running do
  30.         input = read()
  31.         if input == "y" then
  32.             print("deleting dir")
  33.             fs.delete("/launcher")
  34.             running2 = true
  35.             running = false
  36.         elseif input == "n" then
  37.             print("closing installer")
  38.             running = false
  39.         else
  40.             print("invalid option")
  41.         end
  42.     end
  43. end
  44.  
  45. if running2 then
  46.     get("J9sCcJ7q","launcher/main")
  47.     get("Y7sBg50v","launcher/handler")
  48.     get("Bzd4TF3K","launcher/screen")
  49.     print("Rebooting Computer")
  50.     sleep(3)
  51.     os.reboot()
  52. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement