From Disney's Hollywood Studios Wiki
RX-24, nicknamed Rex (Not to be confused with Rex, the Dinosaur from Toy Story, or Captain Rex, the Clone Captain in Star Wars: The Clone Wars), is the inexperienced pilot droid of the Star Speeder 3000 on Star Tours.
Rex's first flight had an inauspicious beginning. When he took a wrong turn within the spaceport, Rex nearly crashed his Star Speeder before even reaching open space. He quickly got his flight back on track, but came out of lightspeed too late, passing Endor and putting the StarSpeeder in a field of comets instead.
After surviving the comets, Rex unwittingly took his tour group into a restricted combat zone. There, the StarSpeeder was briefly caught in a Star Destroyer's tractor beam before joining pilots of The Rebel Alliance in battle. After risking the lives of his passengers to help destroy a Death Star-like space station, Rex safely returned the StarSpeeder 3000 to the tour station.
 Behind the scenes
Rex's voice was provided by Paul Reubens, better know for his role as Pee-Wee Herman. According to The Cinema of George Lucas, the character was originally envisioned by George Lucas as a veteran of the Clone Wars called "Crazy Harry", before the idea of a rookie pilot droid was developed. Hasbro released RX-24 as an exclusive Star Tours action figure that has since been retired, though it returned in a special set for 2008's Star Wars Weekends.
During the ride, Rex says that he's "always wanted to do this". The short story One Last Night in the Mos Eisley Cantina: The Tale of the Wolfman and the Lamproid states that there was a droid audible during the Battle of Endor assault on the Death Star announcing it had "always wanted to do this.