Any method in gambling will work for some time only, and there is no guaranty that the same performance will repeat next time as well. So don't ever gamble on automated betting because you may lose a lot of money without even you realise it. Just gamble manually sometimes to have fun and find some other ways to earn money.
Manual or automated bets would still have the same results in the end when playing dice games for sure. You wont definitely avoid those lossing streaks even a higher bank roll couldnt guarantee to sustain on long lose streaks. Theres no strategy on having a safe gambling as OP claimed about the code i think its just html order for automation of your playing i guess.