I always lose a few eggs to snakes, but I'm happy to have them in the barn for rat control. Ironically I lost a few snakes to eggs too. When I was trying to get my hens to use their nest boxes after a barn remodel, I put ceramic eggs in the boxes. They gradually disappeared - I fear to snakes who certainly could not digest them. If you want the snakes to leave, get rid of the rodents.