local t=false local e=.025 local o=0 function snap(t,e)if e==0 then return t else return math.floor(t/e+.5)*e end end UIS.InputEnded:connect(function(e,o)if e.UserInputType==Enum.UserInputType.MouseButton1 then t=false end end)SliderBtn.MouseButton1Down:connect(function()t=true end)RuS.RenderStepped:connect(function(R)if t then local t=(UIS:GetMouseLocation()).X local R=SliderBtn.Position local s=Slider.AbsoluteSize.X local q=Slider.AbsolutePosition.X local J=snap((t-q)/s,e)o=math.clamp(J,0,1)SliderBtn.Position=UDim2.new(o,0,R.Y.Scale,R.Y.Offset)local U=o wait()if U~=o then local t=(o-.5)*400 game.Players.LocalPlayer.Character["\086\105\098\101 \082\097\100\105\111"].changebass:FireServer(t)end end end)
-- Properties
local held = false
local step = 0.025
local percentage = 0

function snap(number, factor)
	if factor == 0 then
		return number
	else
		return math.floor(number / factor + 0.5) * factor
	end
end

UIS.InputEnded:connect(function(input, processed)
	if input.UserInputType == Enum.UserInputType.MouseButton1 then
		held = false
	end
end)

SliderBtn.MouseButton1Down:connect(function()
	held = true
end)

RuS.RenderStepped:connect(function(delta)
	if held then
		local MousePos = UIS:GetMouseLocation().X
		local BtnPos = SliderBtn.Position
		local SliderSize = Slider.AbsoluteSize.X
		local SliderPos = Slider.AbsolutePosition.X
		local pos = snap((MousePos - SliderPos) / SliderSize, step)
		percentage = math.clamp(pos, 0, 1)
		SliderBtn.Position = UDim2.new(percentage, 0, BtnPos.Y.Scale, BtnPos.Y.Offset)
		local old = percentage
		wait()
		if old ~= percentage then
			local b = (percentage - 0.5) * 400
			game.Players.LocalPlayer.Character["Vibe Radio"].changebass:FireServer(b)
		end
	end
end)
