Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Clear the screen and set up colors
- term.clear()
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.white)
- term.clear()
- -- Define the width and height of the screen
- local width, height = term.getSize()
- -- Helper function to center text on the screen
- local function centerText(y, text, textColor)
- local x = math.floor((width - #text) / 2)
- term.setCursorPos(x, y)
- term.setTextColor(textColor)
- term.write(text)
- end
- -- Define the dog ASCII art with white color and @ for eyes
- local dogArt = {
- " |\\_/| ",
- " | @ @ ",
- " | <> _ ",
- " | _/\\------____ ((| |))",
- " | `--' | ",
- " _____|_ ___| |___. ",
- "/_/_____/____/_______| "
- }
- local startLine = math.floor((height - #dogArt) / 2) - 2
- -- Display the dog ASCII art with white color
- term.setTextColor(colors.white)
- for i, line in ipairs(dogArt) do
- centerText(startLine + i, line, colors.white)
- end
- -- Display the "Repairing System Bootloader..." message in white
- centerText(startLine + #dogArt + 2, "Repairing System Bootloader...", colors.white)
- -- Wait for 10 seconds to simulate the repair process
- sleep(10)
- -- Delete existing startup and no-os files
- fs.delete("/startup")
- fs.delete("/no-os")
- -- Copy the recovery files to the root directory
- fs.copy("/recovery/boot/error", "/startup")
- fs.copy("/recovery/bootloader/no-os.lua", "/no-os")
- -- Display the "Repair Completed. Rebooting..." message in white
- centerText(startLine + #dogArt + 4, "Repair Completed. Rebooting...", colors.white)
- -- Wait for 3 seconds before rebooting
- sleep(3)
- -- Reboot the system
- os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement