When the DevProduct is purchased by someone there walkspeed gets +5. The only issue is that it does not work. If anyone knows why it’s not working please let me know.
Script:
local MarketplaceService = game:GetService("MarketplaceService")
function processReceipt(receiptInfo)
local player = game:GetService("Players"):GetPlayerByUserId(receiptInfo.PlayerId)
if not player then
return Enum.ProductPurchaseDecision.NotProcessedYet
end
-- When DevProduct gets bought, a message will say "User just bought 1204777548" AND will gain +5 Walkspeed
print(player.Name .. " just bought " .. receiptInfo.ProductId)
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed += 5
return Enum.ProductPurchaseDecision.PurchaseGranted
end
MarketplaceService.ProcessReceipt = processReceipt
Screenshot of Output: