return function(Z,y)if y then setfenv(1,y)end local F=service.New("\083\099\114\101\101\110\071\117\105")local g=Z.Mode local N=client.UI.Register(F,{Name="\069\102\102\101\099\116"})local O=N.BindEvent client.UI.Remove("\069\102\102\101\099\116",F)N:Ready()if g=="\079\102\102"or not g then N:Destroy()elseif g=="\080\105\120\101\108\105\122\101"then local y=Instance.new("\070\114\097\109\101")y.Parent=F local g=workspace.CurrentCamera local O={}local b=Z.Resolution or 20 local U=Z.Resolution or 20 local R=0 local x=Z.Distance or 80 local function Q()for Z,y in pairs(O)do local F=g:ScreenPointToRay(y.X,y.Y,R)local N=workspace:Raycast(F.Origin,F.Direction*x)local O,b=N.Instance,N.Position if O and O.Transparency<1 then y.Pixel.BackgroundColor3=O.BrickColor.Color else y.Pixel.BackgroundColor3=Color3.fromRGB(105,170,255)end end end y.Size=UDim2.new(1,0,1,40)y.Position=UDim2.new(0,0,0,-35)for Z=0,F.AbsoluteSize.Y+50,b do for F=0,F.AbsoluteSize.X+30,U do local g=service.New("\084\101\120\116\076\097\098\101\108",{Parent=y,Text="",BorderSizePixel=0,Size=UDim2.fromOffset(U,b),Position=UDim2.fromOffset(F-U/2,Z-b/2),BackgroundColor3=Color3.fromRGB(105,170,255)})table.insert(O,{Pixel=g,X=F;Y=Z})end end while wait()and(not N.Destroyed and F.Parent)do if not N.Destroyed and not N.Active then wait(5)else Q()end end N:Destroy()elseif g=="\070\097\100\101\079\117\116"then service.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All,false)service.UserInputService.MouseIconEnabled=false for Z,y in pairs(service.PlayerGui:GetChildren())do pcall(function()if y~=F then y:Destroy()end end)end local Z=service.New("\066\108\117\114\069\102\102\101\099\116",{Name="\065\100\111\110\105\115\095\070\097\100\101\079\117\116\095\066\108\117\114";Parent=service.Lighting;Size=0})local y=service.New("\070\114\097\109\101",{Parent=F;BackgroundTransparency=1;BackgroundColor3=Color3.new(0,0,0),Size=UDim2.new(2,0,2,0),Position=UDim2.new(-0.5,0,-0.5,0)})for F=1,0,-0.01 do y.BackgroundTransparency=F Z.Size=56*(1-F)wait(.1)end y.BackgroundTransparency=0 elseif g=="\084\114\105\112\112\121"then local Z=service.Player local y=Instance.new("\070\114\097\109\101")y.BackgroundColor3=Color3.new(0,0,0)y.BackgroundTransparency=0 y.Size=UDim2.new(10,0,10,0)y.Position=UDim2.new(-5,0,-5,0)y.ZIndex=10 y.Parent=F while F and F.Parent do wait(.022727272727273)y.BackgroundColor3=Color3.new(math.random(255)/255,math.random(255)/255,math.random(255)/255)end if F then F:Destroy()end elseif g=="\083\112\111\111\107\121"then local Z=Instance.new("\070\114\097\109\101")Z.BackgroundColor3=Color3.new(0,0,0)Z.Size=UDim2.new(1,0,1,50)Z.Position=UDim2.new(0,0,0,-50)Z.Parent=F local y=Instance.new("\073\109\097\103\101\076\097\098\101\108")y.Position=UDim2.new(0,0,0,0)y.Size=UDim2.new(1,0,1,0)y.BorderSizePixel=0 y.BackgroundColor3=Color3.new(0,0,0)y.Parent=Z local g={299735022,299735054,299735082,299735103,299735133,299735156,299735177,299735198,299735219;299735245;299735269,299735289,299735304,299735320;299735332;299735361,299735379}local N=Instance.new("\083\111\117\110\100")N.SoundId="\114\098\120\097\115\115\101\116\105\100\058\047\047\049\055\052\050\055\048\052\048\055"N.Looped=true N.Parent=F N:Play()while F and F.Parent do for Z=1,#g,1 do y.Image="\114\098\120\097\115\115\101\116\105\100\058\047\047"..g[Z]wait(.1)end end N:Stop()elseif g=="\108\105\102\101\111\102\116\104\101\112\097\114\116\121"then local Z=Instance.new("\070\114\097\109\101")Z.BackgroundColor3=Color3.new(0,0,0)Z.Size=UDim2.new(1,0,1,50)Z.Position=UDim2.new(0,0,0,-50)Z.Parent=F local y=Instance.new("\073\109\097\103\101\076\097\098\101\108")y.Position=UDim2.new(0,0,0,0)y.Size=UDim2.new(1,0,1,0)y.BorderSizePixel=0 y.BackgroundColor3=Color3.new(0,0,0)y.Parent=Z local g={299733203;299733248;299733284,299733309,299733355,299733386;299733404;299733425,299733472,299733489;299733501,299733523;299733544,299733551,299733564;299733570,299733581;299733597,299733609;299733621;299733632;299733640;299733648;299733663,299733674;299733694}local N=Instance.new("\083\111\117\110\100")N.SoundId="\114\098\120\097\115\115\101\116\105\100\058\047\047\049\055\050\057\048\054\052\049\048"N.Looped=true N.Parent=F N:Play()while F and F.Parent do for Z=1,#g,1 do y.Image="\114\098\120\097\115\115\101\116\105\100\058\047\047"..g[Z]wait(.1)end end N:Stop()elseif g=="\116\114\111\108\108\105\110\103"then local Z=Instance.new("\070\114\097\109\101")Z.BackgroundColor3=Color3.new(0,0,0)Z.Size=UDim2.new(1,0,1,50)Z.Position=UDim2.new(0,0,0,-50)Z.Parent=F local y=Instance.new("\073\109\097\103\101\076\097\098\101\108")y.Position=UDim2.new(0,0,0,0)y.Size=UDim2.new(1,0,1,0)y.BorderSizePixel=0 y.BackgroundColor3=Color3.new(0,0,0)y.Parent=Z local g={"\054\049\055\050\048\052\051\054\056\056","\054\049\055\050\048\052\052\052\055\056";"\054\049\055\050\048\052\053\049\057\051";"\054\049\055\050\048\052\053\055\057\055";"\054\049\055\050\048\052\054\052\057\048";"\054\049\055\050\048\052\055\049\055\050";"\054\049\055\050\048\052\055\057\052\055","\054\049\055\050\048\052\056\054\055\052";"\054\049\055\050\048\053\048\049\057\053";"\054\049\055\050\048\053\048\056\057\050";"\054\049\055\050\048\053\049\054\054\057";"\054\049\055\050\048\053\051\048\056\053";"\054\049\055\050\048\053\052\055\053\050","\054\049\055\050\048\053\052\055\053\050";"\054\049\055\050\048\053\051\048\056\053";"\054\049\055\050\048\053\049\054\054\057","\054\049\055\050\048\053\048\056\057\050","\054\049\055\050\048\053\048\049\057\053","\054\049\055\050\048\052\056\054\055\052","\054\049\055\050\048\052\055\057\052\055","\054\049\055\050\048\052\055\049\055\050";"\054\049\055\050\048\052\054\052\057\048","\054\049\055\050\048\052\053\055\057\055";"\054\049\055\050\048\052\053\049\057\051","\054\049\055\050\048\052\052\052\055\056";"\054\049\055\050\048\052\051\054\056\056"}local N=Instance.new("\083\111\117\110\100")N.SoundId="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\050\057\054\056\049\056\057\057"N.Looped=true N.Parent=F N:Play()while F and F.Parent do for Z=1,#g,1 do y.Image="\114\098\120\097\115\115\101\116\105\100\058\047\047"..g[Z]wait(.13)end end N:Stop()elseif g=="\083\116\114\111\098\101"then local Z=Instance.new("\070\114\097\109\101")Z.BackgroundColor3=Color3.new(0,0,0)Z.BackgroundTransparency=0 Z.Size=UDim2.new(10,0,10,0)Z.Position=UDim2.new(-5,0,-5,0)Z.ZIndex=10 Z.Parent=F while F and F.Parent do wait(.022727272727273)Z.BackgroundColor3=Color3.new(1,1,1)wait(.022727272727273)Z.BackgroundColor3=Color3.new(0,0,0)end if F then F:Destroy()end elseif g=="\066\108\105\110\100"then local Z=Instance.new("\070\114\097\109\101")Z.BackgroundColor3=Color3.new(0,0,0)Z.BackgroundTransparency=0 Z.Size=UDim2.new(10,0,10,0)Z.Position=UDim2.new(-5,0,-5,0)Z.ZIndex=10 Z.Parent=F elseif g=="\083\099\114\101\101\110\073\109\097\103\101"then local y=Instance.new("\073\109\097\103\101\076\097\098\101\108")y.Image="\114\098\120\097\115\115\101\116\105\100\058\047\047"..Z.Image y.BackgroundColor3=Color3.new(0,0,0)y.BackgroundTransparency=0 y.Size=UDim2.new(1,0,1,0)y.Position=UDim2.new(0,0,0,0)y.ZIndex=10 y.Parent=F elseif g=="\083\099\114\101\101\110\086\105\100\101\111"then local y=Instance.new("\086\105\100\101\111\070\114\097\109\101")y.Video="\114\098\120\097\115\115\101\116\105\100\058\047\047"..Z.Video y.BackgroundColor3=Color3.new(0,0,0)y.BackgroundTransparency=0 y.Size=UDim2.new(1,0,1,0)y.Position=UDim2.new(0,0,0,0)y.ZIndex=10 y.Parent=F y:Play()end end
--// All global vars will be wiped/replaced except script
--// All guis are autonamed using client.Functions.GetRandom()

return function(data, env)
	if env then
		setfenv(1, env)
	end

	local gui = service.New("ScreenGui")
	local mode = data.Mode
	local gTable = client.UI.Register(gui, { Name = "Effect" })
	local BindEvent = gTable.BindEvent

	client.UI.Remove("Effect", gui)
	gTable:Ready()

	if mode == "Off" or not mode then
		gTable:Destroy()
	elseif mode == "Pixelize" then
		local frame = Instance.new("Frame")
		frame.Parent = gui
		local camera = workspace.CurrentCamera
		local pixels = {}

		local resY = data.Resolution or 20
		local resX = data.Resolution or 20
		local depth = 0
		local distance = data.Distance or 80

		local function renderScreen()
			for _, pixel in pairs(pixels) do
				local ray = camera:ScreenPointToRay(pixel.X, pixel.Y, depth)
				local result = workspace:Raycast(ray.Origin, ray.Direction * distance)
				local part, endPoint = result.Instance, result.Position
				if part and part.Transparency < 1 then
					pixel.Pixel.BackgroundColor3 = part.BrickColor.Color
				else
					pixel.Pixel.BackgroundColor3 = Color3.fromRGB(105, 170, 255)
				end
			end
		end

		frame.Size = UDim2.new(1, 0, 1, 40)
		frame.Position = UDim2.new(0, 0, 0, -35)
		for y = 0, gui.AbsoluteSize.Y + 50, resY do
			for x = 0, gui.AbsoluteSize.X + 30, resX do
				local pixel = service.New("TextLabel", {
					Parent = frame,
					Text = "",
					BorderSizePixel = 0,
					Size = UDim2.fromOffset(resX, resY),
					Position = UDim2.fromOffset(x - (resX / 2), y - (resY / 2)),
					BackgroundColor3 = Color3.fromRGB(105, 170, 255),
				})
				table.insert(pixels, { Pixel = pixel, X = x, Y = y })
			end
		end

		while wait() and not gTable.Destroyed and gui.Parent do
			if not gTable.Destroyed and not gTable.Active then
				wait(5)
			else
				renderScreen()
			end
		end

		gTable:Destroy()
	elseif mode == "FadeOut" then
		service.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
		service.UserInputService.MouseIconEnabled = false

		for _, v in pairs(service.PlayerGui:GetChildren()) do
			pcall(function()
				if v ~= gui then
					v:Destroy()
				end
			end)
		end

		local blur = service.New("BlurEffect", {
			Name = "Adonis_FadeOut_Blur",
			Parent = service.Lighting,
			Size = 0,
		})

		local bg = service.New("Frame", {
			Parent = gui,
			BackgroundTransparency = 1,
			BackgroundColor3 = Color3.new(0, 0, 0),
			Size = UDim2.new(2, 0, 2, 0),
			Position = UDim2.new(-0.5, 0, -0.5, 0),
		})

		for i = 1, 0, -0.01 do
			bg.BackgroundTransparency = i
			blur.Size = 56 * (1 - i)
			wait(0.1)
		end

		bg.BackgroundTransparency = 0
	elseif mode == "Trippy" then
		local v = service.Player
		local bg = Instance.new("Frame")

		bg.BackgroundColor3 = Color3.new(0, 0, 0)
		bg.BackgroundTransparency = 0
		bg.Size = UDim2.new(10, 0, 10, 0)
		bg.Position = UDim2.new(-5, 0, -5, 0)
		bg.ZIndex = 10
		bg.Parent = gui

		while gui and gui.Parent do
			wait(1 / 44)
			bg.BackgroundColor3 = Color3.new(math.random(255) / 255, math.random(255) / 255, math.random(255) / 255)
		end

		if gui then
			gui:Destroy()
		end
	elseif mode == "Spooky" then
		local frame = Instance.new("Frame")
		frame.BackgroundColor3 = Color3.new(0, 0, 0)
		frame.Size = UDim2.new(1, 0, 1, 50)
		frame.Position = UDim2.new(0, 0, 0, -50)
		frame.Parent = gui
		local img = Instance.new("ImageLabel")
		img.Position = UDim2.new(0, 0, 0, 0)
		img.Size = UDim2.new(1, 0, 1, 0)
		img.BorderSizePixel = 0
		img.BackgroundColor3 = Color3.new(0, 0, 0)
		img.Parent = frame
		local textures = {
			299735022,
			299735054,
			299735082,
			299735103,
			299735133,
			299735156,
			299735177,
			299735198,
			299735219,
			299735245,
			299735269,
			299735289,
			299735304,
			299735320,
			299735332,
			299735361,
			299735379,
		}

		local sound = Instance.new("Sound")
		sound.SoundId = "rbxassetid://174270407"
		sound.Looped = true
		sound.Parent = gui
		sound:Play()

		while gui and gui.Parent do
			for i = 1, #textures do
				img.Image = "rbxassetid://" .. textures[i]
				wait(0.1)
			end
		end
		sound:Stop()
	elseif mode == "lifeoftheparty" then
		local frame = Instance.new("Frame")
		frame.BackgroundColor3 = Color3.new(0, 0, 0)
		frame.Size = UDim2.new(1, 0, 1, 50)
		frame.Position = UDim2.new(0, 0, 0, -50)
		frame.Parent = gui
		local img = Instance.new("ImageLabel")
		img.Position = UDim2.new(0, 0, 0, 0)
		img.Size = UDim2.new(1, 0, 1, 0)
		img.BorderSizePixel = 0
		img.BackgroundColor3 = Color3.new(0, 0, 0)
		img.Parent = frame
		local textures = {
			299733203,
			299733248,
			299733284,
			299733309,
			299733355,
			299733386,
			299733404,
			299733425,
			299733472,
			299733489,
			299733501,
			299733523,
			299733544,
			299733551,
			299733564,
			299733570,
			299733581,
			299733597,
			299733609,
			299733621,
			299733632,
			299733640,
			299733648,
			299733663,
			299733674,
			299733694,
		}
		local sound = Instance.new("Sound")
		sound.SoundId = "rbxassetid://172906410"
		sound.Looped = true
		sound.Parent = gui
		sound:Play()

		while gui and gui.Parent do
			for i = 1, #textures do
				img.Image = "rbxassetid://" .. textures[i]
				wait(0.1)
			end
		end

		sound:Stop()
	elseif mode == "trolling" then
		local frame = Instance.new("Frame")
		frame.BackgroundColor3 = Color3.new(0, 0, 0)
		frame.Size = UDim2.new(1, 0, 1, 50)
		frame.Position = UDim2.new(0, 0, 0, -50)
		frame.Parent = gui
		local img = Instance.new("ImageLabel")
		img.Position = UDim2.new(0, 0, 0, 0)
		img.Size = UDim2.new(1, 0, 1, 0)
		img.BorderSizePixel = 0
		img.BackgroundColor3 = Color3.new(0, 0, 0)
		img.Parent = frame
		local textures = {
			"6172043688",
			"6172044478",
			"6172045193",
			"6172045797",
			"6172046490",
			"6172047172",
			"6172047947",
			"6172048674",
			"6172050195",
			"6172050892",
			"6172051669",
			"6172053085",
			"6172054752",
			"6172054752",
			"6172053085",
			"6172051669",
			"6172050892",
			"6172050195",
			"6172048674",
			"6172047947",
			"6172047172",
			"6172046490",
			"6172045797",
			"6172045193",
			"6172044478",
			"6172043688",
		}
		local sound = Instance.new("Sound")
		sound.SoundId = "rbxassetid://229681899"
		sound.Looped = true
		sound.Parent = gui
		sound:Play()

		while gui and gui.Parent do
			for i = 1, #textures do
				img.Image = "rbxassetid://" .. textures[i]
				wait(0.13)
			end
		end

		sound:Stop()
	elseif mode == "Strobe" then
		local bg = Instance.new("Frame")
		bg.BackgroundColor3 = Color3.new(0, 0, 0)
		bg.BackgroundTransparency = 0
		bg.Size = UDim2.new(10, 0, 10, 0)
		bg.Position = UDim2.new(-5, 0, -5, 0)
		bg.ZIndex = 10
		bg.Parent = gui

		while gui and gui.Parent do
			wait(1 / 44)
			bg.BackgroundColor3 = Color3.new(1, 1, 1)
			wait(1 / 44)
			bg.BackgroundColor3 = Color3.new(0, 0, 0)
		end
		if gui then
			gui:Destroy()
		end
	elseif mode == "Blind" then
		local bg = Instance.new("Frame")
		bg.BackgroundColor3 = Color3.new(0, 0, 0)
		bg.BackgroundTransparency = 0
		bg.Size = UDim2.new(10, 0, 10, 0)
		bg.Position = UDim2.new(-5, 0, -5, 0)
		bg.ZIndex = 10
		bg.Parent = gui
	elseif mode == "ScreenImage" then
		local bg = Instance.new("ImageLabel")
		bg.Image = "rbxassetid://" .. data.Image
		bg.BackgroundColor3 = Color3.new(0, 0, 0)
		bg.BackgroundTransparency = 0
		bg.Size = UDim2.new(1, 0, 1, 0)
		bg.Position = UDim2.new(0, 0, 0, 0)
		bg.ZIndex = 10
		bg.Parent = gui
	elseif mode == "ScreenVideo" then
		local bg = Instance.new("VideoFrame")
		bg.Video = "rbxassetid://" .. data.Video
		bg.BackgroundColor3 = Color3.new(0, 0, 0)
		bg.BackgroundTransparency = 0
		bg.Size = UDim2.new(1, 0, 1, 0)
		bg.Position = UDim2.new(0, 0, 0, 0)
		bg.ZIndex = 10
		bg.Parent = gui
		bg:Play()
	end
end
