Advertisement
ItsNoah

update

Apr 15th, 2021 (edited)
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. local tArgs = {...}
  2. sleep(1)
  3. http.request("http://pastebin.com/raw.php?i=cakvRYin")
  4. requesting = true
  5. while requesting do
  6.     local event, url, sourceText = os.pullEvent()
  7.     if event == "http_success" then
  8.         respondedText = sourceText.readAll()
  9.         fs.delete("install.lua")
  10.         file = fs.open("install.lua", "w")
  11.         file.write(respondedText)
  12.         file.close()
  13.         requesting = false
  14.         term.write("Installed!")
  15.     else
  16.         requesting = false
  17.     end
  18. end
  19.  
  20. if tArgs[1] ~= nil then
  21.     if tArgs[1] == "all" then
  22.         shell.run("install all")
  23.     end
  24. else
  25.     shell.run("install update")
  26.     print(" Updated!")
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement