I suspect you have to write a script (in Unix/Linux/OSX style) that uses wolframscript as the shell in order to be able to process arbitrary flags from the command line.
Consider following script file which peels flag name-value pairs from arguments:
#!/usr/bin/env wolframscript -fun
(flag1 = flag2 = Missing;
FixedPoint[Replace[
{{"-flag1", val_, rest___} :> (flag1 = ToExpression@val; {rest}),
{"-flag2", val_, rest___} :> (flag2 = ToExpression@val; {rest}),
{flag_, _, rest___} /; StringMatchQ[flag, "-" ~~ __] :>
(Print["Ignored: ", flag]; {rest})}], {##}];
{flag1, flag2}) &
Effectively the whole program is expressed as a function which takes command line arguments as function arguments.
Now if you set execution permissions for this script, you can run it:
./scriptname -flag3 5 -flag2 10
Ignored: -flag3
{Missing, 10}