|
| 11 Aug 2014 03:20 PM |
(WORKSPACE) local MarketplaceService = Game:GetService("MarketplaceService") local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory") MarketplaceService.ProcessReceipt = function(receiptInfo) local playerProductKey = "player_" .. receiptInfo.PlayerId .. "_product_" .. receiptInfo.ProductId local numberBought = ds:IncrementAsync(playerProductKey, 1) game.Workspace.DisplayScreen.SurfaceGui.TextBox.Text = receiptInfo.PlayerId .. " has bought " .. numberBought .. " items." return Enum.ProductPurchaseDecision.PurchaseGranted end
(STARTERPACK) --Put this script into the Starter Pack
local buyButton = game.Workspace.BuyButton.SurfaceGui.TextButton local productId = 20863759 --Change to your product ID
buyButton.MouseButton1Click:connect(function() Game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, productId) end)
This script only works for ONE Developer Script Brick, when you click on it you can purchase a Developer Product but When I put more Developer Procuts Bricks in the script No Longer works..
How do I make it work for many Developer Product Bricks and not just one? |
|
|
| Report Abuse |
|
|
| |
|
NiceCoder
|
  |
| Joined: 15 Oct 2012 |
| Total Posts: 6593 |
|
| |
|
dhr1
|
  |
| Joined: 15 Apr 2008 |
| Total Posts: 76297 |
|
|
| 11 Aug 2014 03:25 PM |
| whats the dev product supposed to give? |
|
|
| Report Abuse |
|
|
|
| 11 Aug 2014 03:26 PM |
| It has to work and we can make a deal |
|
|
| Report Abuse |
|
|
|
| 11 Aug 2014 03:26 PM |
| @drh1 It gives nothing it's for my LMaD SF but it only works with 1 Developer Product not several |
|
|
| Report Abuse |
|
|
WebGL3D
|
  |
| Joined: 04 Sep 2013 |
| Total Posts: 28311 |
|
|
| 11 Aug 2014 03:29 PM |
MarketplaceService is not accessible from LocalScripts.
~ 1Topcop ~ WebGL3D ~ Java3D ~ Data3D |
|
|
| Report Abuse |
|
|
| |
|