The legality of using Nix Injector depends on the terms of service of the game you are modifying. It may violate the rules of some games and could result in consequences like account suspension.