-- Decompiled with the Synapse X Luau decompiler.


client = nil;
service = nil;
return function(p1)
	local l__mouse__1 = service.Players.LocalPlayer:GetMouse();
	local v2 = client.UI.Make("Window", {
		Name = "Paint", 
		Title = "Paint", 
		Icon = client.MatIcons.Palette
	});
	local v3 = v2:Add("Frame", {
		Size = UDim2.new(1, 0, 0, 28), 
		Position = UDim2.new(0, 0, 0, 0), 
		BackgroundTransparency = 1
	});
	local v4 = v3:Add("TextLabel", {
		Size = UDim2.new(0, 100, 1, -8), 
		Position = UDim2.new(1, -180, 0, 4), 
		Text = "Pixels: 0", 
		TextXAlignment = "Right", 
		BackgroundTransparency = 1
	});
	local v5 = v2:Add("ScrollingFrame", {
		Position = UDim2.new(0, 0, 0, 30), 
		Size = UDim2.new(1, 0, 1, -30), 
		BackgroundColor3 = Color3.new(1, 1, 1), 
		ClipsDescendants = true
	});
	local u1 = v5:Add("Frame", {
		Position = UDim2.new(0, 0, 0, 0), 
		Size = UDim2.new(0, 4, 0, 4), 
		BackgroundColor3 = Color3.new(0, 0, 0), 
		BackgroundTransparency = 0, 
		Visible = false
	});
	v5.MouseEnter:Connect(function()
		u1.Visible = true;
	end);
	v5.MouseLeave:Connect(function()
		u1.Visible = false;
	end);
	local u2 = false;
	v5.MouseMoved:Connect(function(p2, p3)
		local v6 = Vector2.new(math.abs(p2 - v5.AbsolutePosition.X), math.abs(p3 - v5.AbsolutePosition.Y - 36));
		u1.Position = UDim2.new(0, v6.X, 0, v6.Y);
		if u2 == false then
			return;
		end;
		local v7 = u1:Clone();
		v7.Name = "Pixel";
		v7.Parent = v5;
		v4.Text = "Pixels: " .. tostring(v4.Text:sub(9) + 1);
	end);
	local v8 = v3:Add("TextButton", {
		Size = UDim2.new(0, 70, 1, -8), 
		Position = UDim2.new(1, -75, 0, 4), 
		Text = "Clear", 
		TextXAlignment = "Center", 
		OnClick = function()
			for v9, v10 in pairs((v5:GetChildren())) do
				if v10.Name == "Pixel" then
					v10:Destroy();
				end;
			end;
			v4.Text = "Pixels: 0";
		end
	});
	v3:Add("TextLabel", {
		Text = " Color: ", 
		Size = UDim2.new(0, 90, 1, -8), 
		Position = UDim2.new(0, 5, 0, 4), 
		BackgroundTransparency = 0.25, 
		TextXAlignment = "Left", 
		Children = { {
				Class = "TextButton", 
				Text = "", 
				Size = UDim2.new(0, 40, 1, -6), 
				Position = UDim2.new(1, -45, 0, 3), 
				BackgroundColor3 = Color3.new(0, 0, 0), 
				TextTransparency = 0, 
				BackgroundTransparency = 0, 
				BorderPixelSize = 1, 
				BorderColor3 = Color3.fromRGB(100, 100, 100), 
				OnClick = function(p4)
					local v11 = client.UI.Make("ColorPicker", {
						Color = Color3.new(0, 0, 0)
					});
					p4.BackgroundColor3 = v11;
					u1.BackgroundColor3 = v11;
				end
			} }
	});
	local v12 = v3:Add("TextLabel", {
		Text = "  Size: ", 
		BackgroundTransparency = 0, 
		Size = UDim2.new(0, 70, 1, -8), 
		Position = UDim2.new(0, 100, 0, 4), 
		TextXAlignment = "Left", 
		Children = {
			TextBox = {
				Text = "", 
				PlaceholderText = "4", 
				Size = UDim2.new(0, 26, 1, 0), 
				Position = UDim2.new(1, -31, 0, 0), 
				BackgroundTransparency = 1, 
				TextXAlignment = "Right", 
				ClipsDescendants = true, 
				TextChanged = function(p5, p6, p7)
					if tonumber(p5) then
						if not (tonumber(p5) < 100) then
							u1.Size = UDim2.new(0, 99, 0, 99);
							return;
						end;
					else
						return;
					end;
					u1.Size = UDim2.new(0, p5, 0, p5);
				end
			}
		}
	});
	v2:Ready();
	service.UserInputService.InputBegan:Connect(function(p8)
		if p8.UserInputType == Enum.UserInputType.MouseButton1 then
			u2 = true;
		end;
	end);
	service.UserInputService.InputEnded:Connect(function(p9)
		if p9.UserInputType == Enum.UserInputType.MouseButton1 then
			u2 = false;
		end;
	end);
end;
