Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do I make a developer product?

Asked by 8 years ago

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.

0
--THIS IS NOT A REQUEST SITE-- I would help , but I do not script with DP. fireboltofdeath 635 — 8y
0
Post your script here and we can help you. Discern 1007 — 8y
0
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 loca Dockboy20006 10 — 8y
0
Gravity Coil and the cash doesn't work. Dockboy20006 10 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

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

0
Really, not even code blocked :D RobotChitti 167 — 8y
Ad

Answer this question