script: local GamePassService = game:GetService('GamePassService') local CatGamepass = 26348478
script.Parent.MouseButton1Click:Connect(function(player)
if GamePassService:PlayerHasPass(player, CatGamepass, true) then
player.leaderstats.FaceValue.Value = "Uwu"
else
game:GetService("MarketplaceService"):PromptPurchase(player, CatGamepass)
end
end)
MouseButton1Click
doesn't return a player object.
If this is a localscript, you can do game.Players.LocalPlayer
local GamePassService = game:GetService('GamePassService') local CatGamepass = 26348478 local player = game.Players.LocalPlayer script.Parent.MouseButton1Click:Connect(function() if GamePassService:PlayerHasPass(player, CatGamepass, true) then player.leaderstats.FaceValue.Value = "Uwu" else game:GetService("MarketplaceService"):PromptPurchase(player, CatGamepass) end end)
Btw, since I don't really know about marketplaceservice, IDK if the argument is correct.
the only thing I see is that you put an invalid argument for the player part
also, please use the code block feature next time..