local x=Instance.new("\087\101\100\103\101\080\097\114\116")x.Material=Enum.Material.SmoothPlastic x.Anchored=true x.CanCollide=false x.Color=Color3.new(1,1,1)return function(C,I,N,X)local a,O,q=N-I,X-I,X-N local c,i,T=a:Dot(a),O:Dot(O),q:Dot(q)if c>i and c>T then X,I=I,X elseif i>T and i>c then I,N=N,I end a,O,q=N-I,X-I,X-N local h=(O:Cross(a)).Unit local V=(q:Cross(h)).Unit local Z=q.Unit local F=math.abs(a:Dot(V))local y=math.abs(a:Dot(Z))local s=math.abs(O:Dot(Z))local L=x:Clone()L.Size=Vector3.new(0,F,y)L.CFrame=CFrame.fromMatrix((I+N)/2,h,V,Z)L.Parent=C local U=x:Clone()U.Size=Vector3.new(0,F,s)U.CFrame=CFrame.fromMatrix((I+X)/2,-h,V,-Z)U.Parent=C return L,U 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