Get a copy of Collins Pocket Scots Dictionary, available used on Amazon for as little as $4.99, study it, and never ever use any of the local or slang terms used in it. (Some of the geographical terms are helpful.) You don't want to come across as pretentious or condescending, especially to the Scots, who are among the most down-to-earth people on the planet.
If you get to know someone during your travels in Scotland, you can break the ice by asking what a specific phrase or word means. Say that you saw the word or phrase in a newspaper/book/magazine. You and your new friend can have a good laugh!
As the Scots speak English just as well as you or I do, only with a slightly different accent, they would feel insulted if you tried to copy their accent. Now if you were in a different country, where English is not the primary language, then you could try out your foreign language skills. And yes, people in those countries will appreciate your effort to converse in their language.
Having said that, if you get up to the Aberdeen area, and hear some of the older folk conversing in the local Doric dialect, you may feel that you are, indeed, in a foreign country. Many Scots don't understand Doric.
Good luck in your travels!