brushSettings.ColorBox.FocusLost:Connect(function(w)if w then local w=brushSettings.ColorBox.Text w=string.gsub(w," ","")w=string.split(w,"\044")if tonumber(w[1])and(tonumber(w[2])and tonumber(w[3]))then currentColor=Color3.fromRGB(w[1],w[2],w[3])end brushSettings.ColorBox.Text=math.floor(currentColor.R*255+.5)..("\044 "..(math.floor(currentColor.G*255+.5)..("\044 "..math.floor(currentColor.B*255+.5))))brushSettings.PaintImage.ImageColor3=currentColor end end)
--Change the color of the brush when the text box is used
brushSettings.ColorBox.FocusLost:Connect(function(entered)
	if entered then
		local color = brushSettings.ColorBox.Text
		color = string.gsub(color, " ", "")
		color = string.split(color, ",")

		if tonumber(color[1]) and tonumber(color[2]) and tonumber(color[3]) then
			currentColor = Color3.fromRGB(color[1], color[2], color[3])
		end

		brushSettings.ColorBox.Text = math.floor(currentColor.R * 255 + 0.5)
			.. ", "
			.. math.floor(currentColor.G * 255 + 0.5)
			.. ", "
			.. math.floor(currentColor.B * 255 + 0.5)

		brushSettings.PaintImage.ImageColor3 = currentColor
	end
end)
