💻
NoVariety Documentation
  • Overview
  • ROBLOS Documentation
    • Terminal Language
    • Coding Language
  • ROBLOS Website Creator
    • AppInstaller Files
    • HTML Interpreter
    • CSS Interpreter
      • position
      • size
      • anchor-point
      • layout-order
      • text-scale
      • text-wrap
      • color
      • background-color
      • background-transparency
      • border-size
      • border-color
      • rotation
      • visible
      • content
    • LUAScript
      • download
        • commit
      • Player
      • DOM
        • Document
          • title
          • setTitle
          • getTitle
          • addEventListener
          • removeEventListener
          • dispatchEvent
          • createNode
          • querySelector
          • getElementById
          • cloneNode
        • Elements
          • getElementById
          • getElementsById
          • querySelector
          • querySelectorAll
          • appendChild
          • insertBefore
          • removeChild
          • insertAttribute
          • removeAttribute
          • cloneNode
        • Window
          • Location
            • reload
            • to
            • teleport
          • localStorage
            • setKey
            • getKey
            • deleteKey
            • getKeys
          • alert
          • input
      • delay
      • setTimeout
      • setInterval
      • clearInterval
      • MarketPlace
        • promptGamepass
        • promptProductPurchase
        • promptPurchase
        • hasGamepass
        • hasAsset
        • purchaseSuccess
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. ROBLOS Website Creator
  2. LUAScript
  3. MarketPlace

purchaseSuccess

PrevioushasAsset

Last updated 1 year ago

Was this helpful?

This event fires when a purchase dialog for a is closed. It fires as the dialog closes, when the player presses "Cancel" at the prompt or "OK" at the success/error message.

marketplace.purchaseSuccess(callbackFunction: function): void

marketplace.purchaseSuccess(function(, purchaseType: Enum, wasPurchase: Boolean)
    -- Enum.PurcahseType GamePass | MemberShip | Product
    -- wasPurchase only returns for GamePasses and Product not MemeberShip
    if purcahseType == Enum.PurcahseType.GamePass then
        print(player.Name .. " purchased a gamepass")
    elseif purcahseType == Enum.PurcahseType.Product then
        print(player.Name .. " purchased a product")
    else
        print(player.Name .. " purchased a membership")
    end

end)
pass