I wrote a ~2k line script, was undetected for around a week or two, running for 5+ hrs a day, but after the first ban the other bans came in after using the script for like 2 days (stealth injection, didn't use proxies to be fair). I don't think writing your own script makes much of a difference anymore (I'm sure it used to years back).