Scenario:
While creating a new script record in Netsuite and deploying the script, there may b a “Failed” message displayed on the status page.

One major reason for this will be the file name of the script file if the filename of the script file is large or any special characters are used this may lead to this kind of deployment error.
Solution:
Delete both the script deployment record and the script record.
Upload the script file with a new file name(short and avoid using special characters) and upload it to the Netsuite file cabinet. then create a script record using the new file and deploy the script.
Then it will work if the issue is with the filename of the script file.