The Scottish Parliament rejected the current Brexit bill, setting up a clash between London and Edinburgh.
Legally speaking, Scotland can't do much about Brexit. The U.K. government can go forward with Brexit without Scotland's consent. But it would set up a constitutional crisis of a scale not seen in the 20 years since the Scottish Parliament came to be in its current form.
Scotland voted on independence in 2014, before Brexit. That vote failed, but there's been speculation another independence referendum could happen if London doesn't negotiate terms of Brexit with Edinburgh.
Unless negotiations change things, Scotland will likely not be allowed to control certain agricultural policy post-Brexit.