Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local color = colors.green
- local w, h = term.getSize()
- local serverFiles = {}
- serverFiles.server = "G8jS60D1"
- serverFiles.startup = "pAuEZD46"
- local clientFiles = {}
- clientFiles.client = "dSYLZtkX"
- clientFiles.menu = "iz95vBeb"
- clientFiles.startup = "kvwgz7L0"
- function init()
- term.setTextColor(color)
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setCursorPos(1,1)
- info("ROBCO INDUSTRIES UNIFIED OPERATING SYSTEM", true)
- info("COPYRIGHT 2019-2020 ROBCO INDUSTRIES", true)
- info("-Server 1-", true)
- info(nil, false)
- info("Terminal Setup", false)
- info("======================", false)
- info("Install for Terminal or Server?", false)
- hr()
- local side = read()
- if side == "server" or side == "Server" then
- server()
- elseif side == "terminal" or side == "Terminal" then
- client()
- else
- term.clear()
- term.setCursorPos(1,1)
- end
- end
- function hr()
- x, y = term.getCursorPos()
- for i = 1, w, 1 do
- write("-")
- end
- term.setCursorPos(1, y+1)
- end
- function info(text, isCenter)
- if text == nil then
- term.setCursorPos(1, y+2)
- elseif isCenter then
- x, y = term.getCursorPos()
- x = (w - #text) / 2
- term.setCursorPos(x, y)
- write(text)
- term.setCursorPos(1, y+1)
- else
- print(text)
- end
- end
- function install(link,file)
- if fs.exists(file) then
- fs.delete(file)
- shell.run("pastebin", "get", link, file)
- print("Updated "..file)
- else
- shell.run("pastebin", "get", link, file)
- print("Installed "..file)
- end
- end
- function server()
- info("Installing Server", false)
- for f, l in pairs(serverFiles) do
- install(l, f)
- end
- end
- function client()
- info("Intalling Client", false)
- for f, l in pairs(clientFiles) do
- install(l, f)
- end
- end
- init()
Add Comment
Please, Sign In to add comment