generating scripts - Incorrect syntax near 'GO'
The problem is that you are mixing up which character is which in the variations of a newline: CRLF / LF. You have:

,[DropIndexScript] = 'DROP INDEX ' + QUOTENAME(SI.name) + 
   + CHAR(13) + ' ON '  + 
QUOTENAME(Schema_name(T.Schema_id)) +'.'+ QUOTENAME(T.name)
 + CHAR(10) + CHAR(13) + 'GO' + CHAR(13)


Here you use either CHAR(13) or CHAR(10) + CHAR(13). The problem is that CHAR(13) is a "Carriage Return" / "CR" while CHAR(10) is a "Line Feed" / "LF". You have reversed them and hence are using both "CR" and "LFCR" in various places. If you swap the "10"s for the "13"s it would work correctly.

Better yet would be having consistency across them. Either use just CHAR(10) everywhere, or CHAR(13) + CHAR(10) everywhere.