Is there a way that hackers can get infinite dev products in your game, I’ve found that people have found a way to do it in my game, was wondering if theres a fix?
how do you handle your dev products? Because that might be the issue
local marketplaceservice = game:GetService("MarketplaceService")
script.Parent.Touched:Connect(function(part)
if game.Players:GetPlayerFromCharacter(part.Parent) and part.Name == "HumanoidRootPart" then
marketplaceservice:PromptProductPurchase(game.Players:GetPlayerFromCharacter(part.Parent),3317388711)
end
end)
marketplaceservice.PromptProductPurchaseFinished:Connect(function(plr,gpid,purchased)
if purchased then
if gpid == 3317388711 then
game.ReplicatedStorage.Events.GuaranteedSecret.Value = true
end
end
end)
this is all in a server script by the way.
then it’s probably another way that they can change it (via a backdoor or something) ? (unless there’s a bug in roblox but i highly doubt it)
These are the only things that have the string “GuaranteedSecret” in them… I’m not sure how else they could be changing it.
PromptProductPurchaseFinished isn’t reliable in many cases, even Roblox states that. You better use ProcessReceipt instead for handling product purchases.
UPD:
Just went to double check what PromptProductPurchaseFinished actually does. Here’s what the docs say
IMPORTANT: Do not use the PromptProductPurchaseFinished event to process purchases; instead, use the ProcessReceipt callback. The firing of PromptProductPurchaseFinished does not mean that a user has successfully purchased an item.
This event fires when a purchase prompt for a developer product closes. For example, when a user receives the purchase prompt and clicks Cancel, or when they receive a success or error message and click OK. The firing of this event does not mean that a user has successfully purchased an item.
Dont cook like that please
Always cache values and use GetService
Make sure to check if plr is not nil and check “gpid” aswell and you should be fine afaik.
I found that the problem was I should’ve been using process receipt, and thanks for the recommendation.
