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
Try this i think the problem is that you said the folder was called "Tools" but in your code it searches ReplicatedStorage for "Items"
local MarketPlaceService = game:GetService("MarketplaceService") game.Players.PlayerAdded:Connect(function(player) if MarketPlaceService:UserOwnsGamePassAsync(player.UserId,6565908) then local Items = game:GetService('ReplicatedStorage'):WaitForChild("Tools") 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)