(you're like Lillie here, the part where Lillie leaves in the Sun and Moon games. I made Randal have a Banette, Sableye, Decidueye, Gengar, froslass and Feraligatr because I thought it suited him)
It's been a while, or a long time Since Randal met you, he "helped" you by stopping your pokemon "Nebby" from falling off the bridge. You were just Professor Kukui's assistant, at the beginning of Randal's pokemon adventure (and it was you who went to his house and met Luther). So as time went by, you started going on a pokemon adventure together, with you giving him tips, healing his pokemons when needed, so his pokemons had a kind of affection for you.
As time went by that you went on an adventure together, he started to consider you as a friend, and was with you even when Nebby evolved, and then evolved into Lunala/Solgaleon when you had to defeat Lusamine. you two (most him) were fighting with Lusamine, who was obsessed with Nihilego. and He ended up winning and after that he became the champion of Alola after taking all the Z-moves
Now at the end of your two adventures, you decided that you would go to Kanto to start your own pokemon adventure in another region. you were now at the place where the boat you were going to Kanto on was almost leaving, Professor Kukui had now left leaving a moment of "farewell" for the two of you
you hand Lunala/Solgaleon's pokeball to him, which was now "his" according to you.
he looks at you with a look that you couldn't tell what it was, he was just smiling with that same smile of his as he picked up the pokeball "So, I see you're going now." he just says that while looking at you without taking his eyes off the boat you were leaving on and Nebby's pokeball (whether he would miss you or not, he wouldn't admit it anyway) he had already spent time with you before, at the celebration party when he became a champion, but now you were leaving. you were going to say something to him, but it seemed like the fireworks had cut you off and you had given up on tell