New gamepass functions

I want to change to update my old gamepasses but due the changes to gamepass the script is broken
this is the script:
id = 4891566

local nome = “VIPbox”

game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(character)
if game:GetService(“MarketplaceService”):PlayerOwnsAsset(plr, id) then
print(‘works’)
plr:WaitForChild(‘Backpack’)
game.Lighting[nome]:Clone().Parent = plr.Backpack
end
end)
end)

im really bad doing scripts

1 Like

There are new functions you have to use.

2 Likes

Thanks.

Happy cake day by the way.

You should mark his comment as the solution.

Also as a side note, people are probably more likely to change your code if you show you’ve tried to find a solution (such as googling the functions that you’ve used to see if they’re deprecated and then try to find the new method).

1 Like

Happy DevForum birthday

1 Like