So I was making a game and I decided to make a code GUI so I made the GUI and everything and then at the end my script didnt work I tried and tried I did it in a function so I dont know if that would effect it but yeah so here is my script:
local plr = game.Players.LocalPlayer
local codesbox = script.Parent.Parent.TextBox
local function codesCheck()
if codesbox.Text == “RELEASE” then
plr.leaderstats.Money.Value = plr.leaderstats.Money.Value + 1000
codesbox.Text = “Code Redeem!”
wait(1)
codesbox.Text = “Type Code Here”
elseif
codesbox.Text == “HAPPY2021” then
plr.leaderstats.Money.Value = plr.leaderstats.Money.Value + 500
codesbox.Text = “Code Redeem!”
wait(1)
codesbox.Text = “Type Code Here”
else
codesbox.Text = “Code is invalid please try again”
wait(1)
codesbox.Text = “Type Code Here”
end
end
codesCheck()
the code is inside a redeem GUI it doesnt even say anything in the output so I dont know whats wrong.