Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- end
- end
- shell.run('clear')
- while true do
- print('UbunOS v1\n>')
- local cmd=read()
- if cmd=='network' then
- print('Wifi options\n{1} Open\n{2} Close\n{3} Use\n{4} Exit')
- local choice=read()
- if choice=='1' then
- print('Enter modem direction { bottom/top/left/right/front/back }')
- rednet.open(read())
- elseif choice=='2' then
- print('Enter modem direction { bottom/top/left/rigth/front/back }')
- local side=read()
- if rednet.isOpen(side) then
- rednet.close(side)
- else
- print('No modem in this direction')
- end
- elseif choice=='3' then
- print('Enter modem direction { bottom/top/left/right/front/back }')
- wifi(read())
- elseif choice=='4' then
- UbunOS()
- end
- elseif cmd=='shutdown' then
- os.shutdown()
- elseif cmd=='reboot' then
- os.reboot()
- else
- print('Bad command !')
- end
- end
- end
- function startOs()
- term.clear()
- term.setCursorPos(2, 1)
- print('\n{1} Run UbunOS\n{2} Shutdown computer')
- local choice=read()
- if choice=='1' then
- UbunOS()
- elseif choice=="2" then
- print('Shutdown...')
- sleep(2)
- os.shutdown()
- end
- end
- print('\n{1} CraftOs\n{2} UbunOS')
- local choice=read()
- if choice=="1" then
- shell.run('clear')
- shell.run('shell')
- elseif choice=="2" then
- if fs.exists('/ubunos/') then
- startOs()
- else
- shell.run('/disk/install/')
- startOs()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement