In Logan Lucky (2017), in one scene we see Mellie coat cockroaches with some colors, but how did the robbers use these painted cockroaches for the robbery?
They use the cockroaches to work out which pneumatic tubes lead to the cash vault.
Because each tube is given a specific coloured set of insects, when those cockroaches appear in the vault they know which tube leads there.
Jimmy tells Clyde his plan to rob the Speedway, exploiting his knowledge of its underground pneumatic tube system for moving its vast amount of money.
Clyde and Jimmy recruit their sister Mellie, incarcerated safe-cracker Joe Bang, and Joe's dimwitted brothers Sam and Fish. They will break Joe out of prison and return him later that day. Clyde intentionally gets himself sent to prison on a minor charge. With the help of a woman working at the vault, Mellie, Sam, and Fish infest the Speedway's tube system with painted cockroaches, determining which tubes go to the vault.