Sheet worker version: Is the typo in the attribute name Intellingence intended? It should be Intelligence. I've used your spelling for simplicity. Also, that is an interesting calculation. What is it meant to be calculating? Here's a sheet worker version: put this at the very end of your character sheet. //sections beginning with two slashes like these are COMMENTS, they are ignored by the script, and are here to explain you how the script works.
<script type="text/worker"> // this tells the browser there are scripts coming. No matter how many scripts you have, you only have this line once. Put all scripts after this line and before the script ending line at the end.
on("change:intellingence ", function() { //this sets up a watcher on the intellingence stat: whenever that stat changes, this script activates. Note: stats in change lines must always be lower case.
getAttrs(["Intellingence"], function(v) { // this line grabs the contents of the attribute, so that the script below can use it. Sheet workers dont automatically know what attributes are, so this is needed.
let int = parseInt(v.Intellingence)||0); // this line converts the intellingence attribute into an integer. The ||0 at the end says "or 0", its basically saying if the attribute has a value it cant read, swap it to a zero. This helps avoid some common script errors.
let result = Math.floor((0.0009*int *int *int )+(-0.029*int*int)+(0.6*int)+0.41)-4; // here's your calculation. This is the simple part!
setAttrs({ // this function is needed to change attributes
"INTmod": result
}); // all these close brackets are confusing, but just remember to keep the right number in the right places.
}); // they match up with earlier open brackets, and are needed to ensure the script ends properly.
});
</script> // put all scripts before this line. IMPORTANT: change your attribute in the html to <input type="text" name="attr_INTmod" value="0"/>