disable collision between linked bodies with a script

Hello everyone,

I want to disable collision between linked bodies with a script for a great number of bodies. do you know the function for that?

Meshuggah

or maybe a Flags?