Holy Moonlight Greatsword (5e Equipment)
From D&D Wiki
Weapon (longsword), legendary (requires attunement by a non-evil creature who is proficient with longswords and greatswords)
A peculiar longsword with an elongated handle, this legendary weapon has cloth covering the handle and hilt of the blade. When wielded with two hands it emits a dim pale green-blue light. It holds incredible power and gives the wielder a sense of hope. Any paladin or cleric that wields it feels a sense of courage and urgency to slay undead, beasts and aberrations. You have a +3 bonus to attack and damage rolls with this weapon.
Holy Moonlight Sword. When wielded in two hands, a command word can be spoken as a bonus action making the blade erupt into pale light and form into a greatsword. While in this form, this weapon deals 2d6 slashing damage and an additional 1d8 psychic damage. The same command word can be spoken at any time to turn this back into a longsword.
Magical Charges. This weapon comes with 10 charges and regains 1d4 daily at dawn.
As an action, you can expend one charge to make a ranged spell attack against one creature within 30 feet of you, emitting a beam of psychic energy. When you make the spell's attack, you do so with a bonus of +10. This beam of energy deals 8d8 psychic damage upon hitting.
Also as an action, you may expend 2 charges to create a 30ft long 5ft wide line of light straight in front of you. Any creature caught in the effect must make a DC 17 Dexterity saving throw. On a failed save, a target takes 6d10 psychic damage. On a success, they take half as much.