New script for material relationship