Note: Inspector Gadget was is owned by DHX Media. Hasbro's My Little Pony: Equestria Girls is based on Lauren Faust's My Little Pony: Friendship is Magic.

Trixie finished up another boring day of high school at Canterlot High. She walked around the hallways. She nudged Starlight Glimmer and asked, "Why can't our school be more exciting?"

Starlight replied, "We have one of the most exciting schools. We dealt with all kinds of ponies from other worlds and magical stuff."

Trixie said, "Magic's not really that special."

Starlight replied, "But you're a magician."

Trixie proudly said, "I'm a great and powerful exception."

Starlight asked, "What do you want from this school?"

Trixie stuck her hands in the air and said, "I want something big and exciting." She ran around the hallway and said, "I want an adventure that is dangerously fun."

Principal Celestia replied, "You might get a dangerously fun detention if you keep running around the hallway." Trixie burst into laughter at the absurd thought of detention being fun.

Meanwhile, Inspector Gadget was dancing around HQ. He said, "They say the more you dance badly, the healthier you get. That's why I intend on being the worst possible dancer."

Chief Quimby popped out of a dancing magazine and said, "You've been the worst dancer for years."

Inspector Gadget replied, "Aww, thanks Chief. What's up?"

Chief Quimby handed Gadget a message and said, "Dr. Claw has become in a mysterious source of magic that appears to be located at Canterlot High. Your mission is to disguise yourself as a substitute teacher, so you can guard the school from Dr. Claw's wrath. This message will self-destruct." Inspector Gadget accidentally knocked the message to Chief Quimby while dancing. The Chief shook his fist at Gadget.

The next day Inspector Gadget appeared at Canterlot High. He thought his usual suit and tie was fancy enough, so he didn't dress any differently. He started bumping into random lockers while trying to find his classroom.

Trixie and the other students started arriving at the school. Twilight Sparkle looked at Trixie and said, "I heard that we have a substitute teacher today."

Trixie asked, "Why should I care about that?"

Twilight spoke in an optimistic tone while saying, "It might be a really smart teacher who has a lot of important life lessons to teach us." Trixie stuck her tongue out at the thought of learning lessons.

Meanwhile, Dr. Claw was in his ship and was close to the school. He said, "There's been reports of magical powers being at that dumb school. If I can get the power source of the magic, I would have the power to destroy Inspector Gadget." He did an evil laugh.

Inspector Gadget was a substitute math teacher. He didn't want the students to know that he was an inspector, so he used a different name. He said, "Greetings kids. I'm John Brown. I'm going to give you a very educational math assignment." Trixie angrily groaned. Gadget asked, "Anything wrong?"

Trixie whined, "Math is one of the most boring school things."

Inspector Gadget replied, "It's actually a very interesting subject." He started reading the day's work paper and said, "Wowsers, I was wrong. This is nothing, but a bunch of repetitive number problems."

Trixie was starting to notice that Gadget was gullible so she asked, "Shouldn't we do something more exciting, so our minds can grow better?"

Inspector Gadget replied, "An excellent idea. You all seem like smart kids, so do whatever you find productive."

Trixie stopped focusing on her math work and started focusing on practicing her tricks. Starlight said, "Trixie, most of the students aren't going to do their math work, because of you."

Trixie replied, "Hey, it's the teacher's fault for being so clueless."

Twilight walked up to Gadget's desk and said, "Mr. Brown, I'm Twilight Sparkle and I'm afraid that I have some problems with the way that you're teaching this class."

Inspector Gadget put down the comic book he was reading and asked, "What's wrong with my teaching skills?"

Twilight replied, "You're not even having the students do the assignment that the regular teacher instructed you to give them."

Inspector Gadget responded, "I like to think out of the box."

Twilight said, "Look around the classroom."

Inspector Gadget looked around and saw students using their cellphones, ripped up work assignments on the floor, and piles of gum stuck to the chalkboard. He said, "Wowsers, this classroom is out of control." Inspector Gadget started doing internet research on how to be a good teacher. He was so distracted by his substitute teacher job that he wasn't focusing on saving the school from Dr. Claw.

A few hours later it was lunch time. Trixie went outside to eat lunch. Starlight Glimmer and said, "We usually eat lunch in the cafeteria."

Trixie replied, "Well, it's time to change things up. I'm tired of the boring schedules. I want to be as great and powerful as possible. The more unique, the better." She stuck her hand out and asked, "Care to join me?"

Starlight held hands with Trixie while saying, "Sure." Trixie and Starlight started having lunch next to the mirror portal that led to Equestria.

Twilight walked outside and said, "I spent so much time helping Mr. Brown clean the classroom that I couldn't find a spot left in the cafeteria."

Starlight replied, "You're welcome to join the Outside Crew."

Trixie said, "The Outside Crew? That's hardly a great and powerful name."

Dr. Claw flew near the school. He was a few hundred feet in the air, but he had a plan to get to the magic. He pressed a button on the ship. A crane popped out. He faced his cat and said, "The crane will bring the mirror/portal to me. I'll get any and all magic that's been hiding there. After that, I'll be more than a doctor. I'll become a wizard." He did an evil laugh.

The crane started coming down to the ground. Trixie, Starlight, and Twilight saw the crane. Trixie asked, "What is that weird machine?"

Twilight said, "It's a crane."

Starlight looked up and said, "The crane is coming out out of that ship in the sky. I'm pretty sure that cranes aren't supposed to come out of ships."

Twilight nervously said, "This is so weird."

Trixie was in an amused mood while saying, "This might be a fun adventure."

The crane got close to the mirror, but it didn't hook itself onto it. Dr. Claw saw that and said, "It appears that I have to put more into this than I should have to. Modern technology isn't as advanced as it was back in my day." Dr. Claw's cat rolled his eyes. Dr. Claw parked the ship near the school.

Trixie asked, "Who do you think is in that ship?"

Starlight said, "I hate to be judgmental, but I have a feeling that this ship guy is a bad guy."

Twilight replied, "I hope that he's the type of person that can be reasoned with."

Dr. Claw stepped out of his ship. He wore a silver helmet to cover up his face. He walked up to the crane and started hooking it onto the mirror.

Trixie walked up to him and angrily asked, "What are you doing?"

Dr. Claw said, "I'm going to steal this school's source of magic."

Twilight nervously replied, "You can't do such an evil thing. There's an entire land of ponies in there that have magical powers."

Dr. Claw said, "Thank you for the exposition that I needed. I'll take the mirror that contains the magical ponies. I intend on using my new magic vacuum to take away their power and transport it directly to me. I'll finally live out my dream of becoming a wizard, so I can upstage Grindelwald."

Trixie, Starlight, and Twilight looked at each other. They knew that they had to act fast, so that they can save the magical mirror in time. Twilight had a backpack that was filled with a countless amount of textbooks, so she threw it at Dr. Claw. Dr. Claw fell to the ground.

Starlight asked, "Do you think that'll be enough to stop him?"

Twilight nervously said, "I'm afraid that it was only enough to distract him." Dr. Claw got up and used his claw to blast Twilight. Twilight passed out.

Starlight looked at Trixie and said, "You need to be the hero."

Trixie nervously asked, "How could I be the hero?"

Starlight replied, "You're a magician, so you're similar to a wizard. You're not only powerful at being a magician. You have a great heart, so I believe in you."

Trixie asked, "Do you really believe in me?"

Starlight said, "There's nobody I believe more in."

Trixie felt inspired to stop Dr. Claw. She got out her wand and started zapping Dr. Claw. Dr. Claw used his claw to try to zap her, but Trixie used various magic tricks to protect herself. Trixie used her wand to zap the crane. The crane's hook was starting to break. Dr. Claw punched Trixie to the ground.

Trixie laid on the ground while feeling like she didn't have what it takes to win. Starlight looked at her with a confident look on her face. Trixie got up and broke the crane's hook. She started zapping Dr. Claw.

Dr. Claw said, "The crane was my master plan of getting the portal, so now I'm doomed."

Trixie confidently replied, "That means that you're not getting the portal to Equestria. You better start scramming before you face the wrath of the great and powerful Trixie!"

Dr. Claw started heading back home while saying, "I'll get you next time Equestria, next time!"

Starlight hugged Trixie and said, "I'm so proud of you."

Trixie replied, "You inspired me, so you deserve about forty percent of the credit." Trixie and Starlight helped Twilight wake and stand up.

Inspector Gadget walked outside and said, "You three young ladies are late for class. I'll just give you a warning this time."

Trixie replied, "Hey, we just stopped Dr. Claw."

Chief Quimby showed up and said, "Gadget, congratulations on stopping Dr. Claw."

Inspector Gadget replied, "Teaching the students a lesson about not being late isn't really about claws, but I appreciate the sentiment." Trixie facepalmed. Inspector Gadget learned nothing, but Trixie learned that friendship was the magic she needed to be a great and powerful magician.