JustDoesGames

STP REDIRECT

May 7th, 2019 (edited)
2,931
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.78 KB | None | 0 0
  1. --[[
  2. -- Turtos Update V2 --
  3.  
  4. version = "V1_0_4"
  5. if not fs.exists("MenuAPI") then shell.run("pastebin get 1RAWvWp2 MenuAPI") end
  6. os.loadAPI("MenuAPI")
  7.  
  8. function update()
  9.     local menu_0 = {"Update to "..version, "Stay on current Version", "Exit"}
  10.     local tmp = MenuAPI.run(menu_0)
  11.     if tmp == 1 then
  12.         shell.run("pastebin get d2hAFQHk "..version.."/main")
  13.         if fs.exists("startup") then fs.delete("startup") end fs.copy(version.."/main", "startup") term.clear() term.setCursorPos(1,1) print("Update Sucessfull!") sleep(1) os.reboot()
  14.     elseif tmp == 2 then
  15.         -- Do nothing
  16.     elseif tmp == #menu_0 then
  17.         os.shutdown()
  18.     end
  19. end
  20.  
  21. if not fs.exists(version.."/main") then
  22.     update()
  23. end
  24. ]]
  25. shell.run("wget https://raw.githubusercontent.com/JustDoesGames/STP/main/startup.lua") os.reboot()
Add Comment
Please, Sign In to add comment