If you are going to add a script tag then put the code it is to contain in a separate file and attach that as the src attribute.
If you have the code actually in the script already then simply define it as a Function and then execute it. No need for eval.
var code = 'alert("lucas")';
var func = new Function(code);
Helping others to solve their computer problem at http://www.felgall.com/