My ex is (or was) using drugs; will that help me get custody?
It might. If this can be brought to the attention of the judge (or better yet, a custody evaluator), it may be a decisive factor.
Marijuana use isn't considered to be as serious an offense as it used to be, but the use of cocaine, heroin, and amphetamines, as well as "designer drugs" like Ecstasy, is taken very seriously by most judges and evaluators.
For more on drug testing, read Drug Testing.