The legality of hacking a video game depends on several factors:
Always check game terms of service and local laws.