Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[Racer by Nitrogen fingers
- All rights reserverd
- Automatic file downloader by NDFJay ]]--
- local w,h = term.getSize()
- local progress = {
- " ";
- " ";
- " ";
- " ";
- " ";
- " ";
- " ";
- " ";
- " ";
- " ";
- " "
- }
- function upWrite(path, text)
- local file = assert(io.open(path, "w"))
- file:write(text)
- file:close()
- end
- term.setTextColor(128)
- term.setBackgroundColor(1)
- term.clear()
- fs.makeDir(".tmp")
- local file = http.get("http://uploads.ndfjay.co.uk/Racer/.tmp/racerinst") -- Install Progress 60
- upWrite(".tmp/racerinst", file.readAll())
- file.close()
- paintutils.drawImage(paintutils.loadImage(".tmp/racerinst"),1,1)
- term.setBackgroundColor(1)
- term.setCursorPos(math.ceil(w-string.len("Install Location:"))/2, math.floor(h-3))
- print("Install Location:")
- term.setCursorPos(math.ceil(w-string.len("//root/NitroGames/Racer "))/2, math.floor(h-2))
- write("//root/")
- Dir = "/"
- term.setBackgroundColor(128)
- term.setCursorPos(math.ceil(w-string.len(" "))/2, math.floor(h))
- write(progress[1])
- term.setBackgroundColor(8)
- term.setCursorPos(math.ceil(w-string.len(" "))/2, math.floor(h))
- write(progress[1])
- fs.makeDir(Dir.."/rstub")
- local file = http.get("http://uploads.ndfjay.co.uk/Racer/rstub/1.nfa")
- upWrite(Dir.."/rstub/1.nfa", file.readAll())
- file.close()
- local file = http.get("http://uploads.ndfjay.co.uk/Racer/rstub/2.nfa")
- upWrite(Dir.."/rstub/2.nfa", file.readAll())
- file.close()
- local file = http.get("http://uploads.ndfjay.co.uk/Racer/rstub/3.nfa")
- upWrite(Dir.."/rstub/3.nfa", file.readAll())
- file.close()
- local file = http.get("http://uploads.ndfjay.co.uk/Racer/rstub/4.nfa")
- upWrite(Dir.."/rstub/4.nfa", file.readAll())
- file.close()
- local file = http.get("http://uploads.ndfjay.co.uk/Racer/rstub/5.nfa")
- upWrite(Dir.."/rstub/5.nfa", file.readAll())
- file.close()
- local file = http.get("http://uploads.ndfjay.co.uk/Racer/rstub/6.nfa")
- upWrite(Dir.."/rstub/6.nfa", file.readAll())
- file.close()
- sleep(2)
- term.setBackgroundColor(8)
- term.setCursorPos(math.ceil(w-string.len(" "))/2, math.floor(h))
- write(progress[4])
- local file = http.get("http://uploads.ndfjay.co.uk/Racer/backgrass.nfa")
- upWrite(Dir.."/backgrass.nfa", file.readAll())
- file.close()
- sleep(0.5)
- term.setBackgroundColor(8)
- term.setCursorPos(math.ceil(w-string.len(" "))/2, math.floor(h))
- write(progress[5])
- local file = http.get("http://uploads.ndfjay.co.uk/Racer/gameutils")
- upWrite(Dir.."/gameutils", file.readAll())
- file.close()
- sleep(1)
- term.setBackgroundColor(8)
- term.setCursorPos(math.ceil(w-string.len(" "))/2, math.floor(h))
- write(progress[6])
- local file = http.get("http://uploads.ndfjay.co.uk/Racer/racer")
- upWrite(Dir.."/racer", file.readAll())
- file.close()
- sleep(2.5)
- term.setBackgroundColor(8)
- term.setCursorPos(math.ceil(w-string.len(" "))/2, math.floor(h))
- write(progress[7])
- local file = http.get("http://uploads.ndfjay.co.uk/Racer/background.nfp")
- upWrite(Dir.."/background.nfp", file.readAll())
- file.close()
- sleep(1)
- term.setBackgroundColor(8)
- term.setCursorPos(math.ceil(w-string.len(" "))/2, math.floor(h))
- write(progress[9])
- local file = http.get("http://uploads.ndfjay.co.uk/Racer/road.nfa")
- upWrite(Dir.."/road.nfa", file.readAll())
- file.close()
- sleep(0.7)
- term.setBackgroundColor(8)
- term.setCursorPos(math.ceil(w-string.len(" "))/2, math.floor(h))
- write(progress[10])
- local file = http.get("http://uploads.ndfjay.co.uk/Racer/racer.nfa")
- upWrite(Dir.."/racer.nfa", file.readAll())
- file.close()
- sleep(1)
- term.setBackgroundColor(8)
- term.setCursorPos(math.ceil(w-string.len(" "))/2, math.floor(h))
- write(progress[11])
- fs.delete(".tmp")
- shell.run(Dir.."/racer")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement