vBulletin commands do not work in script tags? e.g. <script> stuff </script>
No, they only work in a template. ETA: Well, yes, they'll work in <script> tags if it's in a template.
It looks to me like you want to put your code in a template and use it as part of an existing vbulletin page, or else write your own page using the instructions at the link posted above.