local ID = 0
local MarketplaceService = game:GetService("MarketplaceService")
MarketplaceService.PromptGamePassPurchaseFinished:Connect(function(plr, ido, purchased)
if purchased and ido == ID then
-- code?
end
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:connect(function(char)
if MarketplaceService:UserOwnsGamePassAsync(game.Players[char.Name].UserId, ID) then
-- code?
end
i want to make a script where you buy a gamepass and a tool is given to the player right then and there. i know how to check if the player has it but i dont know what to do next and i want to understand it so can someone help me?
whoever helps me gets solution mark