Minergate already has a web miner for Cryptonote-based currencies. Both of the currencies you listed are cryptonote, so this miner should work for you.
https://minergate.com/web-miner#!
If you want to send coins for me finding this (although it wouldn't be fair of me to require that, since it's just a Google search from memory), 1LSxsU1MwDWj259q9T2pUMsvjzhj666Kjf.
Like how many monero can some one get on a good cpu using this script?
you looking for a miner, wallet or both?
Just a miner script to put in a website and when a visitor comes then the visitor should mine coins for me to support my website.
I guess what you are looking for is not legitimate to mine coin on other people cpu just because they visited your website and without their consent and authorizations is a
FRAUD