Q. If I use Zoroark's Foul Play and copy an attack that requires me to discard Energy, e.g. Magnezone LV.X's Cyber Shock, and I cannot discard that Energy from Zoroark, what happens? What about if I copied Emboar's Flare Blitz?
A. If Zoroark has that kind of energy attached to it, you must discard it if you are able. However, if Zoroark doesn't have that energy, the attack will still do its damage even if you discard nothing, as Foul Play does not require you to do everything else to perform that attack.
If you are using an effect such as Luxray GL's Trash Bolt which requires you to fulfill an effect or the attack fails, and you cannot fulfill the effect, the attack will fail.