You need to make sure $my_output is a global variable. You need a global statement inside the good() function, and you also may need one at the beginning of the plugin code, depending on the hook being used. So try something like:
Code:
global $my_output;
$my_output = 'Bad';
if(!function_exists('good'))
{
function good()
{
global $my_output;
$my_output = 'Good';
}
}
good();
return $my_output;
ETA: or you could use a reference parameter or return a value from good(), but probably your actual code is different than the example you posted, so maybe that won't work.