function ScreenSpace.ScreenToWorldByHeight(M,J,C,G)local W=ScreenSpace.AspectRatio()local V=math.tan(math.rad(workspace.CurrentCamera.FieldOfView)/2)local j=W*V local N,t=ScreenSpace.ViewSizeX(),ScreenSpace.ViewSizeY()local v=-(t*G)/((C*2)*V)local Z,L=(M/N)*2-1,(J/t)*2-1 local h=(Z*-j)*v local y=(L*V)*v return Vector3.new(h,y,v)end

function ScreenSpace.ScreenToWorldByHeight(x, y, screenHeight, worldHeight)
	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 depth = - (sy * worldHeight) / (screenHeight * 2 * hfactor)
	--
	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)
end
