MarketplaceService

extends Instance

Class fields

FieldXML typeValue
NamestringMarketplaceService
ExplorerImageIndexstring46

Functions

8
PromptNativePurchase
(player: Instance, productId: string) → void
FieldXML typeValue
NamestringPromptNativePurchase
PromptProductPurchase
(player: Instance, productId: int, equipIfPurchased: bool = …, currencyType: CurrencyType = …) → void
FieldXML typeValue
NamestringPromptProductPurchase
PromptPurchase
(player: Instance, assetId: int, equipIfPurchased: bool = …, currencyType: CurrencyType = …) → void
FieldXML typeValue
NamestringPromptPurchase
summarystringWill prompt 'player' to purchase the item associated with 'assetId'. 'equipIfPurchased' is an optional argument that will give the item to the player immediately if they buy it (only applies to gear). 'currencyType' is also optional and will attempt to prompt the user with a specified currency if the product can be purchased with this currency, otherwise we use the default currency of the product.
PromptThirdPartyPurchase
(player: Instance, productId: string) → void
FieldXML typeValue
NamestringPromptThirdPartyPurchase
SignalClientPurchaseSuccess
(ticket: string, playerId: int, productId: int) → void
FieldXML typeValue
NamestringSignalClientPurchaseSuccess
SignalPromptProductPurchaseFinished
(userId: int, productId: int, success: bool) → void
FieldXML typeValue
NamestringSignalPromptProductPurchaseFinished
SignalPromptPurchaseFinished
(player: Instance, assetId: int, success: bool) → void
FieldXML typeValue
NamestringSignalPromptPurchaseFinished
SignalServerLuaDialogClosed
(value: bool) → void
FieldXML typeValue
NamestringSignalServerLuaDialogClosed

Yield functions

3
GetDeveloperProductsAsync
() → Instance
FieldXML typeValue
NamestringGetDeveloperProductsAsync
GetProductInfo
(assetId: int, infoType: InfoType = …) → Dictionary
FieldXML typeValue
NamestringGetProductInfo
summarystringTakes one argument "assetId" which should be a number of an asset on www.roblox.com. Returns a table containing the product information (if this process fails, returns an empty table).
PlayerOwnsAsset
(player: Instance, assetId: int) → bool
FieldXML typeValue
NamestringPlayerOwnsAsset
summarystringChecks to see if 'Player' owns the product associated with 'assetId'. Returns true if the player owns it, false otherwise. This call will produce a warning if called on a guest player.

Events

12
ClientLuaDialogRequested
(arguments: Tuple) → void
FieldXML typeValue
NamestringClientLuaDialogRequested
ClientPurchaseSuccess
(ticket: string, playerId: int, productId: int) → void
FieldXML typeValue
NamestringClientPurchaseSuccess
LuaDialogCallbackSignal
(value: bool, player: Instance) → void
FieldXML typeValue
NamestringLuaDialogCallbackSignal
NativePurchaseFinished
(player: Instance, productId: string, wasPurchased: bool) → void
FieldXML typeValue
NamestringNativePurchaseFinished
PromptNativePurchaseRequested
(player: Instance, productId: string) → void
FieldXML typeValue
NamestringPromptNativePurchaseRequested
PromptProductPurchaseFinished
(userId: int, productId: int, isPurchased: bool) → void
FieldXML typeValue
NamestringPromptProductPurchaseFinished
PromptProductPurchaseRequested
(player: Instance, productId: int, equipIfPurchased: bool, currencyType: CurrencyType) → void
FieldXML typeValue
NamestringPromptProductPurchaseRequested
PromptPurchaseFinished
(player: Instance, assetId: int, isPurchased: bool) → void
FieldXML typeValue
NamestringPromptPurchaseFinished
summarystringFired when a 'player' dismisses a purchase dialog for 'assetId'. If the player purchased the item 'isPurchased' will be true, otherwise it will be false. This call will produce a warning if called on a guest player.
PromptPurchaseRequested
(player: Instance, assetId: int, equipIfPurchased: bool, currencyType: CurrencyType) → void
FieldXML typeValue
NamestringPromptPurchaseRequested
PromptThirdPartyPurchaseRequested
(player: Instance, productId: string) → void
FieldXML typeValue
NamestringPromptThirdPartyPurchaseRequested
ServerPurchaseVerification
(serverResponseTable: Dictionary) → void
FieldXML typeValue
NamestringServerPurchaseVerification
ThirdPartyPurchaseFinished
(player: Instance, productId: string, receipt: string, wasPurchased: bool) → void
FieldXML typeValue
NamestringThirdPartyPurchaseFinished

Callbacks

1
ProcessReceipt
(receiptInfo: Dictionary) → ProductPurchaseDecision
FieldXML typeValue
NamestringProcessReceipt
summarystringCallback that is executed for pending Developer Product receipts. If this function does not return Enum.ProductPurchaseDecision.PurchaseGranted, then you will not be granted the money for the purchase! The callback will be invoked with a table, containing the following informational fields: PlayerId - the id of the player making the purchase. PlaceIdWherePurchased - the specific place where the purchase was made. PurchaseId - a unique identifier for the purchase, should be used to prevent granting an item multiple times for one purchase. ProductId - the id of the purchased product. CurrencyType - the type of currency used (Tix, Robux). CurrencySpent - the amount of currency spent on the product for this purchase.