Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.wrap("back")
- mon.setTextScale(2)
- mon.setBackgroundColor(colors.black)
- mon.setCursorPos(1,1)
- mon.clear()
- local businessName = "Cruck's Computers"
- local w, h = mon.getSize()
- center = math.floor(w/2 + (string.len(businessName)/1.5))-string.len(businessName)-2
- function linesIn()
- mon.setBackgroundColor(colors.black)
- mon.setTextColor(colors.white)
- mon.clear()
- for wid = 1, w do
- for lin = 1, h do
- if lin % 2 == 0 then
- mon.setBackgroundColor(colors.gray)
- if lin == math.floor(h/2) then
- if wid < math.floor(w/2 + (string.len(businessName)/1.5))-1 then
- mon.setCursorPos(wid-string.len(businessName)-1, lin)
- mon.write(" "..businessName)
- end
- end
- mon.setCursorPos(wid, lin)
- else
- mon.setBackgroundColor(colors.lightGray)
- mon.setCursorPos(w-wid+1,lin)
- end
- mon.write(" ")
- end
- sleep(0.075)
- end
- end
- function flashLines()
- mon.setBackgroundColor(colors.black)
- mon.setTextColor(colors.white)
- mon.clear()
- for i = 1, 15 do
- for lin = 1, h do
- if (i + lin) % 2 == 0 then
- mon.setBackgroundColor(colors.gray)
- else
- mon.setBackgroundColor(colors.lightGray)
- end
- mon.setCursorPos(1,lin)
- mon.clearLine()
- if lin == math.floor(h/2) then
- mon.setCursorPos(center, lin)
- mon.write(businessName)
- end
- end
- sleep(0.5)
- end
- end
- function lineCycle()
- linesIn()
- flashLines()
- sleep(10)
- end
- function unscramble()
- mon.setBackgroundColor(colors.black)
- mon.setTextColor(colors.white)
- mon.clear()
- dat = {}
- temp = {}
- for i = 1, string.len(businessName) do
- dat[i] = string.sub(businessName, i, i)
- temp[i] = string.sub(businessName, i, i)
- end
- for i = 1, #temp do
- temp[i] = tostring(math.random(1,9))
- end
- mon.setCursorPos(center,math.floor(h/2))
- mon.write(table.concat(temp))
- for i = 1, #dat do
- for j = 1, 5 do
- temp[i] = tostring(math.random(1,9))
- mon.setCursorPos(center+i-1,math.floor(h/2))
- mon.write(temp[i])
- sleep(0.05)
- end
- temp[i] = dat[i]
- mon.setCursorPos(center+i-1,math.floor(h/2))
- mon.write(temp[i])
- end
- sleep(20)
- end
- function randomDots()
- mon.setBackgroundColor(colors.black)
- mon.setTextColor(colors.white)
- mon.clear()
- for i = 1, 50 do
- x = math.random(2, w-1)
- y = math.random(2, h-1)
- color = nil
- while color == nil or color == colors.gray or color == colors.brown do
- color = 1*2^math.random(0, 15)
- end
- mon.setBackgroundColor(color)
- mon.setCursorPos(x,y)
- mon.write(" ")
- mon.setCursorPos(x-1, y)
- mon.write(" ")
- mon.setCursorPos(x, y+1)
- mon.write(" ")
- mon.setCursorPos(x, y-1)
- mon.write(" ")
- mon.setCursorPos(x+1, y)
- mon.write(" ")
- sleep(0.1)
- end
- mon.setBackgroundColor(colors.black)
- mon.setCursorPos(center, h/2)
- mon.write(businessName)
- sleep(10)
- end
- function arrowDown()
- mon.setBackgroundColor(colors.black)
- mon.setTextColor(colors.yellow)
- mon.clear()
- term.redirect(mon)
- arr = paintutils.loadImage("arrow")
- for i = 1, 40 do
- pos = 0
- if i % 4 ~= 0 then
- pos = i%4
- else
- pos = 2
- end
- term.setBackgroundColor(colors.black)
- term.clear()
- paintutils.drawImage(arr, 1, pos+3)
- term.setBackgroundColor(colors.black)
- term.setCursorPos(center, pos+2)
- term.write(businessName)
- sleep(0.5)
- end
- term.redirect(term.native())
- sleep(1)
- end
- comms = {lineCycle, unscramble, randomDots, arrowDown}
- while true do
- comms[math.random(1,#comms)]()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement