local M=script.Parent.Button local L=Instance.new("\067\108\105\099\107\068\101\116\101\099\116\111\114",M)L.MaxActivationDistance=5 local o=false local F=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")local d=M.CFrame L.MouseClick:Connect(function()if not o then o=true local L=F:Create(M,TweenInfo.new(.1,Enum.EasingStyle.Quad,Enum.EasingDirection.In,0,false,0),{CFrame=d*CFrame.new(-0.03,0,0)})L.Completed:Connect(function()local L=F:Create(M,TweenInfo.new(.1,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,0,false,0),{CFrame=d})L.Completed:Connect(function()o=false end)L:Play()end)L:Play()end end)
-- a single button script :p

local THEbutton = script.Parent.Button
local CD = Instance.new("ClickDetector", THEbutton)
CD.MaxActivationDistance = 5

local deb = false
local TS = game:GetService("TweenService")
local og_pos = THEbutton.CFrame
CD.MouseClick:Connect(function()
	if not deb then
		deb = true
		local start = TS:Create(
			THEbutton,
			TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.In, 0, false, 0),
			{ CFrame = og_pos * CFrame.new(-0.03, 0, 0) }
		)
		start.Completed:Connect(function()
			local End = TS:Create(
				THEbutton,
				TweenInfo.new(0.1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0),
				{ CFrame = og_pos }
			)
			End.Completed:Connect(function()
				deb = false
			end)
			End:Play()
		end)
		start:Play()
	end
end)
