Toilets, changing rooms and other neglected areas of schools are to be upgraded as part of a £60m Scottish Executive plan.
The extra money must be spent on areas like toilets
A total of £40m is being provided for educational materials such as books, computers and musical instruments.
But Education Minister Hugh Henry has specified that the other £20m must be spent on improving places like toilets and staff areas.
"I want to see real improvement in these areas," he said.
"Upgrading sometimes neglected areas like pupil toilets, staff bases and playgrounds will make a world of difference to the comfort of both staff and pupils.
"I also hope that the additional funds for education resources, all of which must be devolved to schools on top of existing budgets, will allow headteachers to make their wish lists a reality."
The £20m will go to councils, who will decide which schools should benefit.