Hello! I've made leaderstats with currency Script is
game.Players.PlayerAdded:connect(function(player) local folder = Instance.new("Folder",player) folder.Name = "leaderstats" local currency1 = Instance.new("IntValue",folder) currency1.Name = "Money" 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 + 100 --This is the reward after the player died. end end end) end) end)
Is this possible to add kills into my leaderstats, and if also possible kills with death? Thank you so much!
Here is the death and currency script
game.Players.PlayerAdded:connect(function(player) local folder = Instance.new("Folder", player) folder.Name = "leaderstats" local currency1 = Instance.new("IntValue", folder) currency1.Name = "Money" local DeathCount = Instance.new("IntValue", folder) DeathCount.Name = Deaths 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 + 100 --This is the reward after the player died. DeathCount.Value = DeathCount.Value + 1 end end end) end) end)
Hope this helps! Sorry I could not make a kill stat.