How do I stop them when I click on an object?
I'm a little tired right now so sorry if this answer is wrong, also sorry for replying late.
Do you want them to stay popped up or not pop back up. I'll assume stay down.
I think you would need a local variable like onHit and set it to zero or false to begin with.
So it could be like: Every random(0,1) seconds
onHit = false set visible
now when you hit the mole set onHit to True and it shouldn't pop up anymore. Then you could also play like an animation or sound effect or explosion to mark that you got a hit and set the moles invisible and it should stop popping up.
Edit: Another possibly easier option would be to just destroy the mole.
On hit mole destroy