Determine the "Luck" of a string
JavaScript (ES7), 123 112 107 bytes

s=&gt;2**[5,4,3,2,1,0].find((i,_,a)=&gt;a.some(j=&gt;s.includes("luckyL".substr(j,i))))-2*~-s.split(/[omen]/).length


Edit: Saved 11 bytes thanks to @Titus by assuming that the letter L does not appear in the input. Saved 5 bytes thanks to @Oriol. ES6 version for 125 114 109 bytes:



f=
s=&gt;(1&lt;&lt;[5,4,3,2,1,0].find((i,_,a)=&gt;a.some(j=&gt;s.includes("luckyL".substr(j,i)))))-2*~-s.split(/[omen]/).length
;
&lt;input oninput=o.textContent=f(this.value)&gt;&lt;pre id=o&gt;&lt;/pre&gt;