function ScreenSpace.ScreenToWorldByHeightDepth(i,c,K,J)local Q=ScreenSpace.AspectRatio()local o=math.tan(math.rad(workspace.CurrentCamera.FieldOfView)/2)local D=Q*o local g,B=ScreenSpace.ViewSizeX(),ScreenSpace.ViewSizeY()local X=((-(K/B)*2)*o)*J local V,n=(i/g)*2-1,(c/B)*2-1 local F=(V*-D)*J local H=(n*o)*J return Vector3.new(F,H,J),X end

function ScreenSpace.ScreenToWorldByHeightDepth(x, y, screenHeight, depth)
	local aspectRatio = ScreenSpace.AspectRatio()
	local hfactor = math.tan(math.rad(workspace.CurrentCamera.FieldOfView)/2)
	local wfactor = aspectRatio*hfactor
	local sx, sy = ScreenSpace.ViewSizeX(), ScreenSpace.ViewSizeY()
	--
	local worldHeight = -(screenHeight/sy) * 2 * hfactor * depth
	--
	local xf, yf = x/sx*2 - 1, y/sy*2 - 1
	local xpos = xf * -wfactor * depth
	local ypos = yf *  hfactor * depth
	--
	return Vector3.new(xpos, ypos, depth), worldHeight
end
