therealinsight

Untitled

Jun 9th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.68 KB | None | 0 0
  1. write("BSC Recovery Mode Utility")
  2. write("\nPlease enter a number")
  3. write("\n1.Wipe Machine Data and Restore CraftOS")
  4. write("\n2.Cleanup Utility & Reboot normally")
  5. local a = read()
  6. if a=="1" then
  7.     write("\nWiping Machine Data...")
  8.     for k,v in pairs(fs.list("/")) do
  9.         if not fs.isReadOnly(v) then
  10.             fs.delete(v)
  11.         end
  12.     end
  13.     write("\nDone! Rebooting into CraftOS!")
  14.     sleep(2)
  15.     os.reboot()
  16. end
  17. if a=="2" then
  18.     write("\nCleaning Up...")
  19.     shell.run("rm /startup")
  20.     if fs.exists("/startupold") == true then
  21.         shell.run("mv /startupold /startup")
  22.     write("Done! Rebooting...")
  23.     sleep(2)
  24.     os.reboot()
  25. end
  26. os.reboot()
Add Comment
Please, Sign In to add comment