Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function drawWindow(x, xx, y, yy, color1, color2, textColor, title)
- paintutils.drawFilledBox(x, y, xx, yy, color1)
- paintutils.drawLine(x, y, xx, y, color2)
- term.setCursorPos(x,y)
- term.setTextColor(textColor)
- print(" "..title)
- paintutils.drawPixel(xx, y, 16384)
- paintutils.drawPixel(xx-1, y, 32)
- paintutils.drawPixel(xx-2, y, 16)
- end
- x, y = term.getSize()
- function cprint(text, yp)
- cx = math.ceil((x/2)-(string.len(text)/2))
- term.setCursorPos(cx, yp)
- print(text)
- end
- function cwrite( text, yp)
- cx = math.ceil((x/2)-(string.len(text)/2))
- term.setCursorPos(cx, yp)
- write(text)
- end
- function installWindow()
- term.setBackgroundColor(colors.blue)
- term.clear()
- drawWindow(13, 38, 4, 11, 1, 512, 128, "Install")
- term.setCursorPos(16, 6)
- term.setBackgroundColor(colors.white)
- cprint("Oblox OS", 6)
- cprint("Installing...", 7)
- term.setCursorPos(16, 8)
- end
- function Doinstall()
- installWindow()
- sleep(0.02)
- shell.run("mkdir .DS_Data")
- installWindow()
- shell.run("cd .DS_Data")
- installWindow()
- shell.run("mkdir APIS")
- installWindow()
- shell.run("mkdir Config")
- installWindow()
- shell.run("cd /")
- installWindow()
- shell.run("mkdir programs")
- installWindow()
- shell.run("mkdir ui")
- installWindow()
- shell.run("pastebin get RKPgMEqx startup")
- installWindow()
- shell.run("pastebin get 6wVekjuE ui/main")
- installWindow()
- shell.run("pastebin get KCGk2vJW ui/login")
- installWindow()
- shell.run("pastebin get UkxJcZTL .DS_Data/APIS/windowAPI")
- installWindow()
- shell.run("pastebin get JEBcUAyn .DS_Data/APIS/configAPI")
- installWindow()
- shell.run("pastebin get ykFTVsi7 .DS_Data/APIS/vectors")
- installWindow()
- shell.run("pastebin get XU60BDH9 .DS_Data/APIS/SHA256")
- installWindow()
- shell.run("pastebin get v4bVmdqT .DS_Data/Config/settings")
- installWindow()
- shell.run("pastebin get dUX9UwKh programs/example1")
- installWindow()
- shell.run("pastebin get dUX9UwKh programs/example2")
- installWindow()
- shell.run("pastebin get dUX9UwKh programs/example3")
- installWindow()
- shell.run("pastebin get dUX9UwKh programs/example4")
- installWindow()
- shell.run("pastebin get dUX9UwKh programs/example5")
- installWindow()
- shell.run("pastebin get dUX9UwKh programs/example6")
- installWindow()
- shell.run("mkdir icons")
- installWindow()
- shell.run("pastebin get k8en531w icons/programs")
- installWindow()
- shell.run("pastebin get yqAPaeyQ icons/settings")
- installWindow()
- term.setBackgroundColor(colors.blue)
- term.clear()
- drawWindow(13, 38, 4, 11, 1, 512, 128, "Install")
- term.setCursorPos(1, 1)
- term.setBackgroundColor(colors.white)
- term.setCursorPos(16, 8)
- os.reboot()
- end
- term.setBackgroundColor(colors.blue)
- term.clear()
- drawWindow(13, 38, 4, 11, 1, 512, 128, "Install")
- term.setCursorPos(14, 6)
- term.setBackgroundColor(colors.white)
- cprint("Oblox OS", 6)
- term.setBackgroundColor(256)
- paintutils.drawFilledBox(16, 8, 35, 10, 256)
- term.setCursorPos(14,6)
- cprint("Install now", 9)
- local install = "f"
- while install == "f" do
- event,button,x,y = os.pullEvent("mouse_click")
- if event == "mouse_click" and x >= 16 and x <= 35 and y >= 8 and y <= 10 and button == 1 then
- install = "t"
- Doinstall()
- end
- end
Add Comment
Please, Sign In to add comment