There is a problem with the game I adapted that I can't fix.

Hello everyone, I am a student from Taiwan. There is an assignment in the class. I want to rewrite the game I saw before, but I have encountered difficulties.

https://arcade.makecode.com/S47093-60962-65671-10190

I want to make the background color change after accumulating a certain score, but I don’t know how to edit it. And now there is also a BUG, ​​why the hen will disappear after laying eggs.

Please come to a master to guide me, please!!!