function ScreenSpace.ScreenToWorldByWidthDepth(o,Z,h,K)local H=ScreenSpace.AspectRatio()local V=math.tan(math.rad(Workspace.CurrentCamera.FieldOfView)/2)local e=H*V local I,c=ScreenSpace.ViewSizeX(),ScreenSpace.ViewSizeY()local w=(((h/I)*2)*-e)*K local g,l=(o/I)*2-1,(Z/c)*2-1 local b=(g*-e)*K local M=(l*V)*K return Vector3.new(b,M,K),w end

function ScreenSpace.ScreenToWorldByWidthDepth(x, y, screenWidth, 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 worldWidth = (screenWidth/sx) * 2 * -wfactor * 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), worldWidth
end
