How to change Javascript dynamically in brics?

Hello @Norm, what is the best way to add different Javascript code depending on what the user sets in the bric settings? I tried somerhing like in the picture attached, but this does not work

Big thank in advanced.