Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --os.pullEvent = os.pullEventRaw
- function cls()
- shell.run("clear")
- end
- if term.isColor() == true then
- local color = true
- term.setTextColor(colours.green)
- print("Color Found")
- else
- local color = false
- term.setTextColor(colours.white)
- print("Color Not Found")
- end
- sel = 1
- while true do
- cls()
- if color == true then
- term.setTextColor(colours.yellow)
- if sel == 1 then
- print("> Grab Files")
- print("Exit")
- elseif sel == 2 then
- print("Grab Files")
- print("> Exit")
- end
- else
- term.setTextColor(colours.white)
- if sel == 1 then
- print("-----------------")
- print("| > Grab Files |")
- print("| Exit |")
- print("-----------------")
- elseif sel == 2 then
- print("-----------------")
- print("| Grab Files |")
- print("| > Exit |")
- print("-----------------")
- end
- end
- a, i = os.pullEvent("key")
- sleep(.01)
- if i == 17 or i == 200 and sel == 2 then
- sel = 1
- elseif i == 31 or i == 208 and sel == 1 then
- sel = 2
- elseif i == 28 or i == 57 then
- if sel == 1 then
- if fs.exists("Updat") == true then
- shell.run("delete Updat")
- end
- if fs.exists("TicTacToe") == true then
- shell.run("delete TicTacToe")
- end
- term.setBackgroundColor(colours.white)
- term.setTextColor(colours.black)
- cls()
- print("Downloading Files... Please Wait...")
- term.setTextColor(colours.white)
- shell.run("pastebin get H6f0efWS Updat")
- shell.run("pastebin get V4a4TCr3 TicTacToe")
- cls()
- term.setBackgroundColor(colours.black)
- cls()
- shell.run("Updat")
- shell.run("delete Updat")
- shell.run("delete TicTacToe")
- break
- elseif sel == 2 then
- cls()
- break
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment