How to insert non-text dynamic data, when using the "Run Javascript" action of the Toolbox plugin

May I ask if anyone knows how to correctly insert non-text dynamic data in the “Run Javascript” action of the plugin Toolbox?
I get this error that inserted data has to be text.

Basically, I wanna run this small piece of Javascript code as a game engine for a mini-game I’m creating using Bubble, and I would like to dynamically insert non-text data into this code snippet, but couldn’t.

Any suggestions on how to tackle this? Thanks!