local button = script.Parent.Parent local box = button.Parent.CodeBox local code = "Code" local code2 = "Code2" local code3 = "Code3" local redeedmed = false button.MouseButton1Click:Connect(function(plr) if box.Text == code and redeedmed == false then redeedmed = true button.Text = "Success" game.Players.LocalPlayer.Strength.Value = game.Players.LocalPlayer.Strength.Value + 50 game.Players.LocalPlayer.Money.Value = game.Players.LocalPlayer.Money.Value + 25 wait(2) button.Text = "Submit" return true end if box.Text == code2 and redeedmed == false then redeedmed = true button.Text = "Successfully redeemed!" game.Players.LocalPlayer.Strength.Value = game.Players.LocalPlayer.Strength.Value + 50 game.Players.LocalPlayer.Money.Value = game.Players.LocalPlayer.Money.Value + 25 wait(2) button.Text = "Submit" return true end if box.Text == code3 and redeedmed == false then redeedmed = true button.Text = "Successfully redeemed!" game.Players.LocalPlayer.Strength.Value = game.Players.LocalPlayer.Strength.Value + 50 game.Players.LocalPlayer.Money.Value = game.Players.LocalPlayer.Money.Value + 25 wait(2) button.Text = "Submit" return true else button.Text = "Invalid" wait(2) button.Text = "Submit" return false end end)
Did you check if your pathing was correct? If it was correct, please use WaitForChild as the TextBox may not be ready when the script runs.