You'll probably want to make a javascript bbCode...
Code:
Title: Javascript
Tag: javascript
Use {option}: Yes
Description:
The [JAVASCRIPT] tag allows you to place javascript in your post.
Replacement:
<script type="text/javascript" src="{option}">{param}</script>
You would want to duplicate this bbCode if you want to allow the use of javascript that's not in a .js file somewhere, but turn off the {option}. At least, the last time I made a bbCode that had an option, if the option wasn't specified the bbCode wasn't parsed.
Finally to top it all off, you'll want to use some
Advanced bbCode Permissions to stop anyone else from using the javascript bbCode.