The blue cable is used for bucket moving up and down.
The red cable is used for bucket opening or closing.
Pay attention to the fact that the red cable must move when the bucket moves up and down to keep closing or opening state of the bucket.
Mechanism for moving the trolley is not shown.
To increase closing force (for stronger grabing material), a system of two pulley blocks (not shown) for the red cable is installed between the yellow and violet bars of the bucket.