First Law of Thermodynamics.
Energy can no be created or destroyed, just transformed.
So your machine would not be able to transform all its energy into work as much energy would be transformed into heat, sound and friction. Even if these types of transformations could be controlled somewhat there is still E = mc^2, which shows the convertibility between mass and energy. One is the other, so no motion is perpetual.