[HELP] Hotspot profile script to limit certain packet mark to a specified speed

Does anyone know how to place a script on a hotspot profile that will limit a certain packets to a certain speed.

ex. I have a profile that is 1mb download / 1mb upload.
but i want traffic that has the packet of “browsing” limited to 512kbps down / 512kbps up only
so that the remaining available traffic will be available to other packets.

Thank you.