Walkthrough: After finishing your fifth Island Trial, you will need to quickly head to Malie Garden to return the Professor's Mask before heading off to Route 11. However, as you arrive back to Malie Garden, you will see Team Skull causing more trouble with Professor Kukui. As this occurs, the Boss of Team Skull, Guzma, will appear. One thing will lead to another, ending with your player having to battle him.
Team Skull Boss Guzma - Level 34 Golisopod, Level 34 Masquerain
After defeating Guzma, Professor Kukui will give you the Z Crystal specifically for your Starter Pokemon's Final Evolution. You will then proceed to Route 11 just south of Malie City.