Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setCursorPos(1,1)
- print("Are you sure? [Y/N] ")
- local event, key = os.pullEvent("key")
- if key == keys.y then
- os.unloadAPI(_G)
- for i, v in ipairs(fs.list('/')) do
- if v ~= "rom" then
- fs.delete('/'..v)
- print("/"..v.." was deleted.")
- end
- end
- os.reboot()
- elseif key == keys.n then
- print("Format cancelled.")
- return
- else
- print("Invalid key")
- print("Format cancelled.")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement