Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- writepos, writecol, multchar, max, min, compare_coord, fill_color, render_folder, render_popup = table.unpack(require "os_library")
- local function delete_os_files()
- fs.delete("/os")
- fs.delete("/os_library")
- fs.delete("/startup")
- fs.delete("/about")
- end
- local x,y = render_popup(3,"CC OS",true)
- writecol(x,y,"\aAbout",colors.black,colors.white)
- writecol(x,y+1,"\aReinstall",colors.black,colors.white)
- writecol(x,y+2,"\aUninstall",colors.black,colors.white)
- local e, btn, cx, cy
- repeat
- e, btn, cx, cy = os.pullEvent("mouse_click")
- until cy>=y-1 and cy<=y+2
- if cy==y then
- writepos(x,y,"CC OS ")
- writepos(x,y+1,"Created by")
- local w = term.getSize()
- if w>30 then writepos(x,y+2,"u/Bright-Historian-216") else writepos(x,y+2,"u/Bright- ") writepos(x,y+3,"Historian-216") end
- os.pullEvent("mouse_click")
- elseif cy==y+1 then
- render_popup(3,"Reinstall")
- writepos(x,y,"Reinstall?")
- writepos(x,y+1,"\aYes")
- writepos(x,y+2,"\aNo")
- local e,btn,cx1,cy1
- repeat
- e, btn, cx1, cy1 = os.pullEvent("mouse_click")
- until cy1>=y+1 and cy1<=y+2
- if cy1 == y+1 then
- delete_os_files()
- shell.run("pastebin get Ybut3XSa startup")
- shell.run("pastebin get SMFchEgW os")
- shell.run("pastebin get fAuZALuJ os_library")
- shell.run("pastebin get CKEhVe5y about")
- shell.run("reboot")
- end
- elseif cy==y+2 then
- render_popup(3,"Uninstall")
- writepos(x,y,"Uninstall?")
- writepos(x,y+1,"\aYes")
- writepos(x,y+2,"\aNo")
- local e,btn,cx1,cy1
- repeat
- e, btn, cx1, cy1 = os.pullEvent("mouse_click")
- until cy1>=y+1 and cy1<=y+2
- if cy1 == y+1 then
- delete_os_files()
- shell.run("reboot")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement