I decided to add another code to my gui, the first code (Points) works great. The second, not so much. I put in "MorePoints", and it does nothing at all. It just says "MorePoints". Any ideas as to why this is happening? I'm also getting no errors whatsoever.
local box = script.Parent.Parent.CodeBox
local plr = script.Parent.Parent.Parent.Parent
local redeemed = false
box.FocusLost:connect(function()
if box.Text == "Points" or "MorePoints" and redeemed == false then
if box.Text == "Points" then
redeemed = true
box.Text = "Code Accepted!"
plr.leaderstats.Points.Value = plr.leaderstats.Points.Value + 50
wait(1)
box.Text = "Redeem Code"
elseif box.Text == "MorePoints" then
redeemed = true
box.Text = "Code Accepted!"
plr.leaderstats.Points.Value = plr.leaderstats.Points.Value + 100
wait(1)
box.Text = "Redeem Code"
elseif box.Text == "Points" or "MorePoints" and redeemed == true then
box.Text = "Already Used!"
wait(1)
box.Text = "Redeem Code"
else
box.Text = "Code Declined!"
wait(1)
box.Text = "Redeem Code"
end
end
end)

2 comments
Players.Player.PlayerGui.RedeemCode.CodeBox.CodeChecker:4: attempt to index global 'plr' (a nil value)
Nmv, thanks allot sir :D