Problem with translating python code to JS for pavlovia

Hello,

I am new to Pavlovia and I am trying to run an experiment that I programmed in Builder 3.1.2 online. I have added a code that it is in python and I know that this is the problem. I read in a related post that the solution is to translate code components into JavaScript. But my code is very complicated so it is not possible to do it in JS (it is the method of quest+).
Is there any other solution/idea?

I would appreciate any help. Thank you!

It might not be as easy, but I’m sure it will be possible. You should post your Python code here, to hopefully get some tips for the translation. I’m not a JavaScript person myself, but hopefully others can chip in.