I think the offending code is on line 146. When the avoid sprite leaves the bottom of the screen, the chicken’s y position is changed. Is that the intended behavior?
leftEdge and rightEdge do exist as soon as you use the “createEdgeSprites” block. Here’s the documentation that explains that. createEdgeSprites
createEdgeSprites is a “built-in” function. It was created by the programmers who created GameLab. The code for it is in a library “under the hood” and abstracted away so students don’t need to worry about the code, but can just use it and know that it works.
If your students remix a project, all of the blocks show up (including that one). They can also type in those commands in text mode, so if they saw it in the gallery or if they saw it in the documentation, they would know it exists as well.
It can come in handy, so it’s good that they discovered it!