Properties
bool
|
Determines if an |
string
[ReadOnly]
[NotReplicated]
|
A read-only string representing the class this |
int
[Hidden]
[ReadOnly]
[NotReplicated]
[Deprecated]
|
The cost of saving the instance using data persistence. |
string
|
A non-unique identifier of the |
Instance
[NotReplicated]
|
Determines the hierarchical parent of the |
bool
[Hidden]
|
A deprecated property that used to protect |
int64
[Hidden]
[NotReplicated]
|
bool
[Hidden]
[NotReplicated]
[Deprecated]
|
string
[ReadOnly]
[NotReplicated]
[Deprecated]
|
Functions
Instance
[Yields]
|
Returns a |
Dictionary
[Yields]
|
Returns the product information of an asset using its assetId |
int
[Yields]
|
bool
[Yields]
|
Dictionary
[Yields]
|
bool
|
bool
[Yields]
|
Returns whether the given player has the given asset. |
void
|
Used to prompt a user to purchase a bundle with the given bundleId |
void
|
Used to prompt a user to purchase a game pass with the given assetId. |
void
|
void
|
Used to prompt a user to purchase Premium |
void
|
Used to prompt a user to purchase a product with the given product id. |
void
|
Used to prompt a user to purchase an item with the given assetId. |
void
|
void
|
void
|
void
|
Prompts a third-party purchase. |
void
|
void
|
void
|
void
|
void
|
void
|
void
|
void
|
void
|
void
|
void
|
void
|
void
|
bool
[Yields]
|
Returns true if the player with the given |
void
|
This function destroys all of an |
Instance
|
Create a copy of an object and all its descendants, ignoring objects that are not |
void
|
Sets the |
Instance
|
Returns the first ancestor of the |
Instance
|
Returns the first ancestor of the |
Instance
|
Returns the first ancestor of the |
Instance
|
Returns the first child of the |
Instance
|
Returns the first child of the |
Instance
|
Returns the first child of the |
Instance
|
Returns the first descendant found with the given |
Actor
|
Returns the Actor associated with the Instance, usually the first Actor ancestor |
Variant
|
Returns the attribute which has been assigned to the given name |
RBXScriptSignal
|
Returns an event that fires when the given attribute changes |
Dictionary
|
Returns a dictionary of string → variant pairs for each of the |
Objects
|
Returns an array containing all of the |
string
[NotBrowsable]
|
Returns a coded string of the |
Array
[CustomLuaState]
|
Returns an array containing all of the descendants of the instance |
string
|
Returns a string describing the |
RBXScriptSignal
|
Get an event that fires when a given property of an object changes. |
bool
[CustomLuaState]
|
Returns true if an |
bool
|
Returns true if an |
bool
|
Returns true if an |
void
[Deprecated]
|
Sets the object’s Parent to nil, and does the same for all its descendants. |
void
|
Sets the attribute with the given name to the given value |
Instance
[CustomLuaState]
[CanYield]
|
Returns the child of the |
Objects
[Deprecated]
|
Returns an array of the object’s children. |
Instance
[Deprecated]
|
void
[Deprecated]
|
Instance
[Deprecated]
|
Objects
[Deprecated]
|
bool
[Deprecated]
[CustomLuaState]
|
bool
[Deprecated]
|
void
[Deprecated]
|
Events
RBXScriptSignal
|
RBXScriptSignal
|
RBXScriptSignal
|
RBXScriptSignal
|
RBXScriptSignal
|
RBXScriptSignal
|
Fires when a purchase prompt closes for a game pass |
RBXScriptSignal
|
RBXScriptSignal
|
Fires when the Premium purchase modal closes |
RBXScriptSignal
|
RBXScriptSignal
[Deprecated]
|
Fires when a purchase prompt closes for a developer product. Warning: do not use to process developer product purchases! |
RBXScriptSignal
|
RBXScriptSignal
|
Fires when a purchase prompt closes for an affiliate gear sale or other asset (does not fire for developer product or game pass prompts) |
RBXScriptSignal
|
RBXScriptSignal
|
RBXScriptSignal
|
RBXScriptSignal
|
RBXScriptSignal
|
RBXScriptSignal
|
RBXScriptSignal
|
RBXScriptSignal
|
Fires when a third-party purchase has been completed. |
RBXScriptSignal
|
Fires when the |
RBXScriptSignal
|
Fires whenever an attribute is changed on the |
RBXScriptSignal
|
Fired immediately after a property of an object changes. |
RBXScriptSignal
|
Fires after an object is parented to this |
RBXScriptSignal
|
Fires after a child is removed from this |
RBXScriptSignal
|
Fires after a descendant is added to the |
RBXScriptSignal
|
Fires immediately before a descendant of the |
RBXScriptSignal
|
Fires immediately before the instance is destroyed via |
RBXScriptSignal
[Deprecated]
|
Callback
ProductPurchaseDecision
|
A callback to process receipts of product purchases. |
Code Samples
Handling Gamepass Purchase Finished
Below is a screenshot of a game pass purchase prompt. The function in the code sample runs immediately after the player presses “Cancel” or after the player buys the game pass then presses “OK”. Should there be an issue with the purchase, the event also fires.