Large scripts are hard to open in SQL Server Management Studio. These scripts can be easily executed through PowerShell as following:
Invoke-Expression 'sqlcmd -S ServerNameHere -d DatabaseNameHere -U UserNameHere -P PasswordHere -i "D:\MyScript.sql"'
1-Place your script at drive as SQL
2-Execute PowerShell from SSMS
3-Paste above mentioned script after making required changes and press enter