Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function viewBox(x,y,s,n)
- term.setBackgroundColor(colors.lightGray)
- term.setCursorPos(x,y)
- term.setCursorPos(x,y)
- print(n..(string.rep("-",string.len(s)-string.len(n))))
- term.setCursorPos(x,(y+1))
- print(s)
- term.setCursorPos(x,(y+2))
- print(string.rep("-",string.len(s)))
- end
- PL = 1
- term.setCursorPos(1,1)
- term.setBackgroundColor(colors.cyan)
- term.setTextColour(colors.white)
- term.clear()
- shell.run(".ProgramMenu")
- PL = PL - 1
- if PL == 0 then
- term.setCursorPos(1,1)
- term.setBackgroundColor(colors.blue)
- term.clear()
- viewBox(1,1,"You are about to leave AiOs!","OS")
- viewBox(1,3,"[R]eboot [S]hutdown [C]ancel","OS")
- term.setCursorPos(999,999)
- choise = read()
- if choise == "R" or choise == "r" then
- os.reboot()
- elseif choise == "S" or choise == "s" or choise == "" then
- os.shutdown()
- else
- shell.run(".os")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement