Advertisement
DOGGYWOOF

Boot Error

Jul 2nd, 2024 (edited)
11
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. -- Clear the screen and set up colors
  2. term.clear()
  3. term.setBackgroundColor(colors.black)
  4. term.setTextColor(colors.red)
  5. term.clear()
  6.  
  7. -- Define the width and height of the screen
  8. local width, height = term.getSize()
  9.  
  10. -- Helper function to center text on the screen
  11. local function centerText(y, text, textColor)
  12. local x = math.floor((width - #text) / 2)
  13. term.setCursorPos(x, y)
  14. term.setTextColor(textColor)
  15. term.write(text)
  16. end
  17.  
  18. -- Display the dog ASCII art with red Xes for eyes
  19. local dogArt = {
  20. " |\\_/| ",
  21. " | X X Woof! ",
  22. " | <> _ ",
  23. " | _/\\------____ ((| |))",
  24. " | `--' | ",
  25. " _____|_ ___| |___. ",
  26. "/_/_____/____/_______| "
  27. }
  28.  
  29. local startLine = math.floor((height - #dogArt) / 2) - 2
  30.  
  31. for i, line in ipairs(dogArt) do
  32. centerText(startLine + i, line, colors.red)
  33. end
  34.  
  35. -- Display error message below the dog ASCII art
  36. centerText(startLine + #dogArt + 2, "Doggy OS Cannot boot due to missing system files", colors.red)
  37. centerText(startLine + #dogArt + 3, "Please contact support.", colors.white)
  38.  
  39. -- Flashing error message at the bottom
  40. local flashing = true
  41. while true do
  42. if flashing then
  43. centerText(height, "", colors.black)
  44. else
  45. centerText(height, "", colors.black)
  46. end
  47. flashing = not flashing
  48. sleep(0.5)
  49. end
  50.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement