SHOW:
|
|
- or go back to the newest paste.
1 | writepos, writecol, multchar, max, min, compare_coord, fill_color, render_folder, render_popup = table.unpack(require "os_library") | |
2 | ||
3 | local function delete_os_files() | |
4 | fs.delete("/os") | |
5 | fs.delete("/os_library") | |
6 | fs.delete("/startup") | |
7 | fs.delete("/about") | |
8 | end | |
9 | ||
10 | local x,y = render_popup(3,"CC OS",true) | |
11 | writecol(x,y,"\aAbout",colors.black,colors.white) | |
12 | writecol(x,y+1,"\aReinstall",colors.black,colors.white) | |
13 | writecol(x,y+2,"\aUninstall",colors.black,colors.white) | |
14 | local e, btn, cx, cy | |
15 | repeat | |
16 | e, btn, cx, cy = os.pullEvent("mouse_click") | |
17 | until cy>=y-1 and cy<=y+2 | |
18 | if cy==y then | |
19 | writepos(x,y,"CC OS ") | |
20 | writepos(x,y+1,"Created by") | |
21 | local w = term.getSize() | |
22 | 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 | |
23 | os.pullEvent("mouse_click") | |
24 | elseif cy==y+1 then | |
25 | render_popup(3,"Reinstall") | |
26 | writepos(x,y,"Reinstall?") | |
27 | writepos(x,y+1,"\aYes") | |
28 | writepos(x,y+2,"\aNo") | |
29 | local e,btn,cx1,cy1 | |
30 | repeat | |
31 | e, btn, cx1, cy1 = os.pullEvent("mouse_click") | |
32 | until cy1>=y+1 and cy1<=y+2 | |
33 | if cy1 == y+1 then | |
34 | delete_os_files() | |
35 | - | shell.run("pastebin get Ybut3XSa startup") |
35 | + | shell.run("pastebin get xqJWTVLN /startup") |
36 | - | shell.run("pastebin get SMFchEgW os") |
36 | + | shell.run("pastebin get vwYFtmAd /os") |
37 | - | shell.run("pastebin get fAuZALuJ os_library") |
37 | + | shell.run("pastebin get KYE79f0X /os_library") |
38 | - | shell.run("pastebin get CKEhVe5y about") |
38 | + | shell.run("pastebin get q9zbrC33 /about") |
39 | shell.run("reboot") | |
40 | end | |
41 | elseif cy==y+2 then | |
42 | render_popup(3,"Uninstall") | |
43 | writepos(x,y,"Uninstall?") | |
44 | writepos(x,y+1,"\aYes") | |
45 | writepos(x,y+2,"\aNo") | |
46 | local e,btn,cx1,cy1 | |
47 | repeat | |
48 | e, btn, cx1, cy1 = os.pullEvent("mouse_click") | |
49 | until cy1>=y+1 and cy1<=y+2 | |
50 | if cy1 == y+1 then | |
51 | delete_os_files() | |
52 | shell.run("reboot") | |
53 | end | |
54 | end |