local dataLink = script["Data Link"].Value
local button = script.Parent.Parent.SingleListenAutoTravel
local bulb = script.Parent.Parent.ActiveLED.Bulb
local bits = {}
local running = false


script.Parent.Use.MouseClick:Connect(function()
	if dataLink.isDataSingleSendReverseActive.Value then
		running = true
		if dataLink.isDataSingleListenAutoTravelActive.Value == false then
			button.Position = Vector3.new(button.Position.X + 0.02, button.Position.Y - 0.065, button.Position.Z - 0.011)
			dataLink.isDataSingleListenAutoTravelActive.Value = true

		elseif dataLink.isDataSingleListenAutoTravelActive.Value then
			button.Position = Vector3.new(button.Position.X - 0.02, button.Position.Y + 0.065, button.Position.Z + 0.011)
			dataLink.isDataSingleListenAutoTravelActive.Value = false
		end
		running = false
	end
end)


dataLink.isDataSingleListenAutoTravelActive.Changed:Connect(function()
	if not running then
		if dataLink.isDataSingleListenAutoTravelActive.Value then
			button.Position = Vector3.new(button.Position.X + 0.02, button.Position.Y - 0.065, button.Position.Z - 0.011)

		elseif dataLink.isDataSingleListenAutoTravelActive.Value == false then
			button.Position = Vector3.new(button.Position.X - 0.02, button.Position.Y + 0.065, button.Position.Z + 0.011)
		end
	end
end)
