How to make scope & ironsight

I want to make a simple weapon with a ironsight or scope, but i didnt learn much from google and some ironsighted weapons i downloaded.
So facepunch is one of my last hopes.

Use that Print the Cords in console and slap them into your Swep’s shared.lua

I need a function to activate the ironsight and i think i need to make some kind of function in a weapon base too, which is the problem.