custom-random random function but you can custom it. local crandom = require("crandom") local seed, step = 1234, -1 print(crandom:random(seed, step))