I have a gamepass called Collection of Coils. It basically gives the player who ones the gamepass a Regeneration Coil, a Gravity Coil, and a Speed Coil. I have the tools in a folder inside ReplicatedStorage. The folder is called Tools.
I used :UserOwnsGamePassAsync().
Here is my script:
local marketplace = game:GetService("MarketplaceService")
game.Players.PlayerAdded:Connect(function(player)
if marketplace:UserOwnsGamePassAsync(player.UserId,6565908) then
local items = game.ReplicatedStorage:FindFirstChild("Items")
if items then
for _,v in pairs(items:GetChildren()) do
v:Clone().Parent = player:WaitForChild("Backpack")
v:Clone().Parent = player:WaitForChild("StarterGear")
end
end
end
end)
Any help is appreciated. You can use a different gamepass ID. You don't need to buy mine :P

1 comment
Are there any errors? If not, can you check if you used the right Gamepass Id?