I don't want players to be able to enter the code again if they leave then rejoin. Would I need to use datastores?
local codes = script.Parent.Parent.Codes -- location of the codes
script.Parent.MouseButton1Down:Connect(function()
if script.Parent.Parent.codeBox.Text == "Alpha" then
if codes.Alpha.Value == true then
script.Parent.Parent.codeBox.Text = "Already Redeemed!"
end
if codes.Alpha.Value == false then
codes.Alpha.Value = true
game.Players.LocalPlayer.leaderstats.Credits.Value = game.Players.LocalPlayer.leaderstats.Credits.Value + codes.Alpha.Reward.Value -- change Credits to your currency's name and the number to how much you want to award them for entering the code.
script.Parent.Parent.codeBox.Text = "Redeemed!"
end
end
end)
Also my game is Filtering Enabled.

5 comments
What error do you get? You might need to add
.Valueto Alpha.RewardThanks.
And yes, you would need to use DataStores
Also, since you have fe, you would need to use a RemoteEvent to ask the server to change the money and handle the dataStore stuff
Ok, thanks!