How do I make a developer product? I know how to make one with a screen gui and all that, but I don't know how to transfer money for the tycoon. Whenever my friend buys the product for 5 robux witch gives you 2,000 cash in-game he never gets it. Help please.
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 == 185105546 then productName = "$2,000" local cashmoney = game.ServerStorage.MoneyStorage:FindFirstChild(player.Name) if cashmoney then cashmoney.Value = cashmoney.Value + 2000 end elseif productId == 25199926 then productName = "$10,000!" local cashmoney = game.ServerStorage.MoneyStorage:FindFirstChild(player.Name) if cashmoney then cashmoney.Value = cashmoney.Value + 10000 end elseif productId == 22283325 then productName = "10,000" local cashmoney = game.ServerStorage.MoneyStorage:FindFirstChild(player.Name) game.ReplicatedStorage.MasterKey:FireClient(player,"PurchaseConfirm") if cashmoney then cashmoney.Value = cashmoney.Value + 10,000 end elseif productId == 25199829 then productName = "+5 Speed (ONE LIFE ONLY)" local char = player.Character if char then local human = char:FindFirstChild("Humanoid") if human then human.WalkSpeed = human.WalkSpeed + 5 end end elseif productId == 25199898 then productName = "Gravity Coil (ONE LIFE ONLY)" game.Lighting.GravityCoil: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