local gampass_id = 35168372
script.Parent.MouseButton1Click:Connect(function() game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer, gampass_id)
end)
If you want to make a gamepass for speed use this
game.Players.PlayerAdded:Connect(function(plr) local speed = 30 wait(1) local ownsGamepass = game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId, 35168372) if ownsGamepass then plr.Character.Humanoid.WalkSpeed = speed end end)
I think that's how it works..