This is the scene for Tirek's request and where Thomas is seemingly killed in Thomas' Place as a Prime
Thomas: I'm listening.
Tirek: Give me the Matrix, Blue Ruby, and the Black Pearl. And I'll let you live to be my personal train.
Thomas: [looks to his friends for an ideas]
Percy: Don't do it.
Toby: Thomas, don't listen to him.
Rainbow: Don't do it!
Applejack: Yer' our friend T!
Princess Celestia: Listen to Optimus' advice!
Twilight: THOMAS, PLEASE DON'T DO IT!!!!
Thomas: [thinks for a minute]
Optimus: [in Thomas' mind] Listen to me Thomas, do not let Tirek have the Matrix or the gems for anything! Ever if it means making a sacrifice.
Tirek: What is it going to be, Thomas?
Thomas: NO!! I'M NEVER LETTING YOU HAVE THEM!!! Optimus Prime has taught me a lot of things, but if there is anything he taught me; he's taught me the code of the Primes. As a Prime it is my duty to protect others ever if it means making a sacrifice. Besides, a good Prime puts his friends' lives before his own, and as a Prime I'm willing to do that. If it means losing my life, then so be it.
Brian: That was the best speech I ever heard.
Tirek: [in Megatron's voice] Oh, so unwise. [he readies a blast in his horns]
Thomas: [closes his eyes, ready to accept what's coming to him]
Twilight: THOMAS?!
Brian: Oh, my God!
Vanellope: No, no. No, no, no, no! NO!! NO, PLEASE TIREK!!!
Tirek: [fires his blast and it hits Thomas]
Edd: Good lord!
Eddy: AAH!!
Vanellope: NOOOOO!!
Princess Celestia: Thomas!
Princess Luna: No!
[after the dust clears, there is no sign of Thomas]
Brian: [as Frodo] NOOOOOOOOOOOOOO!!!!!!!!!!!!!!!!
Ed: GASP!! THAT MUTANT VAPORIZED THOMAS!!
Twilight: [her eyes start tearing up then she starts crying]
Vanellope: [crying] You really are a jerkinator. [continues crying]
Tirek: That's right, glitch.
Twilight: No, no. [falls to her knees]
Vinny: [pulls out his shotgun] Kill him! [he fires a shot Tirek]
Tirek: AAAHHHH!!! YOUR CRAZY MUTT!!!
VInny: YOU KILLED THOMAS!!
Tirek: Yeah, that's the point, I'm evil.
Brian: [looks a the crater] He's really gone this time!
Peter: I don't believe it!
Twilight: Now I lost the one true thing I love most of all!! No, no. NOOOOOOOOOOOOOOOOOOOO!!!!!!!!!![cries loudly over the loss of her tank engine]
Brian: We just lost a great friend. [a tear streams down his cheek]
Mucker: Yeah, but you just destroyed your keys to getting the army of Deceptitrains.
Tirek: I don't care, I'm am still powerful enough to take over the world!
[they cackle then they all hear a blast]