Gamepass script never works

It never works and I don’t know why
speed coil gamepass
local MarketPlaceService = game:GetService(“MarketplaceService”)
local GamepassID = 95654024

game.Players.PlayerAdded:Connect(function(player)
if MarketPlaceService:UserOwnsGamePassAsync(player.UserId GamepassID) then
game.ServerStorage.SpeedCoil:Clone().Parent = player:WaitForChild(“Backpack”)
game.ServerStorage.SpeedCoil:Clone().Parent = player:WaitForChild(“StarterGear”)
end
end)

gravity coil gamepass
local MarketPlaceService = game:GetService(“MarketplaceService”)
local GamepassID = 95659937

game.Players.PlayerAdded:Connect(function(player)
if MarketPlaceService:UserOwnsGamePassAsync(player.UserId GamepassID) then
game.ServerStorage.SpeedCoil:Clone().Parent = player:WaitForChild(“Backpack”)
game.ServerStorage.SpeedCoil:Clone().Parent = player:WaitForChild(“StarterGear”)
end
end)

Search for some videos on YouTube, there’s a lot of videos about how to make a gamepass work (and give the item you want).

if MarketPlaceService:UserOwnsGamePassAsync(player.UserId,GamepassID) then not if MarketPlaceService:UserOwnsGamePassAsync(player.UserId GamepassID) then
, is missing.

Try this:

Spee coil pass

local MarketPlaceService = game:GetService("MarketplaceService")
local GamepassID = 95654024

game.Players.PlayerAdded:Connect(function(player)
if MarketPlaceService:UserOwnsGamePassAsync(player.UserId, GamepassID) then
game.ServerStorage.SpeedCoil:Clone().Parent = player:WaitForChild("Backpack")
game.ServerStorage.SpeedCoil:Clone().Parent = player:WaitForChild("StarterGear")
end
end)

Gravity Coil pass

local MarketPlaceService = game:GetService("MarketplaceService")
local GamepassID = 95659937

game.Players.PlayerAdded:Connect(function(player)
if MarketPlaceService:UserOwnsGamePassAsync(player.UserId, GamepassID) then
game.ServerStorage.GravityCoil:Clone().Parent = player:WaitForChild("Backpack")
game.ServerStorage.GravityCoil:Clone().Parent = player:WaitForChild("StarterGear")
end
end)

thanks doc, it actually worked!

1 Like