local A=Instance.new("\087\101\100\103\101\080\097\114\116")A.Material=Enum.Material.SmoothPlastic A.Anchored=true A.CanCollide=false A.Color=Color3.new(1,1,1)return function(m,Y,x,a)local s,t,I=x-Y,a-Y,a-x local Q,Z,W=s:Dot(s),t:Dot(t),I:Dot(I)if Q>Z and Q>W then a,Y=Y,a elseif Z>W and Z>Q then Y,x=x,Y end s,t,I=x-Y,a-Y,a-x local D=(t:Cross(s)).Unit local o=(I:Cross(D)).Unit local P=I.Unit local q=math.abs(s:Dot(o))local i=math.abs(s:Dot(P))local c=math.abs(t:Dot(P))local j=A:Clone()j.Size=Vector3.new(0,q,i)j.CFrame=CFrame.fromMatrix((Y+x)/2,D,o,P)j.Parent=m local r=A:Clone()r.Size=Vector3.new(0,q,c)r.CFrame=CFrame.fromMatrix((Y+a)/2,-D,o,-P)r.Parent=m return j,r 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