Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Tablet Installer BETA
- function download(code, location)
- url = http.get("https://www.pastebin.com/raw/"..code)
- f = fs.open(location,"w") --#opens file in write mode, has to be specified with location
- f.write(url.readAll()) --#reads every byte of url and writes it to location
- f.close() --# always close the file >:c
- return true --#return true so function can be used in ifs
- end
- local dir = "/YagPadBeta/";
- print("Starting Beta Installer");
- fs.makeDir("YagPadBeta");
- fs.makeDir("/YagPadBeta/libraries");
- fs.makeDir("/YagPadBeta/libraries/basalt/init.lua")
- print("Installing Basalt Library...");
- download("rc5nFKZ6", "BasaltTempInstaller.lua");
- shell.run("BasaltTempInstaller.lua packed true /YagPadBeta/libraries/basalt/basalt");
- fs.delete("BasaltTempInstaller.lua")
- fs.delete("YagPadBeta/Beta.lua");
- download("VvCRFMRs", "YagPadBeta/Beta.lua");
- if fs.exists("/YagPadBeta/config/username.conf") == nil then
- shell.run("clear");
- print("Please enter the username");
- print("> ")
- term.setCursorPos(3, 2);
- local name = read();
- fs.makeDir("YagPadBeta/config");
- local file = fs.open("/YagPadBeta/config/username.conf", "w");
- file.write(name);
- file.close();
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement