Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local gpu = component.gpu
- gpu.setResolution(80, 40)
- gpu.setBackground(0xFFFFFF)
- local rec = "nil"
- local del = 1
- local pos = 1
- local col = 0xFF0000
- local a = "L"
- local b = "o"
- local c = "a"
- local d = "d"
- local e = "i"
- local f = "n"
- local g = "g"
- function changeColor()
- if col == 0xFF0000 then
- col = 0xFF9900
- elseif col == 0xFF9900 then
- col = 0xFFFF00
- elseif col == 0xFFFF00 then
- col = 0x00FFFF
- elseif col == 0x00FFFF then
- col = 0x0099FF
- elseif col == 0x0099FF then
- col = 0x0000FF
- elseif col == 0x0000FF then
- col = 0xFF0099
- elseif col == 0xFF0099 then
- col = 0xFF0000
- else
- col = 0x000000
- end
- end
- function renderText()
- gpu.setBackground(0xFFFFFF)
- gpu.fill(1, 2, 20, 1, " ")
- changeColor()
- gpu.setForeground(color)
- gpu.set(pos, 2, a)
- pos = pos+1
- changeColor()
- gpu.setForeground(color)
- gpu.set(pos, 2, b)
- pos = pos+1
- changeColor()
- gpu.setForeground(color)
- gpu.set(pos, 2, c)
- pos = pos+1
- changeColor()
- gpu.setForeground(color)
- gpu.set(pos, 2, d)
- pos = pos+1
- changeColor()
- gpu.setForeground(color)
- gpu.set(pos, 2, e)
- pos = pos+1
- changeColor()
- gpu.setForeground(color)
- gpu.set(pos, 2, f)
- pos = pos+1
- changeColor()
- gpu.setForeground(color)
- gpu.set(pos, 2, g)
- end
- while del ~= 10 do
- renderText()
- del = del+1
- os.sleep(0.5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement