Advertisement
yeeeeeeeeeeeee

Yeeet OS Part 3

Mar 24th, 2025
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.96 KB | None | 0 0
  1. -- Yeeet OS Uninstall Script
  2.  
  3. local function confirmUninstall()
  4.     term.clear()
  5.     term.setCursorPos(1, 1)
  6.     print("===== Yeeet OS Uninstall =====")
  7.     print("Are you sure you want to uninstall Yeeet OS?")
  8.     print("This will delete all OS files and cannot be undone.")
  9.     write("Type 'yes' to confirm: ")
  10.     local confirmation = read()
  11.     return confirmation == "yes"
  12. end
  13.  
  14. local function uninstallOS()
  15.     local osFiles = { "startup.lua", "draw.lua", "programming.lua", "uninstall.lua", "theme.txt" }
  16.  
  17.     for _, file in ipairs(osFiles) do
  18.         if fs.exists(file) then
  19.             fs.delete(file)
  20.         end
  21.     end
  22.  
  23.     term.clear()
  24.     term.setCursorPos(1, 1)
  25.     print("Yeeet OS has been successfully uninstalled.")
  26.     print("The computer is now blank. Goodbye!")
  27.     sleep(3)
  28.     os.shutdown()
  29. end
  30.  
  31. if confirmUninstall() then
  32.     uninstallOS()
  33. else
  34.     print("Uninstall canceled. Returning to home screen...")
  35.     sleep(2)
  36. end
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement