Scripts for auto PCQ

Good day my wonderful friends need help with script
It is my firt time writing here and my english don´t is well. ok ok. I want buiding a script that can change de value of PCQ in funtion of Download PCQ Queues. I trie to esamble the script but I can do, then I come here for you help

My idea is this

:global speed;
:global users [/queue simple get [find name=“All-PCQ”] Download PCQ Queues];
:put $users
if ($user == 1 ){ put rate Todos-PCQ rate = 0M }
if ($user == 2 ){ put rate Todos-PCQ rate = 5M }

The idea is that with the number of users who are downloading, the bandwidth is calculated every 1 minute through a script, since unfortunately I do not believe much in automatic PCQ.