MarkFergus

/install

May 24th, 2020 (edited)
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.25 KB | None | 0 0
  1. local links = {
  2.     dpaste = "CQfv27Az",
  3.     fileHandler = "d7jHVtRV",
  4.     lib/f = "Dai82QtW",
  5.     lib/getInput = "J0yUcp19",
  6.     portal = {
  7.         API = "MMe4RGrM",
  8.         GUI = "TqV0Mi9L",
  9.     },
  10. }
  11.  
  12. if not fs.exists("/lib") then
  13.     fs.makeDir("/lib")
  14. end
  15. if not fs.exists("/portal") then
  16.     fs.makeDir("/portal")
  17. end
  18.  
  19. -- TEMP_saveFromHTTP if /dpaste.lua doesn't exist on this computer
  20. local function saveFromHTTP()
  21.     local h = fs.open("/dpaste","w")
  22.     local obj = http.get("https://pastebin.com/raw/"..dpaste_link)
  23.     if obj == nil or obj.getResponseCode ~= 200 then
  24.         error("Failed!")
  25.     end
  26.     local text = obj.readAll()
  27.     h.write(text)
  28.     h.close()
  29. end
  30.  
  31. if not fs.exists("/dpaste") then saveFromHTTP() end
  32. if not fs.exists("/lib/fileHandler") then shell.run("/dpaste","1","MMe4RGrM","/lib/FileHandler") end
  33. if not fs.exists("/lib/f") then shell.run("/spaste","1","Dai82QtW","/portal/f") end
  34. if not fs.exists("/lib/getInput") then shell.run("/dpaste","1","J0yUcp19","/portal/lib/getInput") end
  35. if not fs.exists("/portal/API") == false then shell.run("dpaste","1","MMe4RGrM","/portal/lib/API") end
  36. shell.run("clear")
  37. fs.delete("/portal/GUI")
  38. shell.run("/dpaste","1","TqV0Mi9L","/portal/GUI")
  39. shell.run("cd","/portal")
  40.  
  41. while true do
  42.   shell.run("/portal/GUI")
  43.   sleep(5)
  44. end
Add Comment
Please, Sign In to add comment