generalized script init.