heroesp
|
  |
| Joined: 23 Feb 2011 |
| Total Posts: 3214 |
|
|
| 26 Jun 2016 03:32 AM |
local productId = 35587367 -- change to your developer product ID local player = game.Players.LocalPlayer local isPurchased = true
script.Parent.MouseButton1Click:connect(function(buy) game:GetService("MarketplaceService"):PromptProductPurchase(player, productId) return Enum.ProductPurchaseDecision.PurchaseGranted end)
game:GetService("MarketplaceService").PromptPurchaseFinished:connect(function(player, assetId, isPurchased) if isPurchased then game.player.leaderstats.Money.Value = game.player.leaderstats.Money.Value +500 print(player.Name .. " bought an item with AssetID: " .. assetId) else print(player.Name .. " didn't buy an item with AssetID: " .. assetId) end end)
#ECSMasterRace R$7,860 | https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=14976471 |
|
|
| Report Abuse |
|
|
pketny
|
  |
| Joined: 27 Dec 2010 |
| Total Posts: 1162 |
|
|
| 26 Jun 2016 06:26 AM |
Because you didn't read the wiki.
http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService |
|
|
| Report Abuse |
|
|
heroesp
|
  |
| Joined: 23 Feb 2011 |
| Total Posts: 3214 |
|
|
| 26 Jun 2016 01:55 PM |
^ thanks for your help bud bump
#ECSMasterRace R$8,350 | https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=14976471 |
|
|
| Report Abuse |
|
|
landon90
|
  |
| Joined: 26 Dec 2008 |
| Total Posts: 1847 |
|
|
| 26 Jun 2016 01:57 PM |
Is this in a GUI? I can just give you the script that I use because I was having issues for a while and finally got it to work.
|
|
|
| Report Abuse |
|
|
heroesp
|
  |
| Joined: 23 Feb 2011 |
| Total Posts: 3214 |
|
|
| 26 Jun 2016 01:58 PM |
^ Yeah. Not sure why it's not working.
#ECSMasterRace R$8,350 | https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=14976471 |
|
|
| Report Abuse |
|
|
heroesp
|
  |
| Joined: 23 Feb 2011 |
| Total Posts: 3214 |
|
|
| 26 Jun 2016 02:22 PM |
bump helpppppppp
#ECSMasterRace R$8,350 | https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=14976471 |
|
|
| Report Abuse |
|
|
pketny
|
  |
| Joined: 27 Dec 2010 |
| Total Posts: 1162 |
|
|
| 26 Jun 2016 07:45 PM |
This wiki page has all the info you need on it:
http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService
"PromptProductPurchase" is for developer products.
http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService/PromptProductPurchase
"PromptPurchaseFinished" Is for assets only.
http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService/PromptPurchaseFinished
Use ProcessReceipt to process developer product purchases.
http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService/ProcessReceipt
Please read the wiki before asking questions and denying help. |
|
|
| Report Abuse |
|
|