Advertisement
DOGGYWOOF

Untitled

Jul 2nd, 2024 (edited)
6
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. -- Clear the screen and set up colors
  2. term.clear()
  3. term.setBackgroundColor(colors.black)
  4. term.setTextColor(colors.white)
  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 SYSTEM ERROR! ",
  22. " | <> _ ",
  23. " | _/\\------____ ((| |))",
  24. " | `--' | ",
  25. " _____|_ ___| |___. ",
  26. "/_/_____/____/_______| "
  27. }
  28.  
  29. local startLine = math.floor((height - #dogArt) / 2) - 2
  30.  
  31. -- Display the dog ASCII art with red Xes for eyes in red
  32. term.setTextColor(colors.red)
  33. for i, line in ipairs(dogArt) do
  34. centerText(startLine + i, line, colors.red)
  35. end
  36.  
  37. -- Display error message below the dog ASCII art in white
  38. term.setTextColor(colors.white)
  39. centerText(startLine + #dogArt + 2, "Fatal startup failure", colors.white)
  40. centerText(startLine + #dogArt + 3, "Error code: C633", colors.white)
  41.  
  42. -- Move "Please contact support." to the bottom in white
  43. centerText(height - 2, "Please contact support.", colors.white)
  44.  
  45. -- Keep the screen static with the error message
  46. while true do
  47. sleep(1)
  48. end
  49.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement