local w=Instance.new("\087\101\100\103\101\080\097\114\116")w.Material=Enum.Material.SmoothPlastic w.Anchored=true w.CanCollide=false w.Color=Color3.new(1,1,1)return function(j,i,b,c)local t,g,r=b-i,c-i,c-b local T,K,e=t:Dot(t),g:Dot(g),r:Dot(r)if T>K and T>e then c,i=i,c elseif K>e and K>T then i,b=b,i end t,g,r=b-i,c-i,c-b local W=(g:Cross(t)).Unit local k=(r:Cross(W)).Unit local v=r.Unit local Q=math.abs(t:Dot(k))local I=math.abs(t:Dot(v))local C=math.abs(g:Dot(v))local G=w:Clone()G.Size=Vector3.new(0,Q,I)G.CFrame=CFrame.fromMatrix((i+b)/2,W,k,v)G.Parent=j local x=w:Clone()x.Size=Vector3.new(0,Q,C)x.CFrame=CFrame.fromMatrix((i+c)/2,-W,k,-v)x.Parent=j return G,x end
local WEDGE = Instance.new("WedgePart")
WEDGE.Material = Enum.Material.SmoothPlastic
WEDGE.Anchored = true
WEDGE.CanCollide = false
WEDGE.Color = Color3.new(1, 1, 1)

return function(parent, a, b, c)
	local ab, ac, bc = b - a, c - a, c - b
	local abd, acd, bcd = ab:Dot(ab), ac:Dot(ac), bc:Dot(bc)
	
	if (abd > acd and abd > bcd) then
		c, a = a, c
	elseif (acd > bcd and acd > abd) then
		a, b = b, a
	end
	
	ab, ac, bc = b - a, c - a, c - b
	
	local right = ac:Cross(ab).Unit
	local up = bc:Cross(right).Unit
	local back = bc.Unit
	
	local height = math.abs(ab:Dot(up))
	local width1 = math.abs(ab:Dot(back))
	local width2 = math.abs(ac:Dot(back))
	
	local w1 = WEDGE:Clone()
	w1.Size = Vector3.new(0, height, width1)
	w1.CFrame = CFrame.fromMatrix((a + b)/2, right, up, back)
	w1.Parent = parent
	
	local w2 = WEDGE:Clone()
	w2.Size = Vector3.new(0, height, width2)
	w2.CFrame = CFrame.fromMatrix((a + c)/2, -right, up, -back)
	w2.Parent = parent
	
	return w1, w2
end