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.red)
- 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
- -- Display the dog ASCII art with red Xes for eyes
- local dogArt = {
- " |\\_/| ",
- " | X X Woof! ",
- " | <> _ ",
- " | _/\\------____ ((| |))",
- " | `--' | ",
- " _____|_ ___| |___. ",
- "/_/_____/____/_______| "
- }
- local startLine = math.floor((height - #dogArt) / 2) - 2
- for i, line in ipairs(dogArt) do
- centerText(startLine + i, line, colors.red)
- end
- -- Display error message below the dog ASCII art
- centerText(startLine + #dogArt + 2, "Doggy OS Cannot boot due to missing system files", colors.red)
- centerText(startLine + #dogArt + 3, "Please contact support.", colors.white)
- -- Flashing error message at the bottom
- local flashing = true
- while true do
- if flashing then
- centerText(height, "", colors.black)
- else
- centerText(height, "", colors.black)
- end
- flashing = not flashing
- sleep(0.5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement