Implemented the logic for the animations for the chests.