Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --This pastebin get it dessined for the superOS and will not Work unless You have A installed versoin of superOS on a ComputerCraft computer
- --to Get SuperOS type pastebin run bYaMJcmW
- --Deasined to be used for a API
- --local cbuf = buf.setupBuffer()
- os.pullEvent = os.pullEvent
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setTextColor(colors.green)
- function main()
- print("Install on SuperOS(1) or on desktop(2)?")
- while true do
- r = read()
- if type(r)=="string" then
- if r == "1" then
- OS()
- break
- elseif r == "2" then
- desk()
- break
- elseif r == "q" then
- break
- end
- end
- print("needs to be a 1 or a 2")
- print("Install on SuperOS(1) or on desktop(2)?")
- end
- end
- function desk()
- count = 0
- while count < 3 do
- print("File name: ")
- local r = read()
- if not fs.exists(r) then
- print("Pastebin Code:")
- local c = read()
- if c then
- if shell.run("pastebin","get",c,r) then
- print("Finnihsed")
- sleep(2)
- break
- else
- print("does not exists")
- end
- end
- else
- print("Not a valid responce")
- end
- count = count+1
- end
- end
- function OS()
- local function Public()
- while true do
- print("File name: ")
- local r = read()
- if not fs.exists("os/programs/"..r) then
- print("Pastebin Code:")
- local c = read()
- if c then
- shell.run("pastebin","get",c,"os/programs/"..r)
- print("Finnihsed")
- sleep(2)
- break
- else
- print("Not a valid responce")
- end
- end
- end
- end
- local function Private()
- local user = A.RUser()
- local location = "os/users/"..user.."/programs/"
- esc = true
- while esc do
- print("File name: ")
- local r = read()
- if not fs.exists(location..r) then
- print("Pastebin Code:")
- local c = read()
- if c then
- shell.run("pastebin","get",c,location..r)
- print("Finnihsed")
- esc = false
- end
- else
- print("Not a valid responce")
- end
- end
- end
- while true do
- print("Public(1) or Private(2) program?")
- local r = read()
- if r=="1" then
- Public()
- break
- elseif r=="2" then
- Private()
- break
- else
- print("Not a Valid Option> Please enter a 1 or a 2")
- end
- end
- end
- local ok,err = pcall(main)
- if not ok then
- A.Error(err)
- sleep(5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement