local plr = game.Players.LocalPlayer
local Reward = script.Parent.Parent.Reward
local clicked = false
local codetable = {
code1 = "Release" or "release",
code2 = "Welcome" or "welcome",
}
local rewardtable = {
code1 = 500,
code2 = 5
}
script.Parent.MouseButton1Click:Connect(function()
if script.Parent.Parent.CodeHandle.Text == codetable.code1 and clicked == false then
clicked = true
plr.leaderstats.Clicks.Value = plr.leaderstats.Clicks.Value +rewardtable.code1
plr.boolvalstats.Release.Value = true
Reward.Text = "Congratulations! You got a " ..rewardtable.code1
Reward.Visible = true
wait(1.5)
Reward.Visible = false
Reward.Text = "Congratulations! You got a..."
elseif plr.boolvalstats.Release.Value == true then
script.Parent.Parent.CodeHandle.Text = "Code Has Already Been Reedeemed"
clicked = false
wait(1.5)
script.Parent.Parent.CodeHandle.Text = "Enter Code"
else
script.Parent.Parent.CodeHandle.Text = "Code is Valid Please Try Again"
clicked = false
wait(1.5)
script.Parent.Parent.CodeHandle.Text = "Enter Code"
end
end)
COMMUNITY QUESTION
It gives me 500 everytime i type to Text how to i make this one time only?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
I would like to know what it is you're trying to do. Just because you post a question and script doesn't mean we will do it for you. Without knowing the context, we will not be able to help you.