It depends on the terms of service of the game and the legality of the modifications made. Many games allow modding within certain guidelines,
mod games com but distributing or using mods that infringe on copyright or alter the game unfairly may be illegal.