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


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

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