For some reason my dev products arent working, however, they used to work, but idk what I did. I get no out put errors, its in a server script and I don’t believe I got the ids wrong since they used to work.
MPS.ProcessReceipt = function(info)
-- STAT RESET
if info.ProductId == 1112608554 then
local player = game.Players:GetPlayerByUserId(info.PlayerId)
local points = player.LevelsInfo.Level
player.PlayerGui.GUI.MainFrame.Breathing.Value.Text = 0
player.PlayerGui.GUI.MainFrame.Health.Value.Text = 0
player.PlayerGui.GUI.MainFrame.Speed.Value.Text = 0
player.PlayerGui.GUI.MainFrame.Total.Value.Text = player.LevelsInfo:WaitForChild("Level").Value
player.Character.Humanoid.Health = player.Character.Humanoid.MaxHealth
player.Attributes.Health.Value = 0
player.Attributes.Breathing.Value = 0
player.Attributes.Speed.Value = 0
local hpPerPoint = 10
player.Character.Humanoid.MaxHealth = 100 + player.Attributes.Health.Value * hpPerPoint
player.Character.Humanoid.Health = 100 + player.Attributes.Health.Value * hpPerPoint
return Enum.ProductPurchaseDecision.PurchaseGranted
end
-- CASH DEVE PRODUCT
if info.ProductId == 1123229978 then
print("1")
local player = game.Players:GetPlayerByUserId(info.PlayerId)
player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + 100
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if info.ProductId == 1123230081 then
local player = game.Players:GetPlayerByUserId(info.PlayerId)
player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + 500
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if info.ProductId == 1123230259 then
local player = game.Players:GetPlayerByUserId(info.PlayerId)
player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + 1000
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if info.ProductId == 1123230698 then
local player = game.Players:GetPlayerByUserId(info.PlayerId)
player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + 5000
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if info.ProductId == 1123230417 then
local player = game.Players:GetPlayerByUserId(info.PlayerId)
player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + 10000
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end