That's annoying when you have complex quoting in the pasted script, but you can always do
bash
PASTE_HERE
exit
Works for everything unless the pasted commands set variables you want to use.