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