It's done, but without script.
I just use :
if $game_actors[$game_variables[X]].class.id == new_class_id
$game_variables[Y] = 0
else
$game_variables[Y] = 1
$game_actors[$game_variables[X]].change_class(new_class_id)
end
where
X = 1st party member or 2nd or 3th or etc.
new_class_id = the class id you choose
Y = variable to detect if actor class same with the class you choose.
PS: English is not my native language so if I wrote wrong please don't mind about it.