function TTTDeath(ply, attacker, dmginfo) local role_color = { [ROLE_TRAITOR] = Color(255,0,0,255), [ROLE_INNOCENT] = Color(0,255,0,255), [ROLE_DETECTIVE] = Color(0,0,255,255) } if IsValid(attacker) and attacker:IsPlayer() then ply:ChatPrint(role_color[attacker:GetRole()],"You were killed by "..attacker:Nick().." who is a"..attacker:GetRoleString()..".") end end hook.Add("DoPlayerDeath", "TTTDeaths", TTTDeath)