local e=require(script.Parent.Parent)local y=e.UI task.defer(function()local h=172732271 local l,p=e.Util.Retry(function()return e.Util.Services.MarketplaceService:PlayerOwnsAsset(e.UI.LocalPlayer,h)end,5,1,2)if not l or p then return end local Y local g=(y.new("\066\117\116\116\111\110"))({LayoutOrder=10,Name="\097\100\109\105\110\077\111\100\101\108\066\117\116\116\111\110";Icon="\114\098\120\097\115\115\101\116\058\047\047\116\101\120\116\117\114\101\115\047\117\105\047\099\111\109\109\111\110\047\114\111\098\117\120\046\112\110\103",IconRightAlign=true;Label="\060\115\099\062\060\098\062\071\069\084 \073\084 \084\079\068\065\089\033\060\047\098\062\060\047\115\099\062";HoverTransparency=.5,TextXAlignment=Enum.TextXAlignment.Left,Size=UDim2.new(.75,0,0,32);(y.new("\070\114\097\109\101"))({BackgroundTransparency=1;AnchorPoint=Vector2.new(0,.5);Position=UDim2.new(0,0,.5,0);Size=UDim2.new(0,28,0,28);(y.new("\073\109\097\103\101\076\097\098\101\108"))({BackgroundTransparency=1,Size=UDim2.new(0,28,0,28);Image="\114\098\120\097\115\115\101\116\058\047\047\116\101\120\116\117\114\101\115\047\117\105\047\073\110\115\112\101\099\116\077\101\110\117\047\105\099\111\095\102\097\118\111\114\105\116\101\064\050\120\046\112\110\103",ImageColor3=Color3.new(0,0,0);ImageTransparency=.875});(y.new("\073\109\097\103\101\066\117\116\116\111\110"))({BackgroundTransparency=1;Position=UDim2.new(0,2,0,2);Size=UDim2.new(0,24,0,24),Image="\114\098\120\097\115\115\101\116\058\047\047\116\101\120\116\117\114\101\115\047\117\105\047\073\110\115\112\101\099\116\077\101\110\117\047\105\099\111\095\102\097\118\111\114\105\116\101\064\050\120\046\112\110\103",ImageColor3=Color3.new(1,.8,0);[y.Event]={Activated=function()e.Services.AvatarEditorService:PromptSetFavorite(h,1,true)end},(y.new("\084\111\111\108\116\105\112"))({Text="\065\100\100 \116\111 \070\097\118\111\114\105\116\101\115"})})}),(y.new("\084\101\120\116\076\097\098\101\108"))({Name="\080\114\105\099\101";AutoLocalize=false,AutomaticSize=Enum.AutomaticSize.XY;BackgroundTransparency=1,Font=y.Theme.FontMono,TextSize=y.Theme.FontSizeLarge;TextColor3=y.Theme.PrimaryText;TextWrapped=true,Size=y.computeFrom(UDim2.new,0,y.Theme.FontSizeLarge,0,32),Text="\060\098\062\070\082\069\069\060\047\098\062";RichText=true}),[y.Event]={Activated=function()y.Scope.lastAttemptedPurchase=h y.Scope.purchaseLink.Text="\104\116\116\112\115\058\047\047\099\114\101\097\116\101\046\114\111\098\108\111\120\046\099\111\109\047\115\116\111\114\101\047\097\115\115\101\116\047"..h if y.Scope.AllowThirdPartySales then e.Services.MarketplaceService:PromptPurchase(e.UI.LocalPlayer,h)else y.Scope.purchaseDialog.Visible:set(true)Y.Visible:set(false)end end}})Y=(y.new("\068\105\097\108\111\103"))({Parent=y.LayerTop;Title="\069\110\106\111\121 \075\111\104\108\'\115 \065\100\109\105\110\063";Text="\085\115\101\100 \098\121 \060\098\062\051\048\077\043\060\047\098\062 \100\101\118\101\108\111\112\101\114\115 \115\105\110\099\101 \050\048\049\049\044 \075\111\104\108\'\115 \065\100\109\105\110 \105\115 \116\104\101 \108\101\097\100\105\110\103 \116\111\111\108 \102\111\114 \101\120\112\101\114\105\101\110\099\101 \109\097\110\097\103\101\109\101\110\116\046",Visible=false;ExitButton=true;BackgroundTransparency=0;AnchorPoint=Vector2.new(.5,.5);Position=UDim2.new(.5,0,.5,0);Size=UDim2.new(0,320,0,0);Modal=true,ZIndex=1000;g})local X,Q=0,nil Q=e.Hook.runPreparedCommands:Connect(function()if not e.Data.settings.getKohlsAdminPopup then Q:Disconnect()Y:Destroy()end X+=1 if X==4 then Q:Disconnect()Y.Visible:set(true)end end)end)return true
local _K = require(script.Parent.Parent)
local UI = _K.UI

task.defer(function()
	local adminModelId = 172732271
	local ok, owned = _K.Util.Retry(function()
		return _K.Util.Services.MarketplaceService:PlayerOwnsAsset(_K.UI.LocalPlayer, adminModelId)
	end, 5, 1, 2)

	if not ok or owned then
		return
	end

	local dialog
	local adminModelButton = UI.new "Button" {
		LayoutOrder = 10,
		Name = "adminModelButton",
		Icon = "rbxasset://textures/ui/common/robux.png",
		IconRightAlign = true,
		Label = "<sc><b>GET IT TODAY!</b></sc>",
		HoverTransparency = 0.5,
		TextXAlignment = Enum.TextXAlignment.Left,
		Size = UDim2.new(0.75, 0, 0, 32),

		UI.new "Frame" {
			BackgroundTransparency = 1,
			AnchorPoint = Vector2.new(0, 0.5),
			Position = UDim2.new(0, 0, 0.5, 0),
			Size = UDim2.new(0, 28, 0, 28),

			UI.new "ImageLabel" {
				BackgroundTransparency = 1,
				Size = UDim2.new(0, 28, 0, 28),
				Image = "rbxasset://textures/ui/InspectMenu/ico_favorite@2x.png",
				ImageColor3 = Color3.new(0, 0, 0),
				ImageTransparency = 0.875,
			},
			UI.new "ImageButton" {
				BackgroundTransparency = 1,
				Position = UDim2.new(0, 2, 0, 2),
				Size = UDim2.new(0, 24, 0, 24),
				Image = "rbxasset://textures/ui/InspectMenu/ico_favorite@2x.png",
				ImageColor3 = Color3.new(1, 0.8, 0),
				[UI.Event] = {
					Activated = function()
						_K.Services.AvatarEditorService:PromptSetFavorite(adminModelId, 1, true)
					end,
				},
				UI.new "Tooltip" {
					Text = "Add to Favorites",
				},
			},
		},

		UI.new "TextLabel" {
			Name = "Price",
			AutoLocalize = false,
			AutomaticSize = Enum.AutomaticSize.XY,
			BackgroundTransparency = 1,
			Font = UI.Theme.FontMono,
			TextSize = UI.Theme.FontSizeLarge,
			TextColor3 = UI.Theme.PrimaryText,
			TextWrapped = true,
			Size = UI.computeFrom(UDim2.new, 0, UI.Theme.FontSizeLarge, 0, 32),
			Text = "<b>FREE</b>",
			RichText = true,
		},

		[UI.Event] = {
			Activated = function()
				UI.Scope.lastAttemptedPurchase = adminModelId
				UI.Scope.purchaseLink.Text = "https://create.roblox.com/store/asset/" .. adminModelId
				if UI.Scope.AllowThirdPartySales then
					_K.Services.MarketplaceService:PromptPurchase(_K.UI.LocalPlayer, adminModelId)
				else
					UI.Scope.purchaseDialog.Visible:set(true)
					dialog.Visible:set(false)
				end
			end,
		},
	}

	dialog = UI.new "Dialog" {
		Parent = UI.LayerTop,
		Title = "Enjoy Kohl's Admin?",
		Text = "Used by <b>30M+</b> developers since 2011, Kohl's Admin is the leading tool for experience management.",
		Visible = false,
		ExitButton = true,
		BackgroundTransparency = 0,
		AnchorPoint = Vector2.new(0.5, 0.5),
		Position = UDim2.new(0.5, 0, 0.5, 0),
		Size = UDim2.new(0, 320, 0, 0),
		Modal = true,
		ZIndex = 1000,

		adminModelButton,
	}

	local attempt, connection = 0, nil
	connection = _K.Hook.runPreparedCommands:Connect(function()
		if not _K.Data.settings.getKohlsAdminPopup then
			connection:Disconnect()
			dialog:Destroy()
		end

		attempt += 1
		if attempt == 4 then
			connection:Disconnect()
			dialog.Visible:set(true)
		end
	end)
end)

return true
