Keep the script th same but make it so when a player dies then they will lose 100 cash.
game.Players.PlayerAdded:Connect(function(p)
p.CharacterAdded:Connect(function(c)
c:WaitForChild("Humanoid").Died:Connect(function()
local bag = script.Moneybag:Clone()
local cf = c.HumanoidRootPart.CFrame - Vector3.new(0, (c.HumanoidRootPart.Size.Y * 1.5) - (bag.Size.Y / 2), 0)
bag.CFrame = cf
local proximityPrompt = Instance.new("ProximityPrompt", bag)
proximityPrompt.ActionText = "Hold E to pickup 100 cash!"
proximityPrompt.HoldDuration = 1
proximityPrompt.Triggered:Connect(function(playerTriggered)
playerTriggered.leaderstats.Cash.Value += 100
bag:Destroy()
end)
bag.Parent = workspace
end)
end)
end)
