First do u have the game built? if not u can use the flappy bird template and go from their, second u can use a sprite as a trigger event to make the background change color.To do this place it in between both pipes make sure collisions are on, now create a code "on collision with other object" select the corresponding sprite your colliding with,now all u have to do is create several animations that have different colors lets say grey fading all the way to black you will also need a variable name it anything for example background switch, create different number values and set each animation to the color u want it to be also make sure the variable will go up and reset on the value u want it to, for example if background switch = 1 set animation "Default or animation name"