local r={AcrylicBlur=require(script.AcrylicBlur),CreateAcrylic=require(script.CreateAcrylic),AcrylicPaint=require(script.AcrylicPaint)}function r.init()local R=Instance.new("\068\101\112\116\104\079\102\070\105\101\108\100\069\102\102\101\099\116")R.FarIntensity=0 R.InFocusRadius=.1 R.NearIntensity=1 local a={}function r.Enable()for r,R in next,a do R.Enabled=false end R.Parent=game:GetService("\076\105\103\104\116\105\110\103")end function r.Disable()for r,R in next,a do R.Enabled=R.enabled end R.Parent=nil end local function e()local function r(r)if r:IsA("\068\101\112\116\104\079\102\070\105\101\108\100\069\102\102\101\099\116")then a[r]={enabled=r.Enabled}end end for R,a in next,(game:GetService("\076\105\103\104\116\105\110\103")):GetChildren()do r(a)end if(game:GetService("\087\111\114\107\115\112\097\099\101")).CurrentCamera then for R,a in next,(game:GetService("\087\111\114\107\115\112\097\099\101")).CurrentCamera:GetChildren()do r(a)end end end e()r.Enable()end return r
local Acrylic = {
	AcrylicBlur = require(script.AcrylicBlur),
	CreateAcrylic = require(script.CreateAcrylic),
	AcrylicPaint = require(script.AcrylicPaint),
}

function Acrylic.init()
	local baseEffect = Instance.new("DepthOfFieldEffect")
	baseEffect.FarIntensity = 0
	baseEffect.InFocusRadius = 0.1
	baseEffect.NearIntensity = 1

	local depthOfFieldDefaults = {}

	function Acrylic.Enable()
		for _, effect in next, depthOfFieldDefaults do
			effect.Enabled = false
		end
		baseEffect.Parent = game:GetService("Lighting")
	end

	function Acrylic.Disable()
		for _, effect in next, depthOfFieldDefaults do
			effect.Enabled = effect.enabled
		end
		baseEffect.Parent = nil
	end

	local function registerDefaults()
		local function register(object)
			if object:IsA("DepthOfFieldEffect") then
				depthOfFieldDefaults[object] = { enabled = object.Enabled }
			end
		end

		for _, child in next, game:GetService("Lighting"):GetChildren() do
			register(child)
		end

		if game:GetService("Workspace").CurrentCamera then
			for _, child in next, game:GetService("Workspace").CurrentCamera:GetChildren() do
				register(child)
			end
		end
	end

	registerDefaults()
	Acrylic.Enable()
end

return Acrylic
