well.. yes..
and NO .. unfortunately that's the correct answer I'm afraid
Yes, the motor will take 30V most likely without ANY issues,
except maybe one small thing.. it may not even result in any additional power.
That's the 'yes'-part
the no part is much mor "if-fy"
IF the controller that the scooter holds, allows you to run 30V without burning through,
or without just throttling down to again 24V
then you still might loose a serious amount of Amps;
namely the ones the 6V battery, cannot provide when connected in series, the amps
will be throttled by the weaker battpack.
So, if the 6V pack cannot provide the same amperage as your 24V batpack, that'll be your bottleneck.
Can it be done?
Yes, maybe it needs a new controller, maybe it needs a new (different aka larger) 6V battery to make it useable.. but motorwise that shouldn't be a problem at all.
the charger would most likely cease to work though, again dependig on it's specs,
but from here, without any further information, I'd go for "nope"
'sid