I have a dev product that temporarily gives you a speed boost. My problem is that when you die your speed goes back to normal. How can I fix this? Heres the if statement for the devproduct:
if receiptInfo.ProductId == 1289737124 then
print("player bought 30sec speed boost")
player.Character.Humanoid.WalkSpeed = 40
for i = 30, 1, -1 do -- sets 30 second timer
gui.Text = tostring(i)
wait(1)
end
player.Character.Humanoid.WalkSpeed = 16
end

2 comments
Where is script located? Can you try putting it inside starterplayerscripts? it might work because it does not reset upon respawn
This is in ServerScriptStorage. Is it possible to put it in StarterPlayerScripts when its handling dev products?