--

script.Parent.OnServerEvent:Connect(function(p)
	local Character = p.Character
	local Humanoid = Character.Humanoid
	local RootPart = Character.HumanoidRootPart
	local anim = Humanoid:LoadAnimation(script.Anim)
	anim:Play()
	Humanoid.AutoRotate = false
	script.Parent.Parent.Parent.Handle2.sfx:Play()
	local vel9 = Instance.new("BodyVelocity", RootPart)
	vel9.MaxForce = Vector3.new(1,1,1) * 1000000;
	vel9.Parent = RootPart
	vel9.Velocity = Vector3.new(1,1,1) * p.Character:WaitForChild("HumanoidRootPart").CFrame.LookVector * 0
	vel9.Name  =  "SmallMoveVel"
	game.Debris:AddItem(vel9,3)
	wait(.5)
	script.Parent.Parent.Parent.Handle2.Handle2.Sword.Transparency = 1
	script.Parent.Parent.Parent.Handle1.Sword.Transparency = 0
	for _,Particles in pairs(script.Parent.Parent.Parent.Void.Void:GetDescendants()) do
		if Particles:IsA("ParticleEmitter") then
			Particles:Emit(Particles:GetAttribute("EmitCount"))
		end
	end
	local FX = Assets["None"]:Clone()
	FX.CanCollide = false
	FX.CastShadow = false
	FX.Anchored = true
	FX.Parent = workspace.Effects
	FX.Transparency = 1
	FX.CFrame = RootPart.CFrame * CFrame.new(0,0,0)
	local hitcontent = workspace:GetPartBoundsInBox(FX.CFrame, Vector3.new(30, 30, 30))
	local hitlist = {}
	for _,v in pairs(hitcontent) do
		if v.Parent:FindFirstChild("Humanoid") and v.Parent ~= Character then
			if not hitlist[v.Parent.Humanoid] then
				hitlist[v.Parent.Humanoid] = true
				local RootPart2 = v.Parent.HumanoidRootPart
				v.Parent.Humanoid:TakeDamage(30)
				local vel0 = Instance.new("BodyVelocity", RootPart2)
				vel0.MaxForce = Vector3.new(1,1,1) * 1000000;
				vel0.Parent = RootPart2
				vel0.Velocity = Vector3.new(1,1,1) * v.Parent:WaitForChild("HumanoidRootPart").CFrame.UpVector * .5
				vel0.Name  =  "SmallMoveVel"
				game.Debris:AddItem(vel0,3)
			end
		end
	end
	wait(1.7)
	script.Parent.Parent.Parent.Handle2.Handle2.Sword.Transparency = 0
	script.Parent.Parent.Parent.Handle1.Sword.Transparency = 1
	script.Parent.Parent.Parent.Handle2.Handle2.Attachment.JcutFlareParticle:Emit(15)
	script.Parent.Parent.Parent.Handle2.Sheath:Play()
	Humanoid.AutoRotate = true
	FX:Destroy()
end)
