local GamePassService = Game:GetService('GamePassService')
local GamePassId = --INSERT GAMEPASS ID HERE--
 
 
game.Players.PlayerAdded:connect(function(player)
        stats = Instance.new(''IntValue'', player)
        stats.Name = ''leaderstats''
       
        points = Instance.new(''IntValue'', stats)
        points.Name = ''Points''
       
        if GamePassService:PlayerHasPass(player, GamePassIdObject.Value) then
                points.Value = 50
        end
end)

What do i need to change to make the script to do what i want? what i want: I want that the script detects when a player have a certain gamepass, it will give the player 200 cash everytime they join if they have the gamepass, i have the following leaderboards : KO | WO | Cash I want the script to change the ''Cash'' from 0 to 200, but i don't know what changes i need to do!

2 comments

0

post the code here in a code block

0

thanks for the tip, i just added the code