Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local w, h = 80, 25
- local component = require("component")
- local event = require("event")
- local term = require("term")
- local gpu = component.gpu
- function getCenterWidth(text)
- return ((80 - #text)/2)+1
- end
- gpu.setResolution(80, 25)
- term.clear()
- function printLine(y)
- gpu.setBackground(0xFF0000)
- gpu.fill(1, y, 80, 1, " ")
- end
- function drawWarning(yBeg)
- printLine(yBeg)
- gpu.setBackground(0x000000)
- gpu.setForeground(0xFFFFFF)
- local warning = ("WARNING "):rep(11)
- term.setCursor(getCenterWidth(warning), yBeg+1)
- term.write(warning)
- printLine(yBeg+2)
- gpu.setBackground(0x000000)
- gpu.setForeground(0xFFFFFF)
- end
- local my = 4
- local mh = 19
- local line1 = "YOU ARE ENTERING A SECURED AREA"
- term.setCursor(getCenterWidth(line1), my+((19)/2)-2)
- term.write(line1)
- local line2 = "ANY ATTEMPT TO ENTER WITHOUT AUTHORIZATION CONSTITUTES A BREACH OF SECURITY"
- term.setCursor(getCenterWidth(line2), my+((19)/2)-1)
- term.write(line2)
- local line3 = "VIOLATORS WILL BE PROSECUTED"
- term.setCursor(getCenterWidth(line3), my+((19)/2))
- term.write(line3)
- drawWarning(1)
- drawWarning(23)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement