Script to share only certain related list

Script to share only certain related list

Hi all!

I am looking for a script where, based on a condition (field value for example) I can share all records but only from selected related list.

Territories, Data Sharing Rules, User Lookup and Manual Sharing is not what I am looking for.

Example:
I have a related list in Accounts called Assets.
I want to add a value in a field in the Account record and this will automatically share all related Assets to a predefined user, users or user group.

Thank you for your support!