Jeff,
Your code did work, however the relays are constantly activated and they randomly de-activate when the spin lever input is received.
This is opposite of what I need.

The slot machine would assume the buttons were continually held down.

I ran into this problem already.

I could work around the problem by rewiring the button wires to the normally open switch configuration at the module, however the relays would still be constantly in an electrified state. I worry this would lead to premature failure of the relays or the arduino.

In the code I sent you my best idea for a solution was to set the Button pins as inputs initially and then briefly change them to output to send the signal to to the relay module. This kept the relays in a non activated state until needed.

Is that a bad solution? I see you changed it.

Next, when I simulate a spin using the method you told me it works as it should. When I connect the D5 (spin_in) pin and the ground on the arduino the relays are silent. When I separate those two pins the loop code is implemented and the buttons stop randomly as I want. This is how my machines spin lever operates. There is 5v at the trigger and ground when idle and when the lever is flicked the voltage drops to zero.

Perhaps I am not reading my wires correctly . I attached two pictures of the spin lever's optical sensor removed from the machine.

brown and orange read 5v constantly
brown and red read 5v until the lever is flicked then they drop to zero as the optical sensor is blocked.

By my best guess brown is ground(-) orange is (+) and red is the "trigger"IMG_1546.jpgIMG_1547.jpg