Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local drive = peripheral.find("drive") if drive then drive.ejectDisk() end
- local e,u=textutils.urlEncode,textutils.unserialize
- local c,t,w,h=0,0,term.getSize()
- local l,m="///nekOS///","edb00000bde"
- local function get(c,p) local r=http.get("http://pastebin.com/raw.php?i="..e(c)) if not r then return false,"Failed to get paste." end local d=r.readAll() r.close() fs.delete(p) local f=fs.open(p,"w") f.write(d) f.close() return true end
- local function load(p) if not fs.exists(p) then return {} end local f=fs.open(p,"r") local t=u(f.readAll()) f.close() return t or {} end
- local function progress(m) local p=c/t local j=math.floor(p*w) local s=""..(math.floor(p*1000)/10).."%" term.setCursorPos(1,h-1) term.clearLine() term.write(m) term.setCursorPos(w-string.len(s)+1,h-1) term.write(s) term.setCursorPos(1,h) term.clearLine() for i=1,j do term.blit("#","8","7") end end
- term.setTextColor(colors.white)
- term.setBackgroundColor(colors.gray)
- term.clear()
- term.setCursorPos(math.floor((w-string.len(l))/2),math.floor(h/2))
- for i=1,string.len(l) do term.blit(string.sub(l,i,i),string.sub(m,i,i),"7") sleep(1/5) end
- get("3uUQRK59","nekOS/main.manifest")
- local m=load("nekOS/main.manifest")
- for k,v in pairs(m.Files) do t=t+1 end
- for k,v in pairs(m.Files) do progress("Downloading "..k.."...") get(v.Code,k) c=c+1 sleep(1/t) end
- os.reboot()
Add Comment
Please, Sign In to add comment