I don't know what the wacky world of inheriting nukes in state breakups looks like in terms of precedent(given that our only real experience with it is 'making shit up while the Soviet Union crumbled' there may be little more than handwaving); but it wouldn't at all surprise me if both Scotland and the (slightly less)United Kingdom would have a very strong shared incentive to come up with an amicable deal.
Unless you have the ability(decent strategic air force, missile sub capabilities, or hostile neighbors within easy shooting range) and the desire to wave your nukes around, being a nuclear power is actually kind of a shitty job. Nukes are, well, the nuclear option, so they are of little use except in extreme circumstances; they are expensive and technically demanding to maintain, their PR value is deeply mixed, you have to protect them to avoid proliferation, and they have finite shelf life.
If Scotland wants to get out of the nuclear game; but the UK wants to hold on to some Global Influence, it would be a very, very, mutually convenient arrangement for Scotland to offer a sweetheart deal(if they have some sort of legal claim, maybe a relatively token payment or concession, otherwise just some handshakes and a photo-op) on the warheads in exchange for the UK packing them up, remediating any especially badly contaminated facilities, and otherwise making them Not Our Problem Anymore.
The hypothetical Scottish exit would likely be cleaner than that of the former Soviet republics, so they wouldn't be quite as badly situated; but the post-Soviet states that inherited fissile goodies were generally quite happy to accept Russian, American, or any other outside assistance in just getting the stuff off their hands as fast as possible. Having a real nuclear arsenal is expensive and requires commitment. Having a decaying one is just a proliferation clusterfuck waiting to happen.