In minecraft bedrock(1.14.30), is it possible to detect if a player is standing still, and then give them a potion effect if they are?

I'm making a little game for me and my friends to play, but the one part I can't seem to figure out is the question posed in the title. I want to give a player that stands still withering to promote people to keep moving.


Solution 1:

Run /setblock to set a unique block under the player. Then after your time limit perform an execute/detect variant which conditionally gives the /effect you need. Be sure to /setblock the unique block back to something else afterward.