client,service=nil,nil return function(z,y)if y then setfenv(1,y)end local C local v local x=os.clock()local W=client.UI.Make("\087\105\110\100\111\119",{Name=z.Name or"\080\114\111\109\112\116",Title=z.Title or"\080\114\111\109\112\116",Size=z.Size or{225;150};SizeLocked=true,Icon=z.Icon or client.MatIcons.Help;OnClose=function()if not v then v="\078\111"end end})local c=W:Add("\084\101\120\116\076\097\098\101\108",{Text=z.Question;Font=Enum.Font.SourceSans;TextScaled=true;BackgroundTransparency=1,TextWrapped=true;Size=UDim2.new(1,-10,1,-45)})local V=W:Add("\084\101\120\116\066\117\116\116\111\110",{Text="\089\101\115";Font=Enum.Font.Arial,TextSize=18,AnchorPoint=Vector2.new(0,1);Size=UDim2.new(.5,-7,0,30),Position=UDim2.new(0,5,1,-5),BackgroundColor3=Color3.fromRGB(74,195,56),BackgroundTransparency=.5})local h=W:Add("\084\101\120\116\066\117\116\116\111\110",{Text="\078\111",Font=Enum.Font.Arial;TextSize=18;AnchorPoint=Vector2.new(0,1),Size=UDim2.new(.5,-7,0,30);Position=UDim2.new(.5,2,1,-5),BackgroundColor3=Color3.fromRGB(206,72,45),BackgroundTransparency=.5})V.MouseButton1Down:Connect(function()if z.Delay and os.clock()<x+z.Delay then return end v="\089\101\115"W:Close()end)h.MouseButton1Down:Connect(function()v="\078\111"W:Close()end)C=W.gTable W:Ready()if z.Delay then V.BackgroundColor3=Color3.fromRGB(38,100,28)repeat V.Text=string.format("\037\115",math.ceil((x+z.Delay)-os.clock()))task.wait(1)until os.clock()>x+z.Delay V.Text="\089\101\115"V.BackgroundColor3=Color3.fromRGB(74,195,56)end repeat task.wait()until v return v end
client, service = nil, nil

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

	local gTable
	local answer
	local startTick = os.clock()

	local window = client.UI.Make("Window", {
		Name  = data.Name or "Prompt";
		Title = data.Title or "Prompt";
		Size = data.Size or {225, 150};
		SizeLocked = true;
		Icon = data.Icon or client.MatIcons.Help;
		OnClose = function()
			if not answer then
				answer = "No"
			end
		end
	})

	local label = window:Add("TextLabel", {
		Text = data.Question;
		Font = Enum.Font.SourceSans;
		TextScaled = true;
		BackgroundTransparency = 1;
		TextWrapped = true;
		Size = UDim2.new(1, -10, 1, -45);
	})

	local yes = window:Add("TextButton", {
		Text = "Yes";
		Font = Enum.Font.Arial;
		TextSize = 18;
		AnchorPoint = Vector2.new(0, 1);
		Size = UDim2.new(0.5, -7, 0, 30);
		Position = UDim2.new(0, 5, 1, -5);
		BackgroundColor3 = Color3.fromRGB(74, 195, 56);
		BackgroundTransparency = 0.5;
	})

	local no = window:Add("TextButton", {
		Text = "No";
		Font = Enum.Font.Arial;
		TextSize = 18;
		AnchorPoint = Vector2.new(0, 1);
		Size = UDim2.new(0.5, -7, 0, 30);
		Position = UDim2.new(0.5, 2, 1, -5);
		BackgroundColor3 = Color3.fromRGB(206, 72, 45);
		BackgroundTransparency = 0.5;
	})

	yes.MouseButton1Down:Connect(function()
		if data.Delay and os.clock() < startTick + data.Delay then
			return
		end

		answer = "Yes"
		window:Close()
	end)

	no.MouseButton1Down:Connect(function()
		answer = "No"
		window:Close()
	end)

	gTable = window.gTable
	window:Ready()

	if data.Delay then
		yes.BackgroundColor3 = Color3.fromRGB(38, 100, 28)

		repeat
			yes.Text = string.format("%s", math.ceil(startTick + data.Delay - os.clock()))
			task.wait(1)
		until os.clock() > startTick + data.Delay

		yes.Text = "Yes"
		yes.BackgroundColor3 = Color3.fromRGB(74, 195, 56)
	end

	repeat task.wait() until answer 
	return answer
end
