AMDified script