In your example just add double quotes (inverted commas) around the name of the script like this:
"[]exec ""script.sqs"""
So, using the example parameters from the comref for createUnit:
"ClassName" createUnit [Position, Group, "[]exec ""script.sqs""", skill, rank];