First the non-breaking issues: You have a lot of double semi-colons there (;;), that wont break it but are unneeded. You are using very short variable names - especially when you are using you many, its very hard to tell what is what. VS Code tells me the first two (def and atk) aren't actually used, so its possible you have gotten confused over what each is. A rule of thumb: variable names should be long enough to understand what they mean. In early programming years, it was often necessary to keep variable names short - those years are long gone. You can make variable names 50-letters long if necessary to help you remember what they are for. Finally, the {silent:true} in setAttrs: this might not be a problem, but you need to make sure its actually necessary when you use it. Don't include it in workers automatically. When you include it, it means none of the attributes changed in this worker will trigger other sheet workers - but you often want other sheet workers to respond to attribute changes. Now the breaking issues. All three lines below are faulty. let brm = (brs = 1) ? (dfm) : (0); output[finalattack] = Math.round(atm += bep += brm -= nes += dvs += prp); output[finaldefence] = Math.round(dfm -= ben -= brm -= prn -= stn); The first line should be let brm = (brs === 1) ? (dfm) : (0); In javascript, a single = always assigns a value. So with (brs = 1) it is not checking if brs equals 1 - it is setting brs to a value of 1. That means the true value (dfm) is always used. You need to use double or triple equality to do a comparison. == checks the value, but not the type, and is inherently unsafe. Strings will be coerced to integers, and other data types will be transformed to find a match. You almost always dont want this to happen. === compares the value and the data type, so (brs === 1) will return true if brs is 1, but false if brs is "1" (a string). If you're writing your script properly, the data should be in the correct data type, and when its in the wrong data type, it is a clue something is wring so its best to use the triple equality. Also, this will cause an error: atm += bep += brm -= nes += dvs += prp The += and -= shorthand are great, but you can only have one of them. It's useful when you are doing something like a = a + 3; You can instead do one of a += 3; a =+ 3; But when you are adding a chain of things together, it's just arithmetic and you use the normal rules: atm + bep + brm - nes + dvs + prp Finally, (and this one is very tricky): output[finalattack] This syntax in itself is fine, when you have a variable called finalattack, which has a value. But there is no finalattack variable here. You actually are wanting to give the string, 'finalattack'. That should be output['finalattack'] or output.finalattack So that sheet workers should probably be on('change:attack change:defence change:attackmodded change:defencemodded change:berserkneg change:preciseneg change:stillnessneg change:bloodrageselect change:nonprofselect change:deathvowselect sheet:opened', () => { getAttrs(['defencemodded','attackmodded','berserkneg','berserkpos','preciseneg','precisepos','stillnessneg','bloodrageselect','nonprofselect','deathvowselect'], v=> { const output = {}; let brs = parseInt(v.bloodrageselect) || 0; let atm = parseInt(v.attackmodded) || 0; let dfm = parseInt(v.defencemodded) || 0; let bep = parseInt(v.berserkpos) || 0; let ben = parseInt(v.berserkneg) || 0; let nes = parseInt(v.nonprofselect) || 0; let dvs = parseInt(v.deathvowselect) || 0; let prp = parseInt(v.precisepos) || 0; let prn = parseInt(v.preciseneg) || 0; let stn = parseInt(v.stillnessneg) || 0; let brm = (brs === 1) ? (dfm) : (0); output['finalattack'] = Math.round(atm + bep + brm - nes + dvs + prp); output['finaldefence'] = Math.round(dfm - ben - brm - prn - stn); setAttrs(output, {silent:true}); }); }); With the caveat that you probably dont want the {silent:true} part, and you need to check those arithmetic sections are doing what you want. I notice that in finaldefence, you have -brm, and brm sometimes equals dfm (defencemodded), so you might have in there dfm - dfm, or 0. I just want to check that's intended.