Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function exit()
- sleep(0.5)
- error()
- end
- function getFile(url, filename)
- local downloadFile = http.get(url)
- local handle = downloadFile.readAll()
- downloadFile.close()
- local cFile = fs.open(filename, "w")
- cFile.write(handle)
- cFile.close()
- end
- print("Welcome to TajamSoft PassWord Creator Installer")
- sleep(0.4)
- print("This will install Tjs PassCreator in your computer")
- sleep(0.5)
- print("Files to download: tjsPassUpdater, passCreator.")
- sleep(0.5)
- print("Checking for old installation")
- if fs.exists("/passCreator") or fs.exists("/passCreatorFiles") then
- print("Old installation found!")
- print("Cannot install, delete old files or run updater...")
- exit()
- else
- print("No installation found, starting to download...")
- end
- sleep(1)
- getFile("https://raw.githubusercontent.com/tatjam/PassCreator/master/passCreator.lua", "/passCreator")
- print("Got passCreator main file...")
- sleep(0.5)
- print("Will create dirs...")
- fs.makeDir("/passCreatorFiles")
- print("Done!, downloading updater...")
- getFile("https://raw.githubusercontent.com/tatjam/PassCreator/master/passCUpdater","/passCreatorFiles/passCUpdater")
- sleep(0.1)
- print("Done!, downloading version data...")
- getFile("https://raw.githubusercontent.com/tatjam/PassCreator/master/version","/passCreatorFiles/versionData")
- print("Got it!, getting UtilsAPI")
- getFile("https://raw.githubusercontent.com/tatjam/PassCreator/master/UtilsAPI","/UtilsAPI")
- print("Done!")
- sleep(1)
- print("The update is done!")
- sleep(0.5)
- textutils.slowPrint(" I RECOMMEND to reboot after the installation")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement