when did scotland get their freedom from england
In 1328, Edward III signed the Treaty of Edinburgh–Northampton acknowledging Scottish independence under the rule of Robert the Bruce.
History of Scotland
 In 1328, Edward III signed the Treaty of Edinburgh–Northampton acknowledging Scottish independence under the rule of Robert the Bruce. 
wiki:7773789
History of Scotland [SEP] The Wars of Independence
In 1326, what may have been the first full Parliament of Scotland met. The parliament had evolved from an earlier council of nobility and clergy, the "colloquium", constituted around 1235, but perhaps in 1326 representatives of the burghs – the burgh commissioners – joined them to form the Three Estates. In 1328, Edward III signed the Treaty of Edinburgh–Northampton acknowledging Scottish independence under the rule of Robert the Bruce. However, four years after Robert's death in 1329, England once more invaded on the pretext of restoring Edward Balliol, son of John Balliol, to the Scottish throne, thus starting the Second War of Independence.