A creature you touch must make an Intelligence saving throw against your spell save DC. On a successful Intelligence save, the creature must also succeed on a Constitution saving throw against your spell save DC to maintain concentration on any active spells. On a failed Intelligence save, the creature loses concentration on any active spells and becomes cursed with antimagic.
A cursed creature loses the ability to use their highest level spell slots. These spell slots can not be restored during rest or by any other feature or ability such as Arcane Recovery.
This curse can be lifted by spells such as Dispel Magic, Greater Restoration, Remove Curse, or similar magic. However, a cursed creature is not able to remove this curse by casting a spell on themself.
If this spell is cast at 8th level or higher, after a failed Intelligence save, the creature must make a second Intelligence saving throw. On a second failed Intelligence save, the cursed creature loses the ability to use any spell slot of 6th level or higher.
If this spell is cast at 9th level, after two failed Intelligence saves, the creature must make a third Intelligence saving throw. On a third failed Intelligence save, the cursed creature loses all ability to cast spells.
How long does the spell last? it says instantaneous which would make this spell useless to my understanding
That's a good question!
When I wrote this, I intended it to work differently from the Bestow Curse spell. https://www.dndbeyond.com/spells/bestow-curse The target of the Bestow Curse spell becomes "cursed for the duration of the spell".
The intent was: the Antimagic Curse spell applies the curse instantaneously. The spell ends. The curse remains. There is no condition that lifts the curse after a duration of time. This does not require concentration from the caster.
Perhaps it would be better to change it to say the target becomes cursed for the duration of the spell, and then change the duration to "until dispelled". The mechanics would be identical, but the wording might be more in line with what players are accustomed to.
The unlimited duration was one of the reasons this is a 7th level spell rather than a 3rd level spell. However, Bestow Curse can be upcasted to 9th level in order to eliminate any duration. For this spell, I wanted upcasting to increase the severity of the curse rather than the duration. This is certainly debatable but I think at 7th level, this curse's effect is weaker than Bestow Curse so having a greater duration somewhat balances it out.
Obviously, as a DM you can change it to whatever you want. If you wanted to add a time limit, I would make it at least 24 hours to align with Bestow Curse.