Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.setBackgroundColor(colors.white)
- shell.run("clear")
- term.setCursorPos(1,1)
- term.setTextColor(colors.blue)
- term.setBackgroundColor(colors.gray)
- print("AppleOS v3.3 ")
- function AppleSHELL()
- term.setCursorPos(1,1)
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.red)
- shell.run("clear")
- print("AppleOS SHELL type in Exit() to exit")
- term.setTextColor(colors.blue)
- write("> ")
- input = read()
- shell.run(input)
- sleep(2)
- os.reboot()
- end
- function drawMenu1()
- term.setCursorPos(1,2)
- term.setTextColor(colors.blue)
- term.setBackgroundColor(colors.gray)
- print(" ")
- term.setCursorPos(1,3)
- print("#############")
- term.setCursorPos(1,4)
- print("AppleOS SHELL")
- term.setCursorPos(1,5)
- print("Restart ")
- term.setCursorPos(1,6)
- print("#############")
- end
- function drawDesktop()
- apple = paintutils.loadImage(".background")
- paintutils.drawImage(apple,1,1)
- end
- drawDesktop()
- function button3()
- while true do
- local event, button, X, Y = os.pullEventRaw()
- if(event == "mouse_click") then
- if(slc == 1) then
- if(X >=1 and X <=7 and Y==5 and button ==1) then
- os.reboot()
- else
- os.reboot()
- end
- end
- end
- end
- end
- function button2()
- while true do
- local event, button, X, Y = os.pullEventRaw()
- if(event == "mouse_click") then
- if(slc == 1) then
- if(X >=1 and X <=13 and Y==4 and button ==1) then
- AppleSHELL()
- else
- os.reboot()
- end
- end
- end
- end
- end
- slc = 0
- function button1()
- while true do
- local event, button, X, Y = os.pullEventRaw()
- if(event == "mouse_click") then
- if(slc == 0) then
- if(X >=1 and X <=12 and Y==1 and button == 1) then
- slc = 1
- drawMenu1()
- button2()
- button3()
- else
- shell.run("test")
- end
- end
- end
- end
- end
- button1()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement