local function f(f,V,X)if f>RGBSliderHitboxes[V][X].AbsolutePosition.X and f<RGBSliderHitboxes[V][X].AbsolutePosition.X+RGBSliderHitboxes[V][X].AbsoluteSize.X then RGBSliders[V][X].Position=UDim2.new(0,f-RGBSliderHitboxes[V][X].AbsolutePosition.X,RGBSliders[V][X].Position.Y.Scale,0)elseif f<RGBSliderHitboxes[V][X].AbsolutePosition.X then RGBSliders[V][X].Position=UDim2.new(0,0,RGBSliders[V][X].Position.Y.Scale,0)elseif f>RGBSliderHitboxes[V][X].AbsolutePosition.X+RGBSliderHitboxes[V][X].AbsoluteSize.X then RGBSliders[V][X].Position=UDim2.new(0,RGBSliderHitboxes[V][X].AbsoluteSize.X+1,RGBSliders[V][X].Position.Y.Scale,0)end RGBInputs[V][X].Text=math.floor((RGBSliders[V][X].Position.X.Offset/RGBSliderHitboxes[V][X].AbsoluteSize.X)*255)PreviewColor[V].BackgroundColor3=Color3.fromRGB(tonumber(RGBInputs[V][1].Text),tonumber(RGBInputs[V][2].Text),tonumber(RGBInputs[V][3].Text))end
--------[LOCAL FUNCTIONS]--------
----[UPDATE SLIDER POSITIONS]----
local function RGBSliderMovement(MouseX, z, i) --z = ColorPicker, i = RGBSlider
	if
		MouseX > RGBSliderHitboxes[z][i].AbsolutePosition.X
		and MouseX < (RGBSliderHitboxes[z][i].AbsolutePosition.X + RGBSliderHitboxes[z][i].AbsoluteSize.X)
	then
		RGBSliders[z][i].Position =
			UDim2.new(0, MouseX - RGBSliderHitboxes[z][i].AbsolutePosition.X, RGBSliders[z][i].Position.Y.Scale, 0)
	elseif MouseX < RGBSliderHitboxes[z][i].AbsolutePosition.X then
		RGBSliders[z][i].Position = UDim2.new(0, 0, RGBSliders[z][i].Position.Y.Scale, 0)
	elseif MouseX > (RGBSliderHitboxes[z][i].AbsolutePosition.X + RGBSliderHitboxes[z][i].AbsoluteSize.X) then
		RGBSliders[z][i].Position =
			UDim2.new(0, RGBSliderHitboxes[z][i].AbsoluteSize.X + 1, RGBSliders[z][i].Position.Y.Scale, 0)
	end

	RGBInputs[z][i].Text =
		math.floor(((RGBSliders[z][i].Position.X.Offset / RGBSliderHitboxes[z][i].AbsoluteSize.X) * 255))
	PreviewColor[z].BackgroundColor3 =
		Color3.fromRGB(tonumber(RGBInputs[z][1].Text), tonumber(RGBInputs[z][2].Text), tonumber(RGBInputs[z][3].Text))
end
