That is a PHP script, not Applescript.
BTW, the attachment you sent as a text file was rife with errors - probably simply because it was a text file and not properly formatted. I hope you're using a proper editor to create/save the script.
# Standard parameters
# fully qualified DNS name of Active Directory Domain
domain=îDOMAIN>COMî
# username of a privileged network user
udn=îDOMAIN USERNAMEî
# password of a privileged network user
password=îPASSWORDî
# Distinguished name of container for the computer
ou=îCN=Computers,DC=DOMAIN,DC=COMî
# Standard parameters
# fully qualified DNS name of Active Directory Domain
domain="DOMAIN>COM"
# username of a privileged network user
udn="DOMAIN USERNAME"
# password of a privileged network user
password="PASSWORD"
# Distinguished name of container for the computer
ou="CN=Computers,DC=DOMAIN,DC=COM"