>>144258here's my js function to get the last digits of a number, will probably help with writing the script if you do
function getLastDigits(num, count) {
const digits = Array(count)
for (i = 1; i <= count; i++) {
let digit = num % (10**i)
if (i > 1) {
digit = digit / (10**(i-1))
}
Post too long. Click here to view the full text.