On Bedrock edition, how do you paste into a book with a controller?
Solution 1:
What's better to do is to copy-paste it somewhere else that it won't crash your system. Then try pasting the pieces 1 by 1, as long as you don't crash it in the process.
If you have the entire script, of course, it won't be posted all in 1. It will definitely crash because it is way too long.
Make a test world and do the instructions above.