-- Variable for RemoteEvent


Players.PlayerAdded:Connect(function(player: Player)
	local leaderstats = player:FindFirstChild("leaderstats")
	player.CharacterAdded:Connect(function(character)
		local humanoid = character:WaitForChild("Humanoid")
		humanoid.Died:Connect(function()
			if humanoid:FindFirstChild("creator") then
				local killer = humanoid:FindFirstChild("creator").Value
				local killerHumanoid = Utilities:GetHumanoid(killer)
				killerHumanoid.Health += 25
				killer.leaderstats.Kills.Value += 1
					if Utilities:OwnsGamepass(player, Configurations.GamePassIds["Double Cash"]) then
						killer.leaderstats.Cash.Value +=  10
					else
						killer.leaderstats.Cash.Value += 5
					end
				end
			end)
	end)
end)
