Major changes to the way local bus services are organised have been proposed by the Scottish government.
Buses are Scotland's most-used form of public transport, but passenger numbers have fallen amid calls for improvement.
Ministers want to give councils more power to fill gaps in the network via partnerships with companies - and to run services themselves if necessary.
Transport minister Humza Yousaf said the government "will not stand by as bus passenger numbers decline".
The legislation also sets out rules for low emission zones in cities, a ban on parking on pavements and improvements to smart ticket schemes.
However, opposition parties said it was a "missed opportunity" to improve other areas, with no specific proposals concerning rail travel.
In March, a Citizens Advice Scotland survey suggested many passengers were unsatisfied with the frequency and punctuality of local services, as well as noting concerns about safety, cleanliness and value for money.
However, later that same month a survey from watchdog Transport Focus found almost nine out of 10 people using buses were satisfied with their last journey, a "ringing endorsement" for services.
The new legislation proposes giving local councils and regional transport partnerships (RTPs) more flexibility to improve services, either by working with bus companies or by stepping in and running services themselves.
It includes new local franchising powers, and requirements on bus operators to provide more information to the public about routes, timetabling and fares.
Ministers also want better smart ticketing across bus, rail, ferry, subway and tram networks, with a "national technological standard" that such schemes would have to live up to.
The bill also sets out a ban on double parking and parking on pavements, including powers for local authorities to enforce this rule.
MSPs previously backed a ban on pavement parking, which can cause problems for pram-pushers, wheelchair users and guide dog owners, but ran out of time to pass it in the previous Holyrood term.
The new legislation also sets out powers for enforcing low-emission zones in cities, aimed at reducing pollution and improving air quality.
And there are provisions on the regulation of roadworks, with extra powers for the Scottish Road Works Commissioner to oversee and co-ordinate works, carry out inspections and fine companies carrying out work.
'Cleaner, smarter system'
Mr Yousaf said the sections of the bill dealing with bus services would help "revitalise" services, and said the plans for low-emission zones and a ban on pavement parking would "help transform our towns and cities into cleaner, more accessible and more pleasant spaces to travel and enjoy".
He said: "By empowering local authorities and continuing to work in partnership with transport operators, we will continue to develop a cleaner, smarter public transport system with improved connectivity, accessibility and greater economic benefits for all of Scotland."
The Scottish Conservatives said the needs of people and businesses should be factored in to decisions on having cleaner air.
Environment spokesman Donald Cameron said: "Motorists already feel like the Scottish government has an anti-car agenda, and some of these proposals would exacerbate that. Any changes must be done with agreement of businesses and people who rely on their car to get around either for work or leisure."
Scottish Labour meanwhile said the bill was "a huge missed opportunity", saying they would table "a series of amendments" to change it.
Transport spokesman Colin Smyth said: "We know the SNP prefer private to public ownership when it comes to our railways, now we know it is the same on our bus routes.
"Under the SNP's plans, public ownership of bus routes can only happen in very restricted circumstances. This would leave local councils picking up the pieces, running the very few loss-making routes whilst transport tycoons line their pockets on the rest of the bus network."
The Scottish Greens welcomed progress on low-emission zones and bus travel but said the bill otherwise "leaves a lot to be desired", saying there was "not a single mention for trains".
MSP John Finnie said: "There won't be an MSP in the country who isn't being contacted by constituents who are rightly angered by delayed and cancelled rail services. This was an opportunity for the government to pave the way for a public bid for the ScotRail franchise and disappointingly they haven't taken it."
The Scottish Lib Dems also called the plans a "missed opportunity", saying they would let bus companies "wash their hands of unprofitable routes", leaving councils "under more financial strain".
There is also no proposal in the bill to impose a tax on non-residential parking spaces, something called for by campaign group Transform Scotland.