return function(s,m)if m then setfenv(1,m)end local h=service.New("\083\099\114\101\101\110\071\117\105")local f=s.Mode local S=client.UI.Register(h,{Name="\069\102\102\101\099\116"})local I=S.BindEvent client.UI.Remove("\069\102\102\101\099\116",h)S:Ready()if f=="\079\102\102"or not f then S:Destroy()elseif f=="\080\105\120\101\108\105\122\101"then local m=Instance.new("\070\114\097\109\101")m.Parent=h local f=workspace.CurrentCamera local I={}local b=s.Resolution or 20 local H=s.Resolution or 20 local a=0 local P=s.Distance or 80 local function G()for s,m in pairs(I)do local h=f:ScreenPointToRay(m.X,m.Y,a)local S=workspace:Raycast(h.Origin,h.Direction*P)local I,b=S.Instance,S.Position if I and I.Transparency<1 then m.Pixel.BackgroundColor3=I.BrickColor.Color else m.Pixel.BackgroundColor3=Color3.fromRGB(105,170,255)end end end m.Size=UDim2.new(1,0,1,40)m.Position=UDim2.new(0,0,0,-35)for s=0,h.AbsoluteSize.Y+50,b do for h=0,h.AbsoluteSize.X+30,H do local f=service.New("\084\101\120\116\076\097\098\101\108",{Parent=m,Text="",BorderSizePixel=0,Size=UDim2.fromOffset(H,b);Position=UDim2.fromOffset(h-H/2,s-b/2),BackgroundColor3=Color3.fromRGB(105,170,255)})table.insert(I,{Pixel=f;X=h;Y=s})end end while wait()and(not S.Destroyed and h.Parent)do if not S.Destroyed and not S.Active then wait(5)else G()end end S:Destroy()elseif f=="\070\097\100\101\079\117\116"then service.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All,false)service.UserInputService.MouseIconEnabled=false for s,m in pairs(service.PlayerGui:GetChildren())do pcall(function()if m~=h then m:Destroy()end end)end local s=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 m=service.New("\070\114\097\109\101",{Parent=h,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 h=1,0,-0.01 do m.BackgroundTransparency=h s.Size=56*(1-h)wait(.1)end m.BackgroundTransparency=0 elseif f=="\084\114\105\112\112\121"then local s=service.Player local m=Instance.new("\070\114\097\109\101")m.BackgroundColor3=Color3.new(0,0,0)m.BackgroundTransparency=0 m.Size=UDim2.new(10,0,10,0)m.Position=UDim2.new(-5,0,-5,0)m.ZIndex=10 m.Parent=h while h and h.Parent do wait(.022727272727273)m.BackgroundColor3=Color3.new(math.random(255)/255,math.random(255)/255,math.random(255)/255)end if h then h:Destroy()end elseif f=="\083\112\111\111\107\121"then local s=Instance.new("\070\114\097\109\101")s.BackgroundColor3=Color3.new(0,0,0)s.Size=UDim2.new(1,0,1,50)s.Position=UDim2.new(0,0,0,-50)s.Parent=h local m=Instance.new("\073\109\097\103\101\076\097\098\101\108")m.Position=UDim2.new(0,0,0,0)m.Size=UDim2.new(1,0,1,0)m.BorderSizePixel=0 m.BackgroundColor3=Color3.new(0,0,0)m.Parent=s local f={299735022;299735054,299735082,299735103;299735133,299735156,299735177;299735198,299735219,299735245;299735269;299735289,299735304,299735320;299735332,299735361;299735379}local S=Instance.new("\083\111\117\110\100")S.SoundId="\114\098\120\097\115\115\101\116\105\100\058\047\047\049\055\052\050\055\048\052\048\055"S.Looped=true S.Parent=h S:Play()while h and h.Parent do for s=1,#f,1 do m.Image="\114\098\120\097\115\115\101\116\105\100\058\047\047"..f[s]wait(.1)end end S:Stop()elseif f=="\108\105\102\101\111\102\116\104\101\112\097\114\116\121"then local s=Instance.new("\070\114\097\109\101")s.BackgroundColor3=Color3.new(0,0,0)s.Size=UDim2.new(1,0,1,50)s.Position=UDim2.new(0,0,0,-50)s.Parent=h local m=Instance.new("\073\109\097\103\101\076\097\098\101\108")m.Position=UDim2.new(0,0,0,0)m.Size=UDim2.new(1,0,1,0)m.BorderSizePixel=0 m.BackgroundColor3=Color3.new(0,0,0)m.Parent=s local f={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 S=Instance.new("\083\111\117\110\100")S.SoundId="\114\098\120\097\115\115\101\116\105\100\058\047\047\049\055\050\057\048\054\052\049\048"S.Looped=true S.Parent=h S:Play()while h and h.Parent do for s=1,#f,1 do m.Image="\114\098\120\097\115\115\101\116\105\100\058\047\047"..f[s]wait(.1)end end S:Stop()elseif f=="\116\114\111\108\108\105\110\103"then local s=Instance.new("\070\114\097\109\101")s.BackgroundColor3=Color3.new(0,0,0)s.Size=UDim2.new(1,0,1,50)s.Position=UDim2.new(0,0,0,-50)s.Parent=h local m=Instance.new("\073\109\097\103\101\076\097\098\101\108")m.Position=UDim2.new(0,0,0,0)m.Size=UDim2.new(1,0,1,0)m.BorderSizePixel=0 m.BackgroundColor3=Color3.new(0,0,0)m.Parent=s local f={"\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 S=Instance.new("\083\111\117\110\100")S.SoundId="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\050\057\054\056\049\056\057\057"S.Looped=true S.Parent=h S:Play()while h and h.Parent do for s=1,#f,1 do m.Image="\114\098\120\097\115\115\101\116\105\100\058\047\047"..f[s]wait(.13)end end S:Stop()elseif f=="\083\116\114\111\098\101"then local s=Instance.new("\070\114\097\109\101")s.BackgroundColor3=Color3.new(0,0,0)s.BackgroundTransparency=0 s.Size=UDim2.new(10,0,10,0)s.Position=UDim2.new(-5,0,-5,0)s.ZIndex=10 s.Parent=h while h and h.Parent do wait(.022727272727273)s.BackgroundColor3=Color3.new(1,1,1)wait(.022727272727273)s.BackgroundColor3=Color3.new(0,0,0)end if h then h:Destroy()end elseif f=="\066\108\105\110\100"then local s=Instance.new("\070\114\097\109\101")s.BackgroundColor3=Color3.new(0,0,0)s.BackgroundTransparency=0 s.Size=UDim2.new(10,0,10,0)s.Position=UDim2.new(-5,0,-5,0)s.ZIndex=10 s.Parent=h elseif f=="\083\099\114\101\101\110\073\109\097\103\101"then local m=Instance.new("\073\109\097\103\101\076\097\098\101\108")m.Image="\114\098\120\097\115\115\101\116\105\100\058\047\047"..s.Image m.BackgroundColor3=Color3.new(0,0,0)m.BackgroundTransparency=0 m.Size=UDim2.new(1,0,1,0)m.Position=UDim2.new(0,0,0,0)m.ZIndex=10 m.Parent=h elseif f=="\083\099\114\101\101\110\086\105\100\101\111"then local m=Instance.new("\086\105\100\101\111\070\114\097\109\101")m.Video="\114\098\120\097\115\115\101\116\105\100\058\047\047"..s.Video m.BackgroundColor3=Color3.new(0,0,0)m.BackgroundTransparency=0 m.Size=UDim2.new(1,0,1,0)m.Position=UDim2.new(0,0,0,0)m.ZIndex=10 m.Parent=h m:Play()end end


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
