There is errors when i'm trying to click the developer product.
Error: 10:02:24.571 - Players.inpu_ts.PlayerGui.ScreenGui.Frame.TextButton.LocalScript:6: attempt to index local 'purchase' (a nil value)
Script:
local id = 332605014
local players = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
local purchase = game:GetService("MarketplaceService"):PromptProductPurchase(players, id)
purchase.players.leaderstats.Money.Value = players.leaderstats.Money.Value + 2
end)

1 comment
You're doing it wrong. Check this wiki page: http://robloxdev.com/articles/Developer-Products-In-Game-Purchases