This is where the Thomas meets Sailor John, Skiff and the Nighttime Villains and shows his robot self scene goes in The PJ Masks' Adventures of Thomas and Friends: Sodor's Legend of the Lost Treasure.
[That night, Thomas is asleep. He is then awoken by a strange rumbling noise]
Thomas: [gasp and notices something behind him] What's that?
[Night Ninja, Romeo, Skiff & Sailor John sail by behind him]
[Luna Girl follows on her Luna board]
Thomas: A ghost boat?
[Thomas, Connor, Greg and Amaya follow the object]
Amaya: What could it be?
Connor: I don't know. We better keep following it and find out.
[Thomas, Connor, Greg and Amaya follow the object into the danger zone]
Greg: It looks like a sailing boat.
Thomas: [gasps] You're right, Greg. [Comes closer] That's not a ghost boat, he's got wheels.
[Thomas knocks over a danger sign, alerting a figure standing near the hole to his, Connor, Greg and Amaya's position]
[The kids gasp]
Sailor John: Well, blow me down. Who are you lot? And what are you all doin' sneakin' about after me?
Connor: My name's Connor.
Greg: I'm Greg.
Amaya: I'm Amaya.
Thomas: and I'm Thomas. I discovered that cavern. And the pirate ship, even though Rocky's taken the credit for it.
[Connor, Amaya & Greg notice their enemies]
Romeo (PJ Masks): So, you're Thomas, eh?. Good to meet you. I'm Romeo.
Thomas: Who are those two with you, Romeo?
Night Ninja: I'm Night Ninja and these are my helpers the Ninjalinos.
Luna Girl: I'm Luna Girl.
Thomas: Nice to meet you all.
Connor: [Whispers to Greg and Amaya] Why are they being nice to him?
Amaya: Beats me.
Greg: I think its weird.
Sailor John: My name's John. Sailor John. That's what people round these parts like to call me anyway.
Skiff: And my name's Skiff. We're trying to find the treasure.
[Sailor John thumps him]
Thomas: Treasure? What treasure?
Luna Girl: You know, the stuff pirates buried and left behind but always came back for.
Night Ninja: Anyways, you wouldn't happen to know anything about OpThomas Prime, would you?
Thomas: Yeah. As a matter of fact, I do.
[Thomas transforms into his robot form]
Romeo (PJ Masks): Wow!
Night Ninja: That's cool.
Luna Girl: My uncle once taught a class about robotics, in somewhere called San Fransokyo. That's where I learnt how to make my Luna Board, and my Luna Magnet.
Thomas: Then, where did you get those moths?
Luna Girl: Oh. My uncle got me them for my birthday.
Thomas: Who... is your uncle?
Luna Girl: Professor Robert Callaghan.
[A plot hole opens and Callaghan, dressed as Yokai, comes out]
Robert Callaghan: Stop calling me uncle, Luna Girl!