DEER TRAIL — There is sadness about the eventual destruction of this community’s school, parts of which were built 100 years ago. Many people in this town of 570, long past their teen years, still attend the annual homecoming dance in the school’s gym and reminisce about old flames and football championships.

But there is also excitement on these streets 60 miles southeast of Denver. New homes are popping up just off Interstate 70 and a state-of-the-art preK-12 school is on the horizon, to be built in part from money collected from legal pot buys.

Plenty of people have personal objections to marijuana use, but state and local school officials say no one is protesting that rundown schools are getting millions in revenue from excise taxes on retail marijuana sales for renovations and wholesale replacement.

That’s the case in Deer Trail, where swimmers are banned from using the 50-year-old pool, students in wheelchairs must be hoisted up ill-equipped stairs and into narrow bathrooms, and the coach’s locker room is closed due to a sewage leak.

“It’s just a nightmare to keep things going around here,” school principal Dave Casey said.

But a $34 million preK-12 campus will take shape over the next two years at the site of a former Future Farmers of America hog farm, thanks in part to an injection of marijuana sales funding through the state’s Building Excellent Schools Today, or BEST, program.

“I don’t care where the money comes from, if we get a new school, I’m for it,” said Hayley Whitehead, a Deer Trail graduate who works as the district’s administrative assistant. “I see the invoices and see what we need for repairs, so I have a pretty good idea of the situation here.”

“There are lots of so-called ‘sin taxes’ for uses and products that people don’t necessarily endorse,” added Jay Hoskinson, regional program manager for capital construction for the Colorado Department of Education. “But I think people also start looking at it as a possible new revenue source. And it kind of gets intermingled with other funding and becomes pretty much all part of the same package.”

“And so far, we’ve not heard from any school districts who say, “No, we are not going to use that money,'” Hoskinson said.

Marijuana excise taxes were used for the first time in 2013-14. In that year, more than $3 million was injected into BEST school construction projects. Nearly $24 million was used the next year.

By 2015-16, $80 million in marijuana tax revenue was injected into the BEST program. That included a one-time $40 million payment after Colorado voters decided two years ago to keep and spend more than $66 million in excess marijuana sales revenue.

The state says another $40 million was injected into BEST projects in 2016-17 and another $40 million is projected for the next fiscal year.

Other sources have fed the BEST program, including spillover from the Colorado Lottery and from the Colorado Land Board. In all, BEST has funded $1.2 billion for high-need construction projects since 2009.

Officials say money from retail pot sales is only a fraction of what is needed to repair, maintain and build schools in Colorado. One study indicates the state’s schools need nearly $18 billion in capital construction through 2018.

“When you look at the big picture, you realize how little that $40 million goes for statewide,” Hoskinson said, “But it helps.”

Especially in rural areas, where budgets are small and districts can’t afford huge bond issues, officials say.

In fact, just about all of the 27 recipients of the nearly $300 million in BEST construction grants for 2017-2018 were in rural school districts, including Deer Tail.

Others that received BEST awards include the Brush School District, which got more than $60 million for a new middle school and to renovate its high school, and Del Norte, which received $45 million for a new preK-12 school.

All of the school districts vying for BEST grants must show great need and confirm at least some matching funding, Hoskinson said.

Deer Trail passed a $6.8 million bond issue in November to raise its matching funds. The vote passed by a 16-percent margin.

Many skeptical voters were won over after they toured the school, superintendent Kevin Schott said. “They were saying a new school wasn’t needed until they saw what we and the kids have to deal with every day. And I think it was eye-opening for them.”

Many classrooms are ill-equipped for computers and other technology, and a structural engineer said the school swimming pool was in such disrepair he recommended it be closed, Schott said.

School security is also an issue, with many nooks and crannies in blind hallways and doors that are difficult to close and lock. “It’s not ideal by any stretch of the imagination,” Schott said.

The old school will be razed and the new school will be constructed nearby. About 160 homes will be built just south of the new school — part of a housing rush in Deer Trail.

“Sure, plenty of people will be sad when the old school closes and disappears,” Schott said. “But the new school is something this community deserves. And we are so grateful for it.”