ugh. Does not work. It gives everyone +3 gold….no matter if they have bought the pass or not. This is what I am using.
This is the script I used:
local passId = 168833134;
function isAuthenticated(player)
return game:GetService("GamePassService"):PlayerHasPass(player, passId);
end
game.Players.PlayerAdded:connect(function(plr)
Leaderstats = plr:WaitForChild("leaderstats");
if isAuthenticated(plr) then
Spawn(function()
while wait(60) do
Leaderstats.Gold.Value=Leaderstats.Gold.Value+3;
end
end)
end
end)
|