Since you don't want to provide any more information, or your code, or your project file, I assume all you have is a bunch of circle sprites.
You can use that green line sprite to detect groups of circles of the same color.
Set origin point at its left end, set angle to 45 degrees.
In a loop set line position to each circle, check if it is overlapping 4 circles, check if all 4 circles are the same color.
If they are, mark them for deletion. Repeat for all circles on the board.
Then set the line angle to 135 degrees and do the loop again.
Then make the line size shorter, to cover only 3 circles, and repeat loops again for 45 and 135 degrees.
Finally, destroy all marked circles.
.
Of course, this is an un-optimized method, there is room for improvement, but it should work.
see how to worked my test
epic-cori-81df5f.netlify.com