Hey scriptinghelpers! I was wondering if someone could check over my developer product scripts before I publish my game? I posted a question yesterday asking for advice on how to start so since I know this is a big deal and, I don't want people saying "ermahgerd you scam me robux" I was just wondering if someone could tell me if everything is right and ready to go. Below you will find the scripts I'm using and where they are.
This purchase is a LocalScript is located inside of a TextButton inside of a ScreenGui, inside of StarterGui.
script.Parent.MouseButton1Click:Connect(function() game:GetService('MarketplaceService'):PromptProductPurchase( game.Players.LocalPlayer, 1177350644, false, Enum.CurrencyType.Default ) end)
This "receipt" is a Script (not sure on the current term but what I call it) located inside of ServerScriptStorage.
local datastore = game:GetService("DataStoreService"):GetDataStore("ProductPurchases") game:GetService("MarketplaceService").ProcessReceipt = function(ReceiptInfo) local Purchasing_Player = game.Players:GetPlayerByUserId(ReceiptInfo.PlayerId) if ReceiptInfo.ProductId == 1177350644 then if Purchasing_Player and Purchasing_Player:FindFirstChild('leaderstats') and Purchasing_Player.leaderstats:FindFirstChild('Tix') then Purchasing_Player.leaderstats.Tix.Value = Purchasing_Player.leaderstats.Tix.Value + 1000000 end end datastore:IncrementAsync(ReceiptInfo.PlayerId..'_'..ReceiptInfo.ProductId, 1) return Enum.ProductPurchaseDecision.PurchaseGranted end
Thanks for the help in advance, I appreciate it! As I always say I'm only here to learn.