Issue with debounce

You need to define the debounce above the function scope.

local debounce = false

local function mClick()
	debounce = not debounce

	if not debounce then
		SoundS.Sound.Playing = false
		Music.BorderColor3 = Color3.fromRGB(239, 155, 156)
	elseif debounce then
		SoundS.Sound.Playing = true
		Music.BorderColor3 = Color3.fromRGB(184, 239, 160)
	end
end

Music.MouseButton1Click:Connect(mClick)