The legal weed business is booming in Colorado, and the state has finalized plans to spend its pot tax windfall on health programs in public schools, housing for at-risk populations, and a new treatment program to combat the opioid crisis.

Gov. John Hickenlooper on Friday signed a budget bill that dictates how money from the state’s “Marijuana Tax Cash Fund” will be spent. Colorado netted more than $105 million from marijuana taxes for the 2016-17 fiscal year, with much of that money going toward schools, public health, and oversight of the industry, which remains illegal under federal law.

Despite concerns that the Trump administration could intervene and shut down recreational marijuana markets in Colorado and six other states (plus Washington, D.C.), the state is on pace to set new sales records. Marijuana sales were up 30 percent in the first few months of 2017 in Colorado compared to the same period last year, with state stores selling a whopping $235 million worth of weed.

Colorado’s new budget devotes $15.3 million in weed tax revenue to pay for “permanent supportive housing and rapid re-housing assistance for individuals with behavioral health needs, and for individuals experiencing or at-risk of homelessness.” Hickenlooper’s office said the money will help “reduce incarceration, hospitalization, and homelessness for many of Colorado’s most vulnerable citizens.” Another $7.1 million will go toward “ending the use of jails for holding people who are experiencing a mental health crisis” by increasing access to “more appropriate services outside the criminal justice system.”

The state’s Department of Education will also receive an additional $9.7 million in marijuana taxes to create a grant program that will pay for 150 health care workers to visit high schools and provide “education, universal screening, referral, and care coordination for students with substance abuse and other behavioral health needs.”

The new budget also allocates half a million dollars in weed money for each of the next two years to fund a pilot program that will deploy specially-trained nurses and physician assistants to help address the opioid epidemic in two especially hard-hit counties.