In my opinion this will only worsen your loss, this is one that makes you lose money if you believe, try changing your mindset because gambling is done just for fun, not to find wealth there. As for the profit you get, it is the bonus you receive and it is your luck.
if you feel it helps then do it but I don't recommend it because it will only increase your wishful thinking to be able to win
in short, even if he devised a different script, different from martingale, he may still end up losing because dice is luck-based game. how many times have we seen here threads trying to formulate a strategy in dice? aside from that, there's HE. but of course, everyone is free to create his own algo on this game, and try it for himself if it will work.
It seems like you still need people who would try that strategy to see if it's effective but as for me, that still has a huge risk simply because we all know that dice is a luck-based game. There's still no definite proof that providing script and codes could assure an advantage so I guess just enjoying the whole game would be better.
i guess, in time, the OP will realise that instead of breaking his head to smoothen his script, just enjoy dice and don't overthink about it.