Advertisement
KingofGamesYami

Pulse V2

Sep 6th, 2015
654
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.84 KB | None | 0 0
  1. local chartbl = {"*","%","@"}
  2. local colortbl = {colors.blue, colors.lightBlue, colors.cyan, colors.green, colors.lime, colors.yellow, colors.pink, colors.magenta, colors.purple, colors.blue}
  3.  
  4. local curCol, incCol, reverse, maxx, maxy = 1, 1, false, term.getSize()
  5.  
  6. local function advClear( c, b, t )
  7.     term.setBackgroundColor( b )
  8.     term.setTextColor( t )
  9.     write( "\n" .. c:rep( maxx ) .. "\n" .. c:rep( maxx ) )
  10. end
  11.  
  12. term.setCursorPos( 1, maxy )
  13.  
  14. while true do
  15.     for theChar = 1, #chartbl do
  16.         advClear( chartbl[ theChar ], colortbl[ curCol ], colortbl[ curCol + (1) ] or colortbl[ 1 ] )
  17.         sleep( 0.05 )
  18.     end
  19.     for theChar = #chartbl, 1, -1 do
  20.         advClear( chartbl[ theChar ], colortbl[ curCol + (1) ] or colortbl[ 1 ], colortbl[ curCol ]  )
  21.         sleep( 0.05 )
  22.     end
  23.     curCol = curCol + 1
  24.     if curCol == #colortbl then
  25.         curCol = 1
  26.     end
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement