This cannot be done. Scopes are MATLAB figure windows, use MATLAB code in the background, and hence do not support code generation.
Assuming you are only interested in desktop simulation (i.e. not real-time code generation) then what you can do is write a MATLAB GUI that calls a Simulink Coder (RSIM target) generated exe (to run a simulation and store the results in .mat file), then deploy the MATLAB GUI using the MATLAB Compiler. It's far from ideal, but can be made to work.