Custom script field size
The custom script field content is stored into a MySQL database in a TEXT field type. This means that the allowed size for this field is roughly 64 Kilobytes (or about 65,535 characters). This can vary a bit because of encoding though.
If you plan to add longer scripts, you should consider hosting them in a separate file on your own https server or file hosting.