At first, it was quite tricky for me to navigate the bus system here especially with all the scams at bus stations but I picked some few tips to help me out.
Buy tickets at the ticket window. In nearly all bus stations I was at touts would approach me offering to sell me tickets, of course at a higher price than the standard price, at ticket windows prices are displayed and you can't be overcharged.
Take your luggage aboard with you rather than keeping it in the bus luggage compartments, in Morocco you pay for that, in case your bags can't fit in the overhead luggage compartment and you have to keep it in the lower compartments, don't pay more than 25 Dirhams, NOTE; touts will try to overcharge you.
Some touts will even try to charge you even if you place your luggage in the overhead compartment or between your feet, strongly reject this.
For buses that you board along the highway, ask the tout for the price before you board.
If you can, go for luxury buses rather than local buses, the experience is way easier. The two major luxury bus service providers are CTM and Supratours. Unlike local buses, luxury buses are air-conditioned and don't stop frequently along the way.