local g=cutPlane.CFrame.rightVector if choppingBlock then pos1,size1,pos2,size2=slicePart(choppingBlock,cutPlane.Position,g)end if pos1 and(size1 and(pos2 and size2))then local g=choppingBlock:Clone()g.Size=size1 g.CFrame=CFrame.new(pos1)g.Parent=choppingBlock.Parent g.Anchored=true g.Name="\049"local V=choppingBlock:Clone()V.Size=size2 V.CFrame=CFrame.new(pos2)V.Parent=choppingBlock.Parent V.Anchored=true V.Name="\050"choppingBlock:Destroy()if script:GetAttribute("\068\105\114\101\099\116\105\111\110")=="\076\101\102\116"then workspace["\049"].Parent=workspace.Stacked workspace["\050"].Anchored=false workspace["\050"].Name="\068\101\108\101\116\101"debris:AddItem(workspace.Delete,60)elseif script:GetAttribute("\068\105\114\101\099\116\105\111\110")=="\082\105\103\104\116"then workspace["\050"].Parent=workspace.Stacked workspace["\049"].Anchored=false workspace["\049"].Name="\068\101\108\101\116\101"debris:AddItem(workspace.Delete,60)elseif script:GetAttribute("\068\105\114\101\099\116\105\111\110")=="\084\111\112"then workspace["\049"].Parent=workspace.Stacked workspace["\050"].Anchored=false workspace["\050"].Name="\068\101\108\101\116\101"debris:AddItem(workspace.Delete,60)elseif script:GetAttribute("\068\105\114\101\099\116\105\111\110")=="\066\111\116\116\111\109"then workspace["\050"].Parent=workspace.Stacked workspace["\049"].Anchored=false workspace["\049"].Name="\068\101\108\101\116\101"debris:AddItem(workspace.Delete,60)end end


local normal = cutPlane.CFrame.rightVector; 
if choppingBlock then
	pos1, size1, pos2, size2 = slicePart(choppingBlock, cutPlane.Position, normal);
	--choppingBlock.Anchored = false;
end

if (pos1 and size1 and pos2 and size2) then
	local part = choppingBlock:Clone();
	part.Size = size1;
	part.CFrame = CFrame.new(pos1);
	part.Parent = choppingBlock.Parent;
	part.Anchored = true
	part.Name = "1"

	local part = choppingBlock:Clone();
	part.Size = size2;
	part.CFrame = CFrame.new(pos2);
	part.Parent = choppingBlock.Parent;
	part.Anchored = true
	part.Name = "2"
	
	choppingBlock:Destroy();
	if script:GetAttribute("Direction") == "Left" then
		workspace["1"].Parent = workspace.Stacked
		workspace["2"].Anchored = false
		workspace["2"].Name = "Delete"
		debris:AddItem(workspace["Delete"], 60)
	elseif script:GetAttribute("Direction") == "Right" then
		workspace["2"].Parent = workspace.Stacked
		workspace["1"].Anchored = false
		workspace["1"].Name = "Delete"
		debris:AddItem(workspace["Delete"], 60)
	elseif script:GetAttribute("Direction") == "Top" then
		workspace["1"].Parent = workspace.Stacked
		workspace["2"].Anchored = false
		workspace["2"].Name = "Delete"
		debris:AddItem(workspace["Delete"], 60)
	elseif script:GetAttribute("Direction") == "Bottom" then
		workspace["2"].Parent = workspace.Stacked
		workspace["1"].Anchored = false
		workspace["1"].Name = "Delete"
		debris:AddItem(workspace["Delete"], 60)
	end
end
