Adding typed factories to script attributes