Transformation Scripts are used to transform an HL7 message from its original format into the final desired output using Chameleon's built-in Python functionality. The script will only be invoked if the Scripted Transformation option is enabled in the Transformation window (Chameleon > Test Transformation).