StickyTarZone.cs

A trigger zone component that slows objects inside it. On enter it tints the root object's ModelRenderers with a tar material and stores the originals, damps Rigidbody velocity and CharacterController velocity each fixed update, and restores the original tint and material on exit or destroy.

Rough Code
🐞 OnTriggerExit removes the root from _insideObjects and restores tint and MaterialOverride on the first collider to leave, so objects with several colliders (ragdolls, multi-part props) stop being slowed and lose the tar look while still inside the zone.
🐞 RigidbodyDrag is never read; the rigidbody slowdown is a hardcoded 0.5 multiplier, so the exposed property does nothing.
using Sandbox;
using System.Collections.Generic;

public sealed class StickyTarZone : Component, Component.ITriggerListener
{
    [Property] public float SpeedMultiplier { get; set; } = 0.4f; 
    [Property] public float RigidbodyDrag { get; set; } = 0.85f;  
    [Property] public Color TarTint { get; set; } = new Color( 0.1f, 0.1f, 0.1f, 1f ); 

    private readonly HashSet<GameObject> _insideObjects = new();
    private readonly Dictionary<ModelRenderer, Color> _originalColors = new();
    private readonly Dictionary<ModelRenderer, Material> _originalMaterials = new();
    private static Material _cachedTarMaterial;

    private static Material GetTarMaterial()
    {
        if ( _cachedTarMaterial == null )
        {
            _cachedTarMaterial = Material.Load( "materials/sticky_tar.vmat" );
        }
        return _cachedTarMaterial;
    }

    public void OnTriggerEnter( Collider other )
    {
        if ( !other.GameObject.IsValid() ) return;

        var rootObj = other.GameObject.Root;
        _insideObjects.Add( rootObj );

        var tarMat = GetTarMaterial();
        var renderers = rootObj.Components.GetAll<ModelRenderer>();
        foreach ( var mr in renderers )
        {
            if ( mr.IsValid() && !_originalColors.ContainsKey( mr ) )
            {
                _originalColors[mr] = mr.Tint;
                _originalMaterials[mr] = mr.MaterialOverride;
                mr.Tint = TarTint;
                if ( tarMat != null ) mr.MaterialOverride = tarMat;
            }
        }
    }

    public void OnTriggerExit( Collider other )
    {
        if ( !other.GameObject.IsValid() ) return;

        var rootObj = other.GameObject.Root;
        _insideObjects.Remove( rootObj );

        
        var renderers = rootObj.Components.GetAll<ModelRenderer>();
        foreach ( var mr in renderers )
        {
            if ( mr.IsValid() && _originalColors.TryGetValue( mr, out var origColor ) )
            {
                mr.Tint = origColor;
                _originalColors.Remove( mr );
            }
            if ( mr.IsValid() && _originalMaterials.TryGetValue( mr, out var origMat ) )
            {
                mr.MaterialOverride = origMat;
                _originalMaterials.Remove( mr );
            }
        }
    }

    protected override void OnFixedUpdate()
    {
        
        _insideObjects.RemoveWhere( obj => !obj.IsValid() );

        foreach ( var targetObj in _insideObjects )
        {
            
            var rb = targetObj.Components.Get<Rigidbody>();
            if ( rb.IsValid() && rb.PhysicsBody.IsValid() )
                {
                    rb.PhysicsBody.Velocity *= 0.5f; // Замедление в смоле
                }

            
            var cc = targetObj.Components.Get<CharacterController>();
            if ( cc.IsValid() )
            {
                cc.Velocity *= SpeedMultiplier;
            }
        }
    }

    protected override void OnDestroy()
    {
        foreach ( var kvp in _originalColors )
        {
            if ( kvp.Key.IsValid() )
            {
                kvp.Key.Tint = kvp.Value;
            }
        }
        foreach ( var kvp in _originalMaterials )
        {
            if ( kvp.Key.IsValid() )
            {
                kvp.Key.MaterialOverride = kvp.Value;
            }
        }
        _originalColors.Clear();
        _originalMaterials.Clear();
        _insideObjects.Clear();
        base.OnDestroy();
    }
}