The crank rotation is handled in the crank event in the player script. You might need something like this:
on crank do
crankDelta = event.ra
if crankDelta>0 then
emit "beltClockwise"
else
emit "beltAnticlockwise"
end
end
If you want to move the belts only when the crank is turned a certain amount (10 degrees in my sample below) and not on every minor rotation (which I recommend, as emit calls are expensive and you likely don't need them every frame), you could do this:
on crank do
crankAngle += event.ra
if crankAngle>=10 then
crankAngle = 0
emit "beltClockwise"
elseif crankAngle<=-10 then
crankAngle = 0
emit "beltAnticlockwise"
end
end