Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local chartbl = {"*","%","@"}
- local colortbl = {colors.blue, colors.lightBlue, colors.cyan, colors.green, colors.lime, colors.yellow, colors.pink, colors.magenta, colors.purple}
- local curCol, incCol, reverse, maxx, maxy = 1, 1, false, term.getSize()
- local function advClear( c, b, t )
- term.setBackgroundColor( b )
- term.setTextColor( t )
- for y = 1, maxy do
- term.setCursorPos( 1, y )
- term.write( c:rep( maxx ) )
- end
- end
- while true do
- for theChar = (reverse and #chartbl or 1), (reverse and 1 or #chartbl), (reverse and -1 or 1) do
- advClear( chartbl[ theChar ], colortbl[ curCol ], colortbl[ curCol + (reverse and -1 or 1) ] )
- sleep( 0.05 )
- end
- for theChar = (reverse and 1 or #chartbl), (reverse and #chartbl or 1), (reverse and 1 or -1 ) do
- advClear( chartbl[ theChar ], colortbl[ curCol + (reverse and -1 or 1) ], colortbl[ curCol ] )
- sleep( 0.05 )
- end
- curCol = curCol + (reverse and -1 or 1)
- if curCol == 1 or curCol == #colortbl then
- reverse = not reverse
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement