I agree with this answe : first of all, you question is really vague, you should really try and make it simpler for people to answer, and dont ask from people to write a full script for you either, because its just not fair!
as for the question, if i understand correctly you can use signals.connect function, and the call method option in the animation player.
You can create a signal for each scene(or a signal with a variable to tell which scene), connect those signals to the functions which will response, and use the animation player call method to emit the signals(explanations on all you can find both in the Q&A and in the docs)