|
| 13 Dec 2015 07:09 PM |
| when you click on the button it says "item not for sale" and so i checked all my dev product ids and they were all places |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2015 07:10 PM |
| why does it look for place ids instead of product ids |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2015 07:14 PM |
game.StarterGui.ResetPlayerGuiOnSpawn = false
local MarketplaceService = game:GetService("MarketplaceService")
function getPlayerFromId(id) for i,v in pairs(game.Players:GetChildren()) do if v.userId == id then return v end end return nil end MarketplaceService.ProcessReceipt = function(receiptInfo) local productId = receiptInfo.ProductId local playerId = receiptInfo.PlayerId local player = getPlayerFromId(playerId) local productName if productId == 22387422 then productName = "Get 5000 Gold" local Money = game.ServerStorage.MoneyStorage:FindFirstChild(player.Name) if Money then Money.Value = Money.Value + 5000 end elseif productId == 22387338 then productName = "Get 10000 Gold" local Money = game.ServerStorage.MoneyStorage:FindFirstChild(player.Name) if Money then Money.Value = Money.Value + 10000 end elseif productId == 22387307 then productName = "Start with 2000 Gold" local cashmoney = game.ServerStorage.MoneyStorage:FindFirstChild(player.Name) game.ReplicatedStorage.MasterKey:FireClient(player,"PurchaseConfirm") if cashmoney then cashmoney.Value = cashmoney.Value + 2000 end elseif productId == 22387295 then productName = "Glider" game.Lighting.Glider:Clone().Parent=player.Backpack end elseif productId == 22387645 then productName = "Gravity Coil" game.Lighting.GravityCoil:Clone().Parent=player.Backpack end elseif productId == 22387639 then productName = "Water Sword" game.Lighting.Tsunai:Clone().Parent=player.Backpack end game.BadgeService:AwardBadge(playerId,202303025) local message = Instance.new("Hint",workspace) message.Text = player.Name.." purchased "..productName.."!" coroutine.resume(coroutine.create(function() wait(2) message:destroy() end))
return Enum.ProductPurchaseDecision.PurchaseGranted end |
|
|
| Report Abuse |
|
|
| |
|