Freack100

Rainbow-Ish Test

Apr 5th, 2015
410
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.70 KB | None | 0 0
  1. local function fill(col)local w,h=term.getSize()local x1,y1,x2,y2=1,1,1,1 local colIndex=1 local function increase()x1,y2=x1+1,y2+1
  2. end
  3. while(x1-20)<w do
  4. paintutils.drawLine(x1,y1,x2,y2,col[colIndex])increase()colIndex=colIndex+1 if(colIndex>#col)then colIndex=1 end
  5. end
  6. end
  7. local colorModes={rainbow={colors.red,colors.orange,colors.yellow,colors.green,colors.lightBlue,colors.blue,colors.purple},black_white={colors.white,colors.black},blue={colors.blue,colors.lightBlue},green={colors.green,colors.lime},fire={colors.red,colors.orange,colors.yellow}}
  8. ----------------------------------
  9. local mode = colorModes[string.lower(...)]
  10. ----------------------------------
  11.  
  12. while true do
  13. fill(mode)sleep(.1)
  14. end
Advertisement
Add Comment
Please, Sign In to add comment