I have a script that's supposed to give you 500 points when you join if you have a gamepass, and 1000 points when you join if you have another or both.
game.Players.PlayerAdded:connect(function(plr)
local p = Instance.new('IntValue',plr)
p.Name = 'Points'
if game:GetService("MarketplaceService"):PlayerOwnsAsset(plr,252253525 --[[ 500 points ]]) then
if not game:GetService("MarketplaceService"):PlayerOwnsAsset(plr,252255271) then
p.Value = 500
end
elseif game:GetService("MarketplaceService"):PlayerOwnsAsset(plr,252255271 --[[ 1000 points ]]) then
p.Value = 1000
else
p.Value = 0
end
end)
The thing is I get 0 points when I join and I have both. There are no errors either.
I'm also new to gamepasses and MarketplaceService

2 comments
Didn't think of a leaderboard setup but I'll try... http://gyazo.com/ec4a6378999fdb5372474ff2d5cf98fa is what i want the game to look like.
If you want something like that then there's no need for a leaderboard setup(: That was just in case you were meaning for this to be on a roblox leaderboard,