Battery.Interaction.Touched:Connect(function(h)if h.Parent:IsA("\084\111\111\108")and h.Parent.Name==ToolRequired then Battery.Battery1.Transparency=0 if game.ReplicatedStorage.ItemSwitching.Value==true then h.Parent:Destroy()end Battery.Parent.SoundPart.Insert:Play()Battery.Parent.Light2.Color=Color3.fromRGB(0,255,0)LocksLeft.Value=LocksLeft.Value-1 Battery.Battery1Script.Disabled=true end end)Battery.Interaction.ClickDetector.MouseClick:Connect(function(h)if h.Backpack:FindFirstChild(Battery.ToolRequired.Value)then Battery.Battery1.Transparency=0 if game.ReplicatedStorage.ItemSwitching.Value==true then(h.Backpack:FindFirstChild(ToolRequired)):Destroy()end Battery.Parent.SoundPart.Insert:Play()Battery.Parent.Light2.Color=Color3.fromRGB(0,255,0)LocksLeft.Value=LocksLeft.Value-1 Battery.Battery1Script.Disabled=true end end)
-- Battery1 --

Battery.Interaction.Touched:Connect(function(hit)
	if hit.Parent:IsA("Tool") and hit.Parent.Name == ToolRequired then
		Battery.Battery1.Transparency = 0
		if game.ReplicatedStorage.ItemSwitching.Value == true then
			hit.Parent:Destroy()
		end
		Battery.Parent.SoundPart.Insert:Play()
		Battery.Parent.Light2.Color = Color3.fromRGB(0, 255, 0)
		LocksLeft.Value = LocksLeft.Value - 1
		Battery.Battery1Script.Disabled = true
	end
end)

Battery.Interaction.ClickDetector.MouseClick:Connect(function(plr)
	if plr.Backpack:FindFirstChild(Battery.ToolRequired.Value) then
		Battery.Battery1.Transparency = 0
		if game.ReplicatedStorage.ItemSwitching.Value == true then
			plr.Backpack:FindFirstChild(ToolRequired):Destroy()
		end
		Battery.Parent.SoundPart.Insert:Play()
		Battery.Parent.Light2.Color = Color3.fromRGB(0, 255, 0)
		LocksLeft.Value = LocksLeft.Value - 1
		Battery.Battery1Script.Disabled = true
	end
end)
