Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- term.clear()
- term.setCursorPos(1,1)
- print("WARNING: You are attempting to format this computer! This process is irreverible!")
- print("Do you wish to continue? Yes/No")
- local input = read()
- if input == "Yes" or input == "yes" or input == "YES" then
- shell.run("label","clear")
- for _,file in ipairs(fs.list("/")) do
- if not fs.isReadOnly(file) then
- fs.delete(file)
- end
- end
- print("Format Complete")
- sleep(2)
- os.reboot()
- elseif input == "No" or input == "no" or input == "NO" then
- print("Terminating Program")
- break
- else
- print("Invalid Input! Try again")
- sleep(3)
- end
- end
Add Comment
Please, Sign In to add comment