How can I move a tool with a script without selecting any part, only the tool?

Good! I want to do that with a script, to be able to move a tool without the script having to select the part, only the tool. I am thinking ahead and I want that when a tool has many parts, simply move the tool without selecting the parts, but I don’t know how.

I guess you’d have to just weld all the parts to one part and move that one part. There are plugins that allow you to select multiple parts and weld them together with a click so it shouldn’t be too hard to do.

I know, I thought so too but I want to make it more optimizable.