What solutions have you tried so far? Did you look for solutions on the Creator Hub?
still looking for solution
local player = game.Players.LocalPlayer
local module = require(game.ReplicatedStorage.Abbreviations)
local id = 24229407
while task.wait() do
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId,id) then
script.Parent.Text = "Gems x "..module.abbreviate(player.RankMultiplier.Value * 2 * player.Level.Value)
else
script.Parent.Text = "Gems x "..module.abbreviate(player.RankMultiplier.Value * player.Level.Value)
end
end
game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr, id, wp)
if wp then
-- woah they bought the gamepass
-- actually i reread the docs you should probably check if they own the gamepass
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId, id) then
-- ok they definitely own the gamepass now
end
end
end
You’re super close! The second value passed from PromptGamePassPurchaseFinished is actually the gamepass asset id. The @OP could compare the asset id against their gamepass id, and do the change from there. The only caveat that I can foresee though is that this may only be server-sided.
local GamepassId = 24229407
local MarketplaceService = game:GetService("MarketplaceService")
local function GamePassPurchased(Customer, AssetId, WasPurchased)
if WasPurchased and AssetId == GamepassId then
-- code
end
end
MarketplaceService.PromptGamePassPurchaseFinished:Connect(GamePassPurchased)
Have a singular script manage all the changes of currency. When you want to add currency or remove currency you can call a remote to that. For multipliers you can check if the player has the certain gamepass that boosts multiplier. If they do have this gamepass store that information in that currency manager so that whenever you add currency you append that multiplier too