Erm...
#5
Lua isn't just good for games...

[lua]text="I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. I have too much time on my hands. "

rpad = function(str, len, char)
if char == nil then char = ' ' end
return string.rep(char, len - str:len()) .. str
end


function Dec2Hex(nValue)
if type(nValue) == "string" then
nValue = String.ToNumber(nValue);
end
nHexVal = string.format("%X", nValue); -- %X returns uppercase hex, %x gives lowercase letters
sHexVal = nHexVal.."";
return sHexVal;
end
r = ""
for i=1, text:len() do
char = textConfusedub(i, i)
x = i / text:len()
v = x * 255
w = 255 - v
color = Dec2Hex(v)
color2 = Dec2Hex(w)
r = r.."[color=#"..rpad(color,2,"0").."00"..rpad(color2,2,"0").."]"..char.."[/color]"
end
script.Source = r[/lua]
Reply


Messages In This Thread
Erm... - by Excel - 10-02-2011, 04:31 AM

Forum Jump:


Users browsing this thread: 6 Guest(s)