Mind Flay

3rd-level Enchantment
Casting Time: 1 action
Range: 30 feet
Components: VS
Duration: (C) 1 minute

You reach out and create a line of scintillating energy that connects your mind to that of the target, assaulting their psyche with a barrage of psychic energy. The target must make an Intelligence saving throw. On a failed save, the target takes 3d8 psychic damage, and at the start of each of your turns for the duration, you deal 2d8 psychic damage to the target automatically. On a successful save, the creature takes half as much damage, and the spell ends. The spell also ends if the target is ever outside the spell's range or if it has total cover from you.
As long as the creature is affected by this spell, their movement speed is halved as their body is wracked with pain.
At Higher Levels. When you cast this spell using a spell slot of 4th level or higher, the initial damage increases by 1d8 for each slot level above 3rd, and the damage on subsequent rounds increases by 1d8 for every two slot levels above 3rd.

Source: Homebrew