I've made a key generator for 1-time uses and it only errors, without making the textlabel have its key.
Why?
local keygen = {
math.random(1,10000)
}
script.Parent.MouseButton1Click:Connect(function(generatekey)
local genkey = generatekey
generatekey = true
if generatekey == true then
script.Parent.Parent.TextLabel.Text = keygen
end
end)
Heres an error: 20:46:57.567 - Players.ChronoFantastic.PlayerGui.ScreenGui.TextButton.Script:8: bad argument #3 to 'Text' (string expected, got table)

4 comments
Oh and, i want to let you know that the keygen basically has numbers and letters.
turn keygen into a function that returns the random number, and i have no idea what you meant by "not string" (btw generatekey will always be true since you set it on the previous line, this is not how you debounce anything)
what?
oh wait no youre printing the address of the table "keygen" let me post an answer