Can someone help my I made a car gamepass but it don't know how to code the kicker and the pop up?
I can use this 1 but i don't know how to find the "code/module of my car" can you help me guys?
local MarketplaceService = game:GetService("MarketplaceService") Seat:GetPropertyChangedSignal("Occupant"):Connect(function() if MarketPlaceService:UserOwnsGamePassAsync(27137596) then --whatever vehicle code/module else Seat.Occupant.Sit = false end end)
The only thing you need is, make a function(which the service already has it) to pop up the claim to buy the gamepass called :PromptGamePassPruchase(player, id)
; copy & paste this inside you script(I added some changes to it)
local MarketplaceService = game:GetService("MarketplaceService") local Players = game:GetService('Players') local id = 27137596 Seat:GetPropertyChangedSignal("Occupant"):Connect(function() if MarketPlaceService:UserOwnsGamePassAsync(id) then --whatever vehicle code/module else if Occupant:FindFirstChild('Humanoid') then -- verifies if the occupant has a humanoid(if is a player) local plr = Players:GetPlayerFromCharacter(Occupant) -- gets the player from the occupant of the seat(character) MarketplaceService:PromptGamePassPurchase(plr, id) -- prompts the gamepass claim to purchase it. Seat.Occupant = nil end end end)