If I trade a hacked Pokémon onto Pokemon X and Y(if it gets through Pokebank), will it ruin or affect my game?
Something needs to be made clear, since it's apparent people don't really get how hacking works:
If a hack is made well, it is literally impossible to distinguish it from the real thing. If you looked at the code of a legitimate Pokémon, and then typed out that code line-by-line and inserted it into the game, that would be a hacked Pokémon, but it would be identical to the legitimate one in every way. Then it's just a case of altering some of the stats to be more to your preferences - as long as they also appear legitimate (AKA no moves it can't have at that level and under those conditions, and as long as trash bytes are handled properly, etc), then the Pokémon will be undetectable as a hack.
There is no such thing as a legitimacy checker - you can't check if a Pokémon is legitimate. You can only check if a Pokémon is legal, and a legal Pokémon can be hacked or it can be legitimate. You just have no way of knowing, because, contrary to popular belief, a hacked Pokémon does not contain any sort of "stamp" that declares it as a hack. The only way to tell if a Pokémon is hacked is to detect that it has data in it that it would not normally have been able to obtain.
So, to answer your question: if they put a decent legality checker into Pokémon Bank, then you will still be able to transfer a hacked Pokémon, as long as you hack it well. There are a lot of little pieces of irrelevant data in Pokémon which you may not be able to see by the naked eye, but which will give your Pokémon away as a hack if Pokémon Bank detects it. In many cases, you need to understand these in order to make a passable hack. If you don't feel confident doing this, find someone more knowledgeable who can do it for you, lest you make a mistake and suffer consequences such as losing the Pokémon or losing access to Pokémon Bank, both of which are possible.