Hey guys. I'm trying to create my first custom character sheet and the layout part was quite simple, however, now I'm stuck with the dice roller. In this form, all tests are made using only d6 and adding the result to the value of one of the three attributes that was tested (power, skill and resistance). I've already managed to do this, creating a button for each attribute, which scrolls and then adds its value. <script type="text/worker"> on("clicked:rolld6", function(r){ let dado = r.htmlAttributes.value.split('-')[0]; let atributo = r.htmlAttributes.value.split('-')[1]; getAttrs(["charactername", atributo], function(v){ startRoll(`&{template:default} {{name=${v.charactername}}} {{Resultado=[[${dado}+${v[atributo]}]]}}`, diceroll => { console.log({diceroll}) const dice = diceroll.results.roll.dice; const rolls = dice.join(' + '); const successes = dice.filter(d => d == 6); const sum_dice = dice.reduce((partialSum, a) => parseInt(partialSum) + parseInt(a), 0) + parseInt(v[atributo]); const critical = (successes.length * parseInt(v[atributo])); const result = parseInt(sum_dice) + parseInt(critical); console.log(dice, rolls, successes) finishRoll(diceroll.rollId,{ resultroll: result }); }); }); }); </script> Problem 1: Depending on the situation, the player may have the option to roll up to 3d6 in a single test. With that in mind, I tried to solve it with three Radio buttons, one with each amount of dice and this way, the player would only choose one of them before clicking on the attribute button to be rolled. Problem 2: In this system, you can roll a critical value on each of the dice you roll, which will add the value of the tested attribute an additional time for each critical rolled. To solve this, I created a field with the critical value starting at 6, but free for the user to change. Note: Outside of Roll20, it works perfectly, but when I try to adapt it inside the form, it doesn't work. Could someone give me a light?