--

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()
	local vel = Instance.new("BodyVelocity", RootPart)
	vel.MaxForce = Vector3.new(1,1,1) * 1000000;
	vel.Parent = RootPart
	vel.Velocity = Vector3.new(1,1,1) * p.Character:WaitForChild("HumanoidRootPart").CFrame.LookVector * 0
	vel.Name  =  "SmallMoveVel"
	game.Debris:AddItem(vel,10)
	wait(6)
	script.Parent.Parent.VoidStart:Play()
	DB.Parent = workspace.Effects
	DM.Parent = workspace.Effects
	DB.CFrame = RootPart.CFrame * CFrame.new(0,0,0)
	RootPart.CFrame = workspace["Domain Point"].CFrame * CFrame.new(0,0,0)
	DM.CFrame = workspace["Domain Point"].CFrame * CFrame.new(0,0,0)
	local hitcontent = workspace:GetPartBoundsInBox(DB.CFrame, Vector3.new(70, 70, 70))
	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
				RootPart2.CFrame = workspace["Domain Point"]["Domain Point2"].CFrame * CFrame.new(0,0,0)
				local velE = Instance.new("BodyVelocity", RootPart2)
				velE.MaxForce = Vector3.new(1,1,1) * 1000000;
				velE.Parent = RootPart2
				velE.Velocity = Vector3.new(1,1,1) * p.Character:WaitForChild("HumanoidRootPart").CFrame.LookVector * 0
				velE.Name  =  "SmallMoveVel"
				game.Debris:AddItem(velE,17)
			end
		end
	end
	wait(4)
	anim:stop()
	wait(13)
	local hitcontent = workspace:GetPartBoundsInBox(DM.CFrame, Vector3.new(300, 300, 300))
	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
				RootPart2.CFrame = DB.CFrame * CFrame.new(0,0,0)
			end
		end
	end
	RootPart.CFrame = DB.CFrame * CFrame.new(0,0,0)
end)
