I don't know if someone aready made this, but this is a very basic script that replicates the revolver (multiplayer) and crossbow's zoom function that can use on any other weapon.
// zoom script
bind b "default_fov 40"
bind n "default_fov 106.27"
bind m "default_fov 20"