Completed function to serialize script creation inputs