replace groovy code with ability in card scripts