You could use animation frames to easily switch from gray to green or red.
on.collision pick nth.grays instance int(random(0,grays.count-1)) // When player collides with enemy, pick a random instance of the gray buildings
grays.changeframe to choose(1,2) // assuming frames 1 and 2 are green and red.
// Now we need to check if any gray buildings are left, this could be every tick, or when one the buildings have changed
pick by comparison grays.animationframe = 0 // picks all the gray buildings
sub event > system.comparetwovalues grays.pickedcount =< 0 // the subevent inherits the picked buildings so now we see if any gray buildings are left, if not end the game