Advertisement
Guest User

Rainbows!

a guest
Sep 14th, 2016
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1. function rainbow(args)
  2.         local str = ""
  3.         local colours = { "|cFF0000", "|cFF6600", "|cFFEE00", "|c00FF00", "|c0099FF", "|c4400FF", "|c9900FF" }
  4.         local pass = math.random(7)
  5.  
  6.         for char in args:gmatch"." do
  7.                     if char == " " then
  8.                     str = str .. char
  9.                     else
  10.                         str = str .. colours[pass] .. char
  11.                     if pass == #colours then pass = 1 end
  12.                     pass = pass + 1
  13.                     end
  14.         end
  15.  
  16.         return hecho(str)
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement