is there a way to do this through script?

as it can be seen by the picture

alt text

the apache has a child gameobject

is there a way through script in the apache to create a prefab and attach it like the"PivotPoint" in the picture?

Create it:

Parent it: