local q=game:GetService("\080\108\097\121\101\114\115")local O=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local e=require(O.Packages.t)local N=require(O.Packages.Tag)local g={Character=N.new("\067\104\097\114\097\099\116\101\114",e.instanceOf("\077\111\100\101\108")),IsAlive=N.new("\073\115\065\108\105\118\101",e.instanceOf("\077\111\100\101\108"))}g.Character:onAdded(function(q)print("\067\104\097\114\097\099\116\101\114 \097\100\100\101\100\058",q:GetFullName())end)g.IsAlive:onAdded(function(q)print("\073\115\065\108\105\118\101 \097\100\100\101\100 \116\111",q)end)g.IsAlive:onRemoved(function(q)print("\073\115\065\108\105\118\101 \114\101\109\111\118\101\100 \102\114\111\109",q)end)q.PlayerAdded:Connect(function(q)q.CharacterAdded:Connect(function(q)g.Character:add(q)g.IsAlive:add(q)local O=q:WaitForChild("\072\117\109\097\110\111\105\100")O.Died:Connect(function()g.IsAlive:remove(q)end)end)end)
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local t = require(ReplicatedStorage.Packages.t)
local Tag = require(ReplicatedStorage.Packages.Tag)

local tags = {
	Character = Tag.new("Character", t.instanceOf("Model")),
	IsAlive = Tag.new("IsAlive", t.instanceOf("Model")),
}

tags.Character:onAdded(function(character)
	print("Character added:", character:GetFullName())
end)

tags.IsAlive:onAdded(function(character)
	print("IsAlive added to", character)
end)

tags.IsAlive:onRemoved(function(character)
	print("IsAlive removed from", character)
end)

Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		tags.Character:add(character)
		tags.IsAlive:add(character)

		local humanoid = character:WaitForChild("Humanoid")

		humanoid.Died:Connect(function()
			tags.IsAlive:remove(character)
		end)
	end)
end)
