return function(g)if not g.Question then return end local h=g.gTable local l=script.Parent.Parent.BaseClip local V=g.Duration or g.Timeout local G local d=l.Frame local k=d k.Parent=l k.Position=UDim2.new(.5,-210,0,-k.Size.Y.Offset)k.Visible=true local v=k:WaitForChild("\066\111\100\121")local i=v:WaitForChild("\079\112\116\105\111\110\115")local t,a=i:WaitForChild("\067\111\110\102\105\114\109"),i:WaitForChild("\067\097\110\099\101\108")local Z=v:WaitForChild("\067\111\109\109\097\110\100")local m=d.Top.Title Z.Text=g.Subtitle or" "v.Ques.Text=g.Question or"\085\110\107\110\111\119\110"m.Text=g.Title or"\089\101\115\047\078\111 \080\114\111\109\112\116"v.Options.Cancel.Text=g.No or"\078\111"v.Options.Confirm.Text=g.Yes or"\089\101\115"h:Ready()h.CustomDestroy=function()h.CustomDestroy=nil h.ClearEvents()if G==nil then G=g.No or"\078\111"end pcall(function()k:TweenPosition(UDim2.new(.5,-210,1,0),"\079\117\116","\081\117\105\110\116",.3,true,function(g)if g==Enum.TweenStatus.Completed then k:Destroy()end end)wait(.3)end)h:Destroy()end k:TweenPosition(UDim2.new(.5,-210,.5,-70),"\079\117\116","\081\117\105\110\116",.3,true)local O O=h.BindEvent(t.MouseButton1Click,function()O:Disconnect()k:TweenPosition(UDim2.new(.5,-210,1,0),"\079\117\116","\081\117\105\110\116",.3,true,function(g)if g==Enum.TweenStatus.Completed then k:Destroy()end end)G=g.Yes or"\089\101\115"wait(.3)h:Destroy()end)local S S=h.BindEvent(a.MouseButton1Click,function()S:Disconnect()k:TweenPosition(UDim2.new(.5,-210,1,0),"\079\117\116","\081\117\105\110\116",.3,true,function(g)if g==Enum.TweenStatus.Completed then k:Destroy()end end)G=g.No or"\078\111"wait(.3)h:Destroy()end)local o=tick()repeat wait()until G~=nil or V and tick()-V>V if G==nil then G=false end return G end
--// All global vars will be wiped/replaced except script
--// All guis are autonamed client.Variables.CodeName..gui.Name
--// Be sure to update the console gui's code if you change stuff

return function(data)
	if not data.Question then
		return
	end

	local gTable = data.gTable
	local baseClip = script.Parent.Parent.BaseClip
	local duration = data.Duration or data.Timeout

	local toReturn
	local confirmationTemplate = baseClip.Frame
	local confirmationClone = confirmationTemplate
	confirmationClone.Parent = baseClip
	confirmationClone.Position = UDim2.new(0.5, -210, 0, -confirmationClone.Size.Y.Offset)
	confirmationClone.Visible = true
	local Body = confirmationClone:WaitForChild("Body")
	local Options = Body:WaitForChild("Options")
	local Confirm, Cancel = Options:WaitForChild("Confirm"), Options:WaitForChild("Cancel")
	local commandText = Body:WaitForChild("Command")
	local title = confirmationTemplate.Top.Title

	commandText.Text = data.Subtitle or " "
	Body.Ques.Text = data.Question or "Unknown"
	title.Text = data.Title or "Yes/No Prompt"

	Body.Options.Cancel.Text = data.No or "No"
	Body.Options.Confirm.Text = data.Yes or "Yes"

	gTable:Ready()

	gTable.CustomDestroy = function()
		gTable.CustomDestroy = nil
		gTable.ClearEvents()
		if toReturn == nil then
			toReturn = data.No or "No"
		end

		pcall(function()
			confirmationClone:TweenPosition(UDim2.new(0.5, -210, 1, 0), "Out", "Quint", 0.3, true, function(Stat)
				if Stat == Enum.TweenStatus.Completed then
					confirmationClone:Destroy()
				end
			end)

			wait(0.3)
		end)

		gTable:Destroy()
	end

	confirmationClone:TweenPosition(UDim2.new(0.5, -210, 0.5, -70), "Out", "Quint", 0.3, true)
	local Confirming
	Confirming = gTable.BindEvent(Confirm.MouseButton1Click, function()
		Confirming:Disconnect()
		confirmationClone:TweenPosition(UDim2.new(0.5, -210, 1, 0), "Out", "Quint", 0.3, true, function(Stat)
			if Stat == Enum.TweenStatus.Completed then
				confirmationClone:Destroy()
			end
		end)

		toReturn = data.Yes or "Yes"
		wait(0.3)
		gTable:Destroy()
	end)

	local Cancelling
	Cancelling = gTable.BindEvent(Cancel.MouseButton1Click, function()
		Cancelling:Disconnect()
		confirmationClone:TweenPosition(UDim2.new(0.5, -210, 1, 0), "Out", "Quint", 0.3, true, function(Stat)
			if Stat == Enum.TweenStatus.Completed then
				confirmationClone:Destroy()
			end
		end)
		toReturn = data.No or "No"
		wait(0.3)
		gTable:Destroy()
	end)

	local start = tick()
	repeat
		wait()
	until toReturn ~= nil or (duration and (tick() - duration) > duration)
	if toReturn == nil then
		toReturn = false
	end

	return toReturn
end
