So this line is where it prompts for the number of dice to roll:
--&numberOfDice|?{Number of dice|2}
That uses the Roll20 Roll Query syntax of ?{Prompt} to set a ScriptCards String variable with --&.
So if you want to have a second prompt for a modifier you could do something like:
--&modifier|?{Modifier}
And then you could use that in a ScriptCards roll variable to add to the dice roll with something like:
--=Roll|1d6 + [&modifier]
Alternatively if the modifier is an attribute, you could do something like the following:
!script {{
--#sourceToken|@{selected|token_id}
--&AttributeName|Agility
--=Roll|2d6 + [*S:[&AttributeName]] [MOD]
--+Result|[$Roll]
}}
That ScriptCard would use the selected token when run and look for an Attribute of the character linked to that token named Agility. And then add that to the Roll and display the Result.