Ok so I have this script, and it's supposed to change the text of a gui button if the player has the pass. It's inside a localscript in the PlayerGui inside of a ScreenGui. It won't do anything when I click it. Can anyone help?
id = script.id
function ifPass()
if game:GetService("GamePassService"):PlayerHasPass(game.Players.LocalPlayer, id.Value)then
script.Parent.Text = "Equip"
print('yep')
elseif not game:GetService("GamePassService"):PlayerHasPass(game.Players.LocalPlayer, id.Value) then
script.Parent.Text = "Buy"
print('nope')
end
end
ifPass()
script.Parent.MouseButton1Click:connect(ifPass)
