Sustain pedal for e-wind instrument (script that hold the last breath CC value))

Not sure I understand your issue very well, but you could perhaps use the sustain Scriptlet given here: