I answered your post in the ADHD community. I think the links I provided will prove helpful.
Never hit or spank your child - this does not work. It also gives the impression that hitting and spanking is OK and she could do this to other children or other people.
When she is "unruly", be firm and tell her to go to her bedroom and to come down when she has calmed down.
The "punishment" has to be done there and then.
She is at the age when she is developing he own little personality and at this age things are very confusing for them. Even children that do not have ADHD, go through the same behavioural pattern.
Keep a note of what she eats and drinks as some foods and drinks contain
chemicals that can cause behavioural changes, especially the E numbers. Sometimes children that are tired and don't get enough sleep or rest can become aggressive as well as some children that are coming down with an illness.
You can have a conversation with her to find out what is bothering her after she has calmed down. When she is in that "mode" you won't be able to reason with at all. So best to leave her to stay in her room until her mood is much calmer.
Still give her hugs and kisses and tell her that you love her, but that you do not like her "unruly" behaviour.
Don't forget to spend quality time with her, by doing things she likes. Take her to the park or for a walk, take her swimming, read to her at bedtime if she likes that.
Hitting, spanking, shouting, etc., as you have found does not work.
Give her a warning that is she does not stop, she will have to go to her room. If it continues, then be firm and take her to her room if you have to. Tell her she is to stay there until she is calm and she then can come down.
There will be screaming and shouting - but you must NOT rise to it and you must be firm and stick to your ground.
Best wishes.