I assume you're just pitching the cubes to make them spin? If so, I'm not sure what the problem is, but if you're doing that then all you have to do is Face = Floor(EntityPitch#(Entity) / 90) and you will get a number 0..3 which tells you which face is currently facing you.
If you're getting an entitypitch greater than 360 or less than 0 then try this:
Face = Abs(Floor(EntityPitch#(Entity) / 90) MOD 4)
And if you're getting an entitypich from -180 to 180, try this:
Face = Abs(Floor((EntityPitch#(Entity)+180.0) / 90) MOD 4)
If you're getting an entitypitch greater than 360 or less than 0 then try this:
Face = Abs(Floor(EntityPitch#(Entity) / 90) MOD 4)
And if you're getting an entitypich from -180 to 180, try this:
Face = Abs(Floor((EntityPitch#(Entity)+180.0) / 90) MOD 4)