local D=script.Parent local h=D.DrawerModel.Drawer local M=script.bool.Value function onClicked(U)if M==true then M=false h.ClickDetector.MaxActivationDistance=0 h.Sound:Play()for h=1,20,1 do D:SetPrimaryPartCFrame((D.PrimaryPart.CFrame*CFrame.new(0,0,-0.1))*CFrame.fromEulerAnglesXYZ(0,0,0))wait(.05)end M=false h.ClickDetector.MaxActivationDistance=5 elseif M==false then M=true h.ClickDetector.MaxActivationDistance=0 h.Sound:Play()for h=1,20,1 do D:SetPrimaryPartCFrame((D.PrimaryPart.CFrame*CFrame.new(0,0,.1))*CFrame.fromEulerAnglesXYZ(0,0,0))wait(.05)end M=true h.ClickDetector.MaxActivationDistance=5 end end h.ClickDetector.MouseClick:connect(onClicked)

local sp=script.Parent
local drawer=sp.DrawerModel.Drawer
local val = script.bool.Value
function onClicked(clicked)

	if val == true then
		val = false
		drawer.ClickDetector.MaxActivationDistance=0
		drawer.Sound:Play()
		for loop = 1, 20 do
		sp:SetPrimaryPartCFrame(sp.PrimaryPart.CFrame * CFrame.new(0, 0,-.1) * CFrame.fromEulerAnglesXYZ(0, 0, 0))
		wait(0.05)
		end
		val = false
		drawer.ClickDetector.MaxActivationDistance=5

	elseif val == false then
		val = true
		drawer.ClickDetector.MaxActivationDistance=0
		drawer.Sound:Play()
		for loop = 1, 20 do
		sp:SetPrimaryPartCFrame(sp.PrimaryPart.CFrame * CFrame.new(0, 0, .1) * CFrame.fromEulerAnglesXYZ(0, 0, 0))
		wait(0.05)
		end
		val = true
		drawer.ClickDetector.MaxActivationDistance=5
		end
		end

drawer.ClickDetector.MouseClick:connect(onClicked)
