There is a trick to doing this with Scriptcards and [rbutton] . Look at my Bless Script for an example. !script {{
--/|Script Name : Bless
--/|Version : 0.1
--/|Requires SC :
--/|Author : Will M.
--/|Description : Implements Bless on 3 targets
--/|
--/|Spell Description: You bless up to three creatures of your choice within range.
--/| Whenever a target makes an attack roll or a saving throw before
--/| the spell ends, the target can roll a d4 and add the number rolled
--/| to the attack roll or saving throw.
--/| At Higher Levels. When you cast this spell using a spell slot of
--/| 2nd level or higher, you can target one additional creature for each
--/| slot level above 1st.
--/| Select each character impacted
--/| For each character impacted - Update their Global Attack and Save Mods (not done yet)
--/| Add a status marker to show the effect
--/| Send a message to that person to let them know they are blessed
--/| Add a turnorder counter
--/| Add a Concentration Marker
--:TOP|
--#title|BLESS
--#timezone|America/Chicago
--#overridetemplate|dnd5e
--#sourceToken|@{selected|token_id}
--#whisper|self
--#debug|1
--#emoteText|@{selected|token_name} Casts Bless
-->SETUP_GLOBAL_VARS|
--&BlessedSM|Blessed::4082922
--&ConcentrationSM|Concentrating::4082926
--+Bless Description:|
--+| [b][i]Casting Time:[/i][/b] 1 Action
--+| [b][i]Duration:[/i][/b] 1 Minute
--+| [b][i]Range:[/i][/b] 30 ft.
--+| [b][i]Components:[/i][/b] V, S, M (holy water)
--+|You bless up to [b]three creatures[/b] of your choice within range. Whenever a target makes an [b][i]attack roll[/i][/b] or a [b][i]saving throw[/i][/b] before the spell ends, the target can roll a [b]d4[/b] and add the number rolled to the attack roll or saving throw.
--+|[b]At Higher Levels.[/b] When you cast this spell using a spell slot of 2nd level or higher, you can target one additional creature for each slot level above 1st.
--+|[hr]
--/| Get Slot Level and Check for space
-->GET_SPELL_SLOT|SlotLevel
-->BUILD_TARGETS|[&SlotLevel];BlessTargets
--=TargetCount|[&SlotLevel]+2
--+|[c][rbutton]Select [$TargetCount.Raw] Characters to Bless::BLESS;[&SlotLevel]\[&BlessTargets][/rbutton][/c]
--:EXIT|
--x|
--:GET_SPELL_SLOT|
--/| Select Level to determine number of creatures impacted
--&SL|?{Spell Slot Level Used?|1|2|3|4|5|6|7|8|9}
--=SlotsExpended|[*S:lvl[&SL]_slots_expended]
--&[%1%]|[&SL]
--?[$SlotsExpended.Total] -eq 0|NOSLOTSLEFT
-->DEDUCT_SPELL_SLOT|
--<|
--:NOSLOTSLEFT|
--&[%1%]|0
--+|[*S:character_name] has no level [&SL] spell slots available.
--#emoteText|[*S:character_name] tries to cast a spell but farts in instead.
--X|NoSlotsLeftStop
--:DEDUCT_SPELL_SLOT|
--=SlotsExpended|[*S:lvl[&SL]_slots_expended] - 1
--/@setattr|_charid [*S:character_id] _lvl[$SlotLevel]_slots_expended|[$SlotsExpended] _silent
--!a:[*S:character_id]|lvl[&SL]_slots_expended:[$SlotsExpended]
--+|Level [&SL] Slots Left: [$SlotsExpended]
--<|
--:BLESS|
--#whisper|
--~Arg|string;split;\;[&reentryval]
--=iCnt|[&Arg1]+3
--%i|2;[$iCnt.Raw];1
--&TokenId|[&Arg[&i]]
--&TokenIds|+ [&Arg[&i]]
--&CharIds|+ [*[&TokenId]:character_id]
--?[&i] -ne [$iCnt.Raw]|&CharIds;+,
--+|[b][c][*[&TokenId]:t-name][/c][/b]
--&Blessed|+ [*[&TokenId]:t-name],
--vtoken|[&TokenId] nova-holy
-->TURN_GSM_ON|[*[&TokenId]:character_id];Bless
-->TURN_GAM_ON|[*[&TokenId]:character_id];Bless
--%|
--+|[b][i][c]Have been Blessed[/c][/i][/b]
--@token-mod|_set statusmarkers|[&BlessedSM] _ids [&TokenIds] _ignore-selected
--@token-mod|_set statusmarkers|[&ConcentrationSM] _ids [*S:t-id] _ignore-selected
--~|turnorder;addcustom;>>[*S:t-name] Concentrating;1;+1
--e[*S:t-name]|/em Is Concentrating
-->LOG|Concentration Started; [*S:t-name] (For casting Bless on [&Blessed])
--+|[hr]
--+For the next minute, or until the spell ends:|
--+| Whenever a you make an [b][i]attack roll[/i][/b] or a [b][i]saving throw[/i][/b], the you can roll a [b]d4[/b] and add the number rolled to the attack roll or saving throw.
--+Note:|[i]You'll need to manually uncheck the [b]Global Attack[/b] and [b]Global Save[/b] Modifiers for [b]Bless[/b] from your character sheet or the Actions macro[/i]
--X|
--:BUILD_TARGETS|Count;rtnTargetString
--=iCnt|[%1%]+2
--=i|0
--&TS|
--/*iCnt|[$iCnt]
--%i|1;[$iCnt.raw];1
--&TS|+[&TB]target|[&i]|token_id}
--?[&i] -lt [$iCnt.Raw]|&TS;+\
--/*[&i]|[&TS]
--%|
--&[%2%]|[&TS]
--<|
--:TURN_GSM_ON|CharacterId, GSM Name
--Rfind|[%1%];[%2%];repeating_savemod;global_save_name
--?"[*R:global_save_name]" -eq "NoRepeatingAttributeLoaded"|EXIT_GSM
--!a:[%1%]|[*R>global_save_active_flag]:1
--:EXIT_GSM|
--<|
--:TURN_GAM_ON|CharacterId, GAM Name
--Rfind|[%1%];[%2%];repeating_tohitmod;global_attack_name
--/rdump|
--/\GAM1|GAM1 [*[%1%]:name] [*R:global_attack_name]
--/\GAM2|[%1%] [*R:global_attack_name] [*R:global_attack_roll] [*R:global_attack_active_flag] [*R>global_attack_active_flag]
--?"[*R:global_attack_name]" -eq "NoRepeatingAttributeLoaded"|EXIT_GAM
--!a:[%1%]|[*R>global_attack_active_flag]:1
--:EXIT_GAM|
--<|
--:LOG|Subject, Note
--~DT|system;date;getdatetime
--@note-log|[&DT]: [%1%]; [%2%]
--<|
--:SETUP_GLOBAL_VARS|
--&QB|? --&QB|+{ --&QE|}
--&AB|@ --&AB|+{
--&TB|& --&TB|+# --&TB|+64 --&TB|+; --&TB|+{
--&BED|& --&BED|+# --&BED|+128719;
--&CLOCK|& --&CLOCK|+# --&CLOCK|+128336;
--&SPACE|X X --&SPACE|[&SPACE(1,1)]
--&spc|&nbsp;
--&obrac|[ --&cbrac|]
--&vbar||
--&DASH|-
--&DDASH|[&DASH][&DASH]
--<|
}}