Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

{solved} Is it possible to generate a random code? like 17Nh71 and so on

Asked by
raid6n 2196 Moderation Voter Community Moderator
4 years ago
Edited 4 years ago

I’m looking for a script to print random text. Thank you, my apologies for not sending a code, I just want to see if it’s possible.

1 answer

Log in to vote
0
Answered by
raid6n 2196 Moderation Voter Community Moderator
4 years ago

Here's a script for anyone who has the same problem as me

function GenerateRandom(symbols)
local letters={"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"}
local result, symbols = "", symbols or 6 --- (6) is the number of how many sybols
math.randomseed(tick() ~= nil and tick() or time())
for i=1,symbols do
local add = math.random(1,2)==1 and math.random(0,9) or letters[math.random(1,#letters)]:upper()
result = result..add
end
return result
end
while wait(1) do
print(GenerateRandom())
end
3
You can use httpservice:GenerateGUID(false) programmerHere 371 — 4y
0
true raid6n 2196 — 4y
Ad

Answer this question