Idk how to use playerownsgamepassasync so can someone show me the differents between old and new?
This is the updated version in this example, if you own the gamepass your cash will go up 1,000.
----------------- --- Variables --- ----------------- local Players = game:GetService('Players') ------------------ -- Gamepass Id --- ------------------ local gp= 5113033 game.Players.PlayerAdded:Connect(function(plr) if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId, gp) then for i, player in ipairs(Players:GetPlayers()) do local BPS = player.leaderstats.Cash BPS.Value = BPS.Value + 1000 end end end)
Developer Products:
local plr = game.Players.LocalPlayer local id = 0 -- change "0" to a developer product script.Parent.MouseButton1Down:Connect(function) game:GetService("MarketplaceService"):PromptProductPurchase(plr,id) end) -- This example is for a GUI, you'll see examples of this on tycoons--
The old version I don't know much about, but I am more familiar with the newer method. If this answers the question you had, please accept my answer. If you have questions please comment and I will get back to you as soon as possible.
Closed as Not Constructive by namespace25, pidgey, Internal_1, Thetacah, Igoralexeymarengobr, and Goulstem
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?