game.Players.PlayerAdded:connect(function(player) local folder = Instance.new("Folder",player) folder.Name = "leaderstats" local currency1 = Instance.new("IntValue",folder) currency1.Name = "Cash" player.CharacterAdded:connect(function(character) character:WaitForChild("Humanoid").Died:connect(function() local tag = character.Humanoid:FindFirstChild("creator") if tag ~= nil then if tag.Value ~= nil then currency1.Value = currency1.Value + 10 --This is the reward after the player died. end end end) end) end)
I'm out of my mind, what do you need here?
game.Players.PlayerAdded:connect(function(player) local folder = Instance.new("IntValue") folder.Name = "leaderstats" folder.Parent=player local cur1 = Instance.new("IntValue") cur1.Name = "Cash" cur1.Parent=folder player.CharacterAdded:connect(function(character) character:WaitForChild("Humanoid").Died:connect(function() local tag = character.Humanoid:FindFirstChild("creator") if tag ~= nil then if tag.Value ~= nil then cur1.Value = cur1.Value + 10 --This is the reward after the player died. end end end) end) end)