--GreenEgg--


EggEvent.Hitbox.Touched:Connect(function(hit)
	if hit.Parent:IsA("Tool") and hit.Parent.Name == ToolRequired2 then
		if game.ReplicatedStorage.ItemSwitching.Value == true then
			hit.Parent:Destroy()
		end
		EggEvent.SoundPart.Insert:Play()
		EggEvent.GreenEgg.Transparency = 0
		EggEvent.LocksLeft.Value = EggEvent.LocksLeft.Value - 1
		script.Disabled = true
		EggEvent.Hitbox.GreenEggHint:Destroy()
	end
end)

EggEvent.Hitbox.ClickDetector.MouseClick:Connect(function(plr)
	if plr.Backpack:FindFirstChild(ToolRequired2) then
		if game.ReplicatedStorage.ItemSwitching.Value == true then
			plr.Backpack:FindFirstChild(ToolRequired2):Destroy()
		end
		EggEvent.SoundPart.Insert:Play()
		EggEvent.GreenEgg.Transparency = 0
		EggEvent.LocksLeft.Value = EggEvent.LocksLeft.Value - 1	
		script.Disabled = true
		EggEvent.Hitbox.GreenEggHint:Destroy()
	end
end)
