arg = {...}
if #arg == 0 then
print("Usage: random <length>")
return exit
end
all = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
e = ""
for i = 1, tonumber(arg[1]) do
r = math.random(#all)
e = e.. string.sub(all, r, r)
end
print(e)
What it does: Generates random strings when you type in a length! Amazing!
:mellow:/>
Something interesting…
Spoiler
If you blur your eyes and look at this whilst its running you can sometimes see faces!
all = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
e = ""
while true do
for i = 1, 51 do
r = math.random(#all)
e = e.. string.sub(all, r, r)
end
print(e)
sleep(0.1)
end
Don't believe me? Take a look.