I've looked around and couldn't find anything so far. If someone could help me write the script for it that would be awesome!
01 | -- Server |
02 | local MarketPlaceService = game:GetService( "MarketplaceService" ) |
03 |
04 | MarketPlaceService.ProcessReceipt = function (receiptInfo) |
05 | local userId = receiptInfo.PlayerId |
06 |
07 |
08 | if receiptInfo.ProductId = = 0000 then -- 100 Cash Id |
09 | local Player = game.players:GetPlayerFromUserIdAsync(userId) |
10 | local Cash = Player.leaderstats.Cash |
11 |
12 | Cash.Value = Cash.Value + 100 |
13 | end |
14 | end |
1 | -- Client |
2 | local Player = game.Players.LocalPlayer |
3 | local ProductId = 0000 |
4 | local MarketPlaceService = game:GetService( "MarketplaceService" ) |
5 | local Button = script.Parent.Button |
6 |
7 | Button.MouseButton 1 Click:Connect( function () |
8 | MarketPlaceService:PromptPurchase(ProductId) |
9 | end ) |