Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Are You Sure? This Will Wipe Your Harddisk!")
- local menuOptions = {"Yes", "No"}
- term.write(text)
- return true
- function start()
- while true do
- term.clear()
- for i,v in ipairs(menuOptions) do
- if i == selected then
- centerText(":"..v..":", i)
- else
- centerText(v,i)
- end
- end
- local id, key = os.pullEvent()
- if key == 208 and selected < #menuOptions then
- selected = selected + 1
- elseif key == 200 and selected > 1 then
- selected = selected - 1
- end
- local id, key = os.pullEvent()
- if key == 28 then
- return selected
- end
- end
- end
- x = start()
- print()
- if selected == 1 then
- print("Goodbye!:(")
- sleep(1)
- print("Formatting Your Drive...")
- for _,file in ipairs(fs.list("/")) do
- if not fs.isReadOnly(file) then
- fs.delete(file)
- print("Deleted:" + file)
- end
- end
- print("DaanOS Was Been Uninstalled.")
- print("Please Help Us Make Our OS Better By Sending a suggestion on: https://bit.do/daanos")
- sleep(10)
- os.reboot()
- end
- if selected == 2 then
- print("Operation Aborted")
- write("Press any key to go back to the boot selection menu")
- os.pullEvent("key")
- shell.run("startup")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement