List of Scottish monarchs
The Kingdom of the Picts just became known as Kingdom of Alba in Gaelic, which later became known in Scots and English as "Scotland"; the terms are retained in both languages to this day. By the late 11th century at the very latest, Scottish kings were using the term "rex Scottorum", or King of Scots, to refer to themselves in Latin. The Kingdom of Scotland was merged with the Kingdom of England to form a single Kingdom of Great Britain in 1707. Thus Queen Anne became the last monarch of the ancient kingdoms of Scotland and England and the first of Great Britain, although the kingdoms had shared a monarch since 1603 (see Union of the Crowns). Her uncle Charles II was the last monarch to be crowned in Scotland, at Scone in 1651. He had a second coronation in England ten years later.
List of heirs to the Scottish throne
Since an illness in 1679, the new Queen had been barren, so she and her husband had no children to carry on the line. The Claim of Right Act was passed in April 1689, establishing the constitutional basis for the accession of William and Mary, and that they would reign jointly, and then that the survivor would reign alone. 
Queen Mary died on 28 December 1694, and King William became sole monarch of Scotland.