Can a model feature opaque and tranparent parts in the same material?

Thank you Zamiel. This is what i did in the end. I separated the object using two materials, one for metal and glass and I kept the metal with no transparency and made the glass feature transparency with refraction.
I couldn’t make refraction work as I wanted,
but at least the dirty parts of the glass are opaque by using an alpha mask texture. Still looks like its lacking reflectivity so I need to resolve this problem next…
Here what i have in Unreal (left) and what I have in Substance Painter: