Here is the script.
lua``` local Players = game:GetService('Players') local toolName = 'LightningSword'
Players.PlayerAdded:Connect(function(Player) Player.CharacterAdded:Connect(function(Character) local Humanoid = Character:WaitForChild('Humanoid') Humanoid.Died:Connect(function() if Character:FindFirstChild(toolName) or Player.Backpack:FindFirstChild(toolName) then
local lightning = LightningEffect
lightning vector = Humanoidrootpart
properties = Anchored = true
humanoid can collide = false end end) end) end) ```
