I would start reducing the if-elses in onGetFormulaValues. You can use a lookup table to get its value.
local formulaLookupTable = {
1.87, 1.91, 1.95, 1.99, 2.03, 2.07, 2.11, 2.15, 2.19, 2.23
}
function onGetFormulaValues(player, level, magicLevel)
local storageTierRune =...