I can't figure this one out (new user) but it so basic it's probably embarassing for you seasoned users to read

I have a script that adds some text data to a text field based on a checkbox selection. The problem is my text data gets added to the text field when the button is clicked even if no checkboxes are selected. How can I stop the text being added and just have the button do nothing till a checkbox selection is made?
on mouseUp
put empty into b_list
repeat with i = 1 to the number of buttons of this card
if the style of button i = "checkbox" and the hilite of BUTTON i = true then
put the LABEL of btn i &"+" after b_list
end if
end repeat
delete char -1 of b_list
put the LABEL of btn i &"copy /b " before b_list
## puts data into test field
put b_list into field "Test"
end mouseUp
Thanks for any help
Bidge