local function j(j,T,b)if j>RGBSliderHitboxes[T][b].AbsolutePosition.X and j<RGBSliderHitboxes[T][b].AbsolutePosition.X+RGBSliderHitboxes[T][b].AbsoluteSize.X then RGBSliders[T][b].Position=UDim2.new(0,j-RGBSliderHitboxes[T][b].AbsolutePosition.X,RGBSliders[T][b].Position.Y.Scale,0)elseif j<RGBSliderHitboxes[T][b].AbsolutePosition.X then RGBSliders[T][b].Position=UDim2.new(0,0,RGBSliders[T][b].Position.Y.Scale,0)elseif j>RGBSliderHitboxes[T][b].AbsolutePosition.X+RGBSliderHitboxes[T][b].AbsoluteSize.X then RGBSliders[T][b].Position=UDim2.new(0,RGBSliderHitboxes[T][b].AbsoluteSize.X+1,RGBSliders[T][b].Position.Y.Scale,0)end RGBInputs[T][b].Text=math.floor((RGBSliders[T][b].Position.X.Offset/RGBSliderHitboxes[T][b].AbsoluteSize.X)*255)PreviewColor[T].BackgroundColor3=Color3.fromRGB(tonumber(RGBInputs[T][1].Text),tonumber(RGBInputs[T][2].Text),tonumber(RGBInputs[T][3].Text))end

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
