The Massachusetts Senate on Thursday unanimously passed a roughly $56 billion state budget that would extend in-state tuition rates to certain students without legal immigration status, lay the groundwork for universally free community college by fall 2024, and fund six months of free bus service at regional transit authorities.

The future of those initiatives hinges on closed-door negotiations with the House, which did not include them in its version of the budget passed last month.

With the goal of reaching a deal by the July 1 start of the next fiscal year, a team of three state representatives and three senators will next work together to produce a compromise bill, deciding how much money to dedicate to the various facets of state government.

Over the past several years, state budget talks have stretched beyond that July 1 deadline, leaving Massachusetts to rely on temporary spending bills to keep government operations running. This year, the House and the Senate have several major policy differences to resolve before they can ship a final version to Gov. Maura Healey.

The House budget authorizes online state lottery sales, putting the anticipated revenue toward a grant program supporting child care providers, while senators rejected an online lottery proposal during their three days of debate this week.

Meanwhile, the Senate budget makes some higher education policy changes not contemplated in the House version.

Currently, undocumented immigrants are not eligible to pay the lower, in-state tuition rates at public colleges and universities in Massachusetts. The Senate wants to change that, making students eligible for in-state tuition, regardless of immigration status, as long as they attended a Massachusetts high school for at least three years and graduated or earned a GED here.

Senate Democrats on Wednesday evening defeated a Republican bid to remove the in-state tuition language from the budget.

Sutton Republican Sen. Ryan Fattman said he worried about the message that such a change would send to “a lot of people out there who are working hard every single day, trying to play by the rules, and they don't feel like their government is always necessarily working for them."

Sen. Jo Comerford, a Northampton Democrat who co-chairs the Higher Education Committee, said she rejected the idea of a “zero-sum argument.”

“This Senate budget is about expanding access to higher education, public higher education, not restricting it,” she said.

Both the House and Senate bills steer $20 million to a Healey priority: eliminating community college costs for adults age 25 and up who don’t already have a degree.

The Senate takes that a step further, also making community college free for nursing students starting this fall. Senate President Karen Spilka wants community college to be free for all students, and her chamber’s budget would spend another $15 million toward making that a reality by fall 2024.

Senators adopted hundreds of amendments throughout the course of the week, adding tens of millions of dollars to the bill’s bottom line.

One amendment addresses what Sen. Paul Feeney described as “an alarming increase in drink-spiking incidents at bars, night clubs, concert venues and even house parties across the commonwealth.”

Feeney’s amendment allocates $300,000 for the Department of Public Health to issue a report on drink-spiking prevention, launch a public awareness campaign about the dangers of drugged drinks, and buy drink test kits to distribute to venues.

“Law enforcement, especially in Boston, has been very, very proactive in putting out memos to people — not only to the servers, but to patrons — on what to look for, but the state has not caught up,” said Feeney, a Foxborough Democrat. “Massachusetts has allowed a patchwork of response to this, and we have not caught up as a commonwealth to what’s happening out there.”

Senators also agreed to an amendment that would allow pharmacists to prescribe hormonal contraceptives, and another calling for a study into the possibility of converting a decommissioned ship “into a floating hospital for mental health, substance use treatment and recovery services.”

South Boston Sen. Nick Collins, who sponsored the floating hospital amendment, described it as a potential way to help address the humanitarian crisis in the area of Massachusetts Avenue and Melnea Cass Boulevard by making more services available to people experiencing addiction, mental health challenges and homelessness.