The first minister has told students that they should continue to “hope for better things”.
And Nicola Sturgeon said improving ourselves “should not end when we leave school”.
Ms Sturgeon made her comments in a recorded video for pupils at Hyndland Secondary School.
The school invited the first minister to lend support to the school’s fundraising campaign.
Pupils have embarked on an inspirational programme of activities and talks around the motto Spero Meliora – ‘I hope for better things’.
Ms Sturgeon said she thought the message behind the campaign was really important.
The 75-second video has been posted on Twitter by teacher Paul Downie who has been working with pupils on the campaign.
He said in a post: “Huge thanks to @NicolaSturgeon for taking the time to record this message about our @HyndlandSec school motto #SperoMeliora which was shared with all staff at today’s inservice day and will be shown to all pupils in assembly next week.”
The first minister’s message reads: “I think Hyndland Secondary’s motto Spero Meliora – ‘I hope for better things’ – says something really important about how all of us should live.
“At the moment you’re all learning at school about different subjects, different people – and about the world around us.
“That’s a vital part of developing as a person – and of preparing to lead happy, successful and productive lives in the future.
“But of course trying to improve ourselves should not end when we leave school.
“At any age it is vital that we continue to hope for better things – by giving our best and trying hard at whatever we do.
First minister of Scotland:
“I think Hyndland Secondary’s motto Spero Meliora – ‘I hope for better things’ – says something really important about how all of us should live.”
“That’s not just about making the most of ourselves as individuals – although that’s very important.
“It’s also about contributing our knowledge, our talents and our hard work for the benefit of society – by making life better for others.
“That basic idea of improving things for people is something we should all strive for.
“That’s why I think the message of your school motto is so important.
“And I’m confident that if all of you continue to live by it, you will all go on to achieve great things in the future – for yourselves, for your school, and for Scotland.”
Huge thanks to @NicolaSturgeon for taking the time to record this message about our @HyndlandSec school motto #SperoMeliora which was shared with all staff at today’s inservice day and will be shown to all pupils in assembly next week. pic.twitter.com/kETwx3Hia9
— Mr Downie (@mr_downie) February 14, 2018
Staff and pupils want to work with the local community to raise more than £10,000 over the course of the year.
The money will go towards purchasing a new school minibus and such things as activities for children who can’t afford the costs.
Part of the programme has seen inspirational speakers give talks to the school.
The adventurer Mark Beaumont and the athlete Eilidh Doyle have already appeared.
Next month is the turn of the award-winning Scottish wildlife cameraman Doug Scott.