SALT LAKE CITY — A “Star Wars”-loving Utah family devised an elaborate and awe-inspiring solution to the challenge of finding a Halloween costume for their 5-year-old son with cerebral palsy.

Chantelle and Patrick Bailey built a detailed replica of the Millennium Falcon that fits around Sebastian Bailey’s walker. It is made of corrugated plastic with a wood foundation. It features blue lights in the back and headlights in the front to match the famous spaceship.

On top near Sebastian’s arm is a small black apparatus with a big yellow button called a speech button. It’s what Sebastian uses to communicate since he can’t talk. For the costume, they’ve programmed it with his older brother saying, “trick or treat” interspersed with some of Han Solo’s iconic one-liners from the “Star Wars” movie, such as “Sure hope the old man got that tractor beam out of commission, or this is gonna be a real short trip. Ok, hit it!”

Sebastian will go trick or treating in it dressed as Han Solo. His older brother, Holden, 8, is dressed as Luke Skywalker and their parents will go as R2-D2 and Chewbacca.

But the Baileys couldn’t persuade their two daughters, Eden, 9, and Ava, 3, to join the theme. Eden insisted on being a bee and Ava is Spider-Man.

Chantelle Bailey said she and her husband stayed up late nearly every night for three weeks after their four children were asleep to build the spaceship. They did the sawing, drawing and gluing in the kitchen, so they could watch TV. At first, she assigned the job to her husband, but she quickly realized it would be a two-person job.

It wasn’t their first foray into elaborate Halloween costume-making. Two years ago, they built the red phone booth where Clark Kent becomes Super Man to go around Sebastian’s walker.

Sebastian debuted his personal Millennium Falcon on Tuesday at a trunk and treat event at their church. It was a hit, with people giving Sebastian high fives and pats on the back all night, Chantelle Bailey said. He’ll wear it again Saturday to go trick or treating in their neighborhood in the Salt Lake City suburb of Sandy.

“It makes it easier for other kids to approach him,” she said. “He’s happy. He likes to hit the button.”

People are already asking what they’ll do next year for an encore, but Chantelle Bailey says this might be their final act. Sebastian is starting to walk a bit on his own, she said.

“Maybe he won’t need one next year,” she said.