BTRMarket is a drop-in replacement and wrapper for MarketplaceService
All methods are the same as in MarketplaceService except the ones listed here
Event
PromptGamePassPurchaseFinished
π Modified Event
player: Player, gamePassId: number, wasPurchased: boolean, wasPurchasedAtPrice: number = BTRMarketPromptGamePassPurchaseFinished:Wait()
Fires when a purchase prompt for a pass is closed.
Callback
ProcessGamePassReceipt
π New Callback
π° Similar to ProcessReceipt
ProcessGamePassReceipt(receiptInfo: {CurrencySpent: bool, CurrencyType: Enum.CurrencyType, PlaceIdWherePurchased: number, PlayerId: number, ProductId: number, ProductPurchaseChannel: Enum.ProductPurchaseChannel, PurchaseId: string})
Fires when a purchase prompt for a pass has resulted in a purchase.
To use BTRMarket simply replace Marketplace Service with the required BTRMarket Module.
- local MarketplaceService = game:GetService("MarketplaceService")
+ local MarketplaceService = require(117516134763004)
The module is also available on github
1 Like
very nice module, however something i believe u should change:
repeat task.wait() until Disconnect
you can just do:
local Con
Con = BTRMarket.Services.Marketplace.PromptGamePassPurchaseFinished:Connect(function(xplayer: Player, xgamePassId: number, xwasPurchased: boolean)
if not ( xplayer == player ) and ( xgamePassId == gamePassId ) then return end
Con:Disconnect()
unless im missing anything this should work the same
This wont work as Con
wonβt be assigned at the time of making the connection, so the Con:Disconnect()
will appear as an error as Con dosent exist yet
This would be the case if youre doing what youre doing, but if youre indexing Con before and setting con on connection it will assign it
This will work:
local Con
Con = UIS.InputBegan:Connect(function()
Con:Disconnect()
end)
This will not work:
local Con = UIS.InputBegan:Connect(function()
Con:Disconnect()
end)
1 Like
Well that would work but i wonβt implement it until i add more features.
What is the point of this? Why would anyone use this over MarketplaceService?
uhh like the added methods, you can like get the real price that the player paid for a gamepass cuz of the new regional pricing update that only shows the discounted amnt to the player and not the server