Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can someone please show me a difference between the old gamepass shop to the new one? [closed]

Asked by 5 years ago

Idk how to use playerownsgamepassasync so can someone show me the differents between old and new?

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?

1 answer

Log in to vote
-1
Answered by
Vxpper 101
5 years ago
Edited 5 years ago

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.

0
Do you know how to use dev products? gueli844 -1 — 5y
0
I sure do specifically what for dev products? Vxpper 101 — 5y
0
the code for dev products, i also forgot how to do it gueli844 -1 — 5y
0
Sure no problem Vxpper 101 — 5y
Ad